Skip to main content
Physics LibreTexts

4.2: Cartesian Coordinates

  • Page ID
    97112
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    The Cartesian coordinate system is introduced in Section 4.1. Concepts described in that section – i.e., the dot product and cross product – are described in terms of the Cartesian system. In this section, we identify some additional features of this system that are useful in subsequent work and also set the stage for alternative systems; namely the cylindrical and spherical coordinate systems.

    Integration Over Length

    Consider a vector field \({\bf A}=\hat{\bf x}A({\bf r})\), where \({\bf r}\) is a position vector. What is the integral of \({\bf A}\) over some curve \(\mathcal{C}\) through space? To answer this question, we first identify a differential-length segment of the curve. Note that this segment of the curve can be described as

    \[d{\bf l} = \hat{\bf x}dx + \hat{\bf y}dy + \hat{\bf z}dz \nonumber \]

    The contribution to the integral for that segment of the curve is simply \({\bf A}\cdot d{\bf l}\). We integrate to obtain the result; i.e.,

    \[\int_{\mathcal C}{ {\bf A}\cdot d{\bf l} } \nonumber \]

    For example, if \({\bf A}=\hat{\bf x}A_0\) (i.e., \(A({\bf r})\) is a constant) and if \(\mathcal{C}\) is a straight line from \(x=x_1\) and \(x=x_2\) along some constant \(y\) and \(z\), then \(d{\bf l} = \hat{\bf x}dx\), \({\bf A}\cdot d{\bf l}=A_0 dx\), and subsequently the above integral is

    \[\int_{x_1}^{x_2}{ A_0 dx } = A_0\left(x_2-x_1\right) \nonumber \]

    In particular, notice that if \(A_0=1\), then this integral gives the length of \({\mathcal C}\). Although the formalism seems unnecessary in this simple example, it becomes very useful when integrating over paths that vary in more than one direction and with more complicated integrands.

    Note that the Cartesian system was an appropriate choice for preceding example because this allowed two of the three basis directions (i.e., \(y\) and \(z\)) to be immediately eliminated from the calculation. Said differently, the preceding example is expressed with the minimum number of varying coordinates in the Cartesian system. Here’s a counter-example. If \({\mathcal C}\) had been a circle in the \(z=0\) plane, then the problem would have required two basis directions to be considered – namely, both \(x\) and \(y\). In this case, another system – namely, cylindrical coordinates (Section 4.3) – minimizes the number of varying coordinates (to just one, which is \(\phi\)).

    Integration Over Area

    Now we ask the question, what is the integral of some vector field \({\bf A}\) over some surface \({\mathcal S}\)? The answer is

    \[\int_{\mathcal S}{\mathbf{A} \cdot d\mathbf{s}} \label{m0004_eFlux} \]

    We refer to \(d\bf s\) as the differential surface element, which is a vector having magnitude equal to the differential area \(ds\), and is normal (perpendicular) to each point on the surface. There are actually two such directions. We’ll return to clear up the ambiguity in a moment. Now, as an example, if \(\bf A=\hat{\bf z}\) and \(\mathcal{S}\) is the surface bounded by \(x_1\le x \le x_2\), \(y_1\le y \le y_2\), then

    \[d{\bf s} = \hat{\bf z}~dx~dy \nonumber \]

    since \(dx\,dy\) is differential surface area in the \(z=0\) plane and \(\hat{\bf z}\) is normal to the \(z=0\) plane. So \(\mathbf {A} \cdot d\mathbf {s}=dx dy\), and subsequently the integral in Equation \ref{m0004_eFlux} becomes

    \[\int_{x_1}^{x_2}\int_{y_1}^{y_2}{dx~dy} = \left(x_2-x_1\right)\left(y_2-y_1\right) \nonumber \]

    Note that this has turned out to be a calculation of area.

    Once again, we see the Cartesian system was an appropriate choice for this example because this choice minimizes the number of varying coordinates; in the above example, the surface of integration is described by a constant value of \(z\) with variable values of \(x\) and \(y\). If the surface had instead been a cylinder or a sphere, not only would all three basis directions be variable, but also the surface normal would be variable, making the problem dramatically more complicated.

    Now let’s return to the issue of the direction of \(d{\bf s}\). We chose \(+\hat{\bf z}\), but why not choose \(-\hat{\bf z}\) – also a normal to the surface – as this direction? To answer simply, the resulting area would be negative. “Negative area” is the expected (“positive”) area, except with respect to the opposite-facing normal vector. In the present problem, the sign of the area is not important, but in some problems this sign becomes important. One example of a class of problems for which the sign of area is important is when the quantity of interest is a flux. If \({\bf A}\) were a flux density, then the integration over area that we just performed indicates the magnitude and direction of flux, and so the direction chosen for \(d{\bf s}\) defines the direction of positive flux. Section 2.4 describes the electric field in terms of a flux (i.e., as electric flux density \({\bf D}\)), in which case positive flux flows away from a positively-charged source.

    Integration Over Volume

    Another common task in vector analysis is integration of some quantity over a volume. Since the procedure is the same for scalar or vector quantities, we shall consider integration of a scalar quantity \(A(\bf r)\) for simplicity. First, we note that the contribution from a differential volume element

    \[dv = dx~dy~dz \nonumber \]

    is \(A(\mathbf{r})~dv\), so the integral over the volume \(\mathcal V\) is

    \[\int_{\mathcal V} A(\mathbf{r})~dv \nonumber \]

    For example, if \(A(\mathbf{r})=1\) and \(\mathcal{V}\) is a cube bounded by \(x_1\le x \le x_2\), \(y_1\le y \le y_2\), and \(z_1\le z \le z_2\), then the above integral becomes

    \[\int_{x_1}^{x_2}\int_{y_1}^{y_2}\int_{z_1}^{z_2}{dx~dy~dz} = \left(x_2-x_1\right)\left(y_2-y_1\right)\left(z_2-z_1\right) \nonumber \]

    i.e., this is a calculation of volume.

    The Cartesian system was an appropriate choice for this example because \({\mathcal V}\) is a cube, which is easy to describe in Cartesian coordinates and relatively difficult to describe in any other coordinate system.


    This page titled 4.2: Cartesian Coordinates is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Steven W. Ellingson (Virginia Tech Libraries' Open Education Initiative) .