Chapter 16Coordinate Systems and Basis Vectors
In the previous chapter we defined two kinds of multiplication for vectors regarded as “arrows” that have direction and magnitude: the inner product $\vec a\cdot\vec b$ (also called the dot product) and the cross product $\vec a\times\vec b$. In both cases, once we wrote $\vec a,\vec b$ concretely as ordered lists of numbers, as in the component representation $[a_1,a_2,a_3]$, we could compute mechanically. The component representation, however, is not something to be taken for granted. The three numbers $[a_1,a_2,a_3]$ are in fact nothing more than a “mixing recipe” that is stated relative to the vectors “that advance a unit length in the $x$-axis direction, the $y$-axis direction, and the $z$-axis direction”: it tells us how much we must stretch each of these three vectors, and then add them, to recover the vector $\vec a$. We call these three unit vectors that serve as the reference the basis vectors.
The choice of basis vectors, however, is not limited to three mutually perpendicular directions. To describe the velocity of water flowing inside a cylinder, calculations become much easier if we take as the basis the direction of the distance from the axis of the cylinder, the direction circling around the axis, and the direction along the axis. To treat the motion of a planet or the electron cloud around an atomic nucleus, it is more natural to take as the basis the direction of the distance from the center, the north–south direction, and the east–west direction. In this chapter, in addition to rectangular (Cartesian) coordinates, we introduce two curvilinear coordinate systems, cylindrical coordinates and spherical (polar) coordinates, and study systematically the properties of the basis vectors of each and the rules for converting between them and rectangular coordinates. In spherical coordinates in particular, we encounter a phenomenon not found in rectangular coordinates: the basis vectors themselves change direction from place to place. The technique of differentiating these “direction-changing basis vectors” is the foundation for the spherical-coordinate expressions of the gradient, divergence, and curl (and the Laplacian) that we study in later chapters, and it is the high point of this chapter.
- The basis vectors $\vec e_x,\vec e_y,\vec e_z$ of the rectangular coordinate system, and the relations among their cross products and inner products (the fact that the system is right-handed)
- The definition of the cylindrical coordinate system ($r,\varphi,z$), its basis vectors $\vec e_r,\vec e_\varphi,\vec e_z$, and conversion to and from rectangular coordinates
- The definition of the spherical coordinate system ($R,\theta,\varphi$), its basis vectors $\vec e_R,\vec e_\theta,\vec e_\varphi$, and conversion to and from rectangular coordinates
- The $3\times3$ matrices that represent rotations about the coordinate axes, and the composition of rotations by means of Euler angles
- The fact that the basis vectors $\vec e_R,\vec e_\theta,\vec e_\varphi$ of spherical coordinates change direction from place to place, and their partial derivatives with respect to $\theta,\varphi$
- The nabla operator expressed in spherical coordinates, $\nabla=\vec e_R\pdiff{}{R}+\dfrac1R\vec e_\theta\pdiff{}{\theta}+\dfrac{1}{R\sin\theta}\vec e_\varphi\pdiff{}{\varphi}$
- The velocity and acceleration of circular motion in polar coordinates (in the plane)—$V_r,V_\theta,A_r,A_\theta$
Source notes: Yasuhide Mochizuki, Mathematics Notes: Vector Analysis, pp. 7–16.
16.1 Rectangular (Cartesian) Coordinate Systems and Basis Vectors
The coordinates of the $xy$-plane and $xyz$-space that you became familiar with in junior high school and high school are, in fact, the simplest special case among “coordinate systems.” Let us first check the definition of this system carefully, following the wording of the original notes.
Definition 16.1: Rectangular (Cartesian) coordinate system
The position of a point in three-dimensional space can be expressed as the intersection of three planes: the plane $x=$ constant (the $x$-plane), the plane $y=$ constant (the $y$-plane), and the plane $z=$ constant (the $z$-plane). When these $x$-, $y$-, and $z$-planes are all mutually orthogonal, the coordinate system is called a rectangular coordinate system (also called a Cartesian coordinate system).
For example, the point $P(x_1,y_1,z_1)$ means the single point at which “the plane $x=x_1$,” “the plane $y=y_1$,” and “the plane $z=z_1$” intersect. It is precisely because the three planes are all mutually orthogonal that the triple of numbers $(x_1,y_1,z_1)$ alone determines exactly one point in space. This is what the notation “$(x,y,z)=(x_1,y_1,z_1)$,” which we have used without a second thought since junior high school, really means when viewed as a coordinate system.
Definition 16.2: Basis vectors and the position vector in rectangular coordinates
The three vectors of length 1 that are parallel to the three orthogonal coordinate directions (the positive directions of the $x$-axis, $y$-axis, and $z$-axis) are written $\vec e_x,\vec e_y,\vec e_z$ and called the basis vectors (also called the standard basis vectors). The word “basis” refers to a “foundation” in the sense that any vector can be expressed uniquely as a sum of real multiples of these three vectors. For a point $P(x_1,y_1,z_1)$, the vector $\overrightarrow{OP}$ from the origin $O$ to $P$ is called the position vector, and it is expressed as
\begin{equation} \overrightarrow{OP}=x_1\vec e_x+y_1\vec e_y+z_1\vec e_z=[x_1,y_1,z_1] \label{eq:16-position-cartesian} \end{equation}That is, the components $x_1,y_1,z_1$ of the position vector are the numbers that tell how far (in “magnitude,” that is, signed length) we must advance in the directions of the basis vectors $\vec e_x,\vec e_y,\vec e_z$, respectively, to reach the point $P$. The component notation $[a_1,a_2,a_3]$ that we used as a matter of course in the previous chapter is, in fact, nothing other than a shorthand that omits this decomposition into basis vectors.
The directions of the basis vectors $\vec e_x,\vec e_y,\vec e_z$ are chosen so that the thumb, index finger, and middle finger of the right hand can be aligned with the positive directions of the $x$-axis, $y$-axis, and $z$-axis, respectively (a right-handed system). Then, using the cross product and inner product studied in the previous chapter, the following relations hold.
Formula 16.1: Cross products and inner products of the rectangular basis vectors
$$ \vec e_x\times\vec e_y=\vec e_z,\qquad \vec e_y\times\vec e_z=\vec e_x,\qquad \vec e_z\times\vec e_x=\vec e_y, $$ $$ \vec e_x\cdot\vec e_y=0,\qquad \vec e_y\cdot\vec e_z=0,\qquad \vec e_z\cdot\vec e_x=0 . $$Why?: Why do we choose a right-handed system?
The direction of the cross product $\vec a\times\vec b$ was, by the formula of the previous chapter (the right-hand screw rule), the direction in which a right-handed screw advances when it is turned from $\vec a$ toward $\vec b$. The relation $\vec e_x\times\vec e_y=\vec e_z$ means that “turning a right-handed screw from the $x$-axis toward the $y$-axis advances it in the positive direction of the $z$-axis,” and this is exactly the definition of a right-handed system. If we used a left-handed system (a system whose coordinates are chosen so that $\vec e_x\times\vec e_y=-\vec e_z$), every formula for the cross product would change sign, which is a nuisance; therefore this book adopts the right-handed system throughout. The three equations for the inner product merely state that the three directions are mutually orthogonal.
In rectangular coordinates, the vector representing an infinitesimal displacement (a very small shift in position) and the infinitesimal volume also take the following simple forms. These serve as the reference for comparison with the corresponding quantities in cylindrical and spherical coordinates in the second half of this chapter, so we collect them first in the form of formulas.
Formula 16.2: Infinitesimal displacement vector and infinitesimal volume element in rectangular coordinates
Let $d\vec l$ denote the infinitesimal displacement vector when the coordinates change slightly from $(x,y,z)$ to $(x+dx,y+dy,z+dz)$, and let $dV$ denote the volume of the tiny rectangular box formed by its three edges. Then
$$ d\vec l=[dx,\ dy,\ dz],\qquad dV=dx\,dy\,dz . $$Intuition: Why is the volume a simple product?
In rectangular coordinates, the basis vectors $\vec e_x,\vec e_y,\vec e_z$ in the three directions keep the same direction and the same length at every point. Hence we obtain a rectangular box whose three mutually orthogonal edges have lengths $dx$, $dy$, and $dz$, and its volume is simply the product of the three edges, $dx\,dy\,dz$. This property that “the basis vectors are constant, independent of position” is in fact special to rectangular coordinates, and it fails in the cylindrical and spherical coordinates that we will see from the next section on (there the directions of the basis vectors change from point to point). This is the reason that extra factors such as $r$ and $R^2\sin\theta$ appear later in the formulas for the infinitesimal volume.
Example 16.1: Cross-product relation of the basis vectors and the distance between two points
Consider the points $A(2,0,0)$, $B(0,3,0)$, and $C(0,0,1)$. (a) Express $\overrightarrow{OA}$ and $\overrightarrow{OB}$ in terms of the basis vectors, and compute $\overrightarrow{OA}\times\overrightarrow{OB}$. Verify that the result points in the direction of $C$ (the direction of the $z$-axis). (b) Find the distance $|AB|$ between the two points $A,B$.
Solution. (a) We have $\overrightarrow{OA}=2\vec e_x$ and $\overrightarrow{OB}=3\vec e_y$. Using the bilinearity of the cross product (previous chapter) and $\vec e_x\times\vec e_y=\vec e_z$ from Formula 16.1, we obtain
$$ \overrightarrow{OA}\times\overrightarrow{OB}=(2\vec e_x)\times(3\vec e_y)=2\cdot3\,(\vec e_x\times\vec e_y)=6\vec e_z . $$Computing directly in components also gives $[2,0,0]\times[0,3,0]=[0\cdot0-0\cdot3,\ 0\cdot0-2\cdot0,\ 2\cdot3-0\cdot0]=[0,0,6]$, which agrees with this result. The vector $6\vec e_z$ points in the positive direction of the $z$-axis, which coincides exactly with the direction of $C(0,0,1)$ (the direction of $\overrightarrow{OC}=\vec e_z$). This is just what we expect from the property that the cross product is perpendicular to the plane spanned by the two vectors (here the $xy$-plane).
(b) Since $\overrightarrow{AB}=\overrightarrow{OB}-\overrightarrow{OA}=[0,3,0]-[2,0,0]=[-2,3,0]$, we have
$$ |AB|=\sqrt{(-2)^2+3^2+0^2}=\sqrt{4+9}=\sqrt{13} . $$(SymPy check: $\overrightarrow{OA}\times\overrightarrow{OB}=[0,0,6]$, $|AB|=\sqrt{13}$.)
16.2 Cylindrical Coordinate Systems — Basis Vectors and Conversion to Rectangular Coordinates
Rectangular coordinates are not universal. For example, when we consider water flowing through a cylindrical pipe, or the magnetic field produced around a current-carrying wire, it is easier to describe a position by three quantities—“the distance from the axis,” “the angle around the axis,” and “the height along the axis”—because the symmetry is then reflected directly in the equations and the calculations become simpler. This is the cylindrical coordinate system (also called cylindrical coordinates).
Definition 16.3: Cylindrical coordinate system
An arbitrary point $P(r_1,\varphi_1,z_1)$ in cylindrical coordinates is the point determined as the intersection of three surfaces: the plane $z=z_1$ parallel to the $xy$-plane; the half-plane that makes the angle $\varphi=\varphi_1$ with the $x$-axis in the $xy$-plane; and the cylindrical surface of radius $r=r_1$ whose central axis is the $z$-axis.
We write the basis vectors corresponding to these three directions as $\vec e_r,\vec e_\varphi,\vec e_z$. The vector $\vec e_r$ points away from the axis, $\vec e_\varphi$ points in the direction in which the angle $\varphi$ increases, and $\vec e_z$ points along the $z$-axis, which is shared with rectangular coordinates. Like $\vec e_x,\vec e_y,\vec e_z$ of rectangular coordinates, these are mutually orthogonal unit vectors, and since we choose them so that they form a right-handed system, relations of exactly the same form as in Formula 16.1 hold.
Formula 16.3: Cross products and inner products of the cylindrical basis vectors
$$ \vec e_r\times\vec e_\varphi=\vec e_z,\qquad \vec e_\varphi\times\vec e_z=\vec e_r,\qquad \vec e_z\times\vec e_r=\vec e_\varphi, $$ $$ \vec e_r\cdot\vec e_\varphi=0,\qquad \vec e_\varphi\cdot\vec e_z=0,\qquad \vec e_z\cdot\vec e_r=0 . $$In cylindrical coordinates, $r$ and $z$ inherently have the dimension of length, but the angle $\varphi$ does not. Hence, to convert the angle $\varphi$ into a length, we must multiply it by the radius $r$ (recall the relation $r\times2\pi=$ circumference). With this in mind, the infinitesimal displacement vector and the infinitesimal volume element become as follows.
Formula 16.4: Infinitesimal displacement vector and infinitesimal volume element in cylindrical coordinates
$$ d\vec l=\vec e_r\,dr+\vec e_\varphi\,r\,d\varphi+\vec e_z\,dz,\qquad dV=dr\cdot r\,d\varphi\cdot dz=r\,dr\,d\varphi\,dz . $$A vector $\vec A=A_r\vec e_r+A_\varphi\vec e_\varphi+A_z\vec e_z$ expressed in cylindrical coordinates can also be expressed in the rectangular form $A_x\vec e_x+A_y\vec e_y+A_z\vec e_z$.
Intuition: Cylindrical coordinates as a “code”
From the viewpoint of rectangular coordinates, we can think of the three numbers $(r,\varphi,z)$ of cylindrical coordinates as something like a different “code” for the same point. Even if we are handed the triple $(r,\varphi,z)$, from that alone we cannot tell at a glance what the $x,y$ coordinates in rectangular coordinates are. The transformation formulas we are about to derive are precisely the “decoding table” for deciphering that code and recovering the original $(x,y,z)$.
The component in the $\vec e_z$ direction is common to cylindrical and rectangular coordinates, so it remains only to find $A_x,A_y$. Recall that the number expressing “how much $\vec A$ contributes in the $\vec e_x$ direction” is the inner product $\vec A\cdot\vec e_x=A_x$.
$$ A_x=\vec A\cdot\vec e_x=A_r(\vec e_r\cdot\vec e_x)+A_\varphi(\vec e_\varphi\cdot\vec e_x)+A_z\underbrace{(\vec e_z\cdot\vec e_x)}_{=0(\because\text{orthogonality})}, $$ $$ A_y=\vec A\cdot\vec e_y=A_r(\vec e_r\cdot\vec e_y)+A_\varphi(\vec e_\varphi\cdot\vec e_y)+A_z\underbrace{(\vec e_z\cdot\vec e_y)}_{=0(\because\text{orthogonality})} . $$From Figure 16.5 (an enlarged view from the origin), we can read off the inner products between $\vec e_r,\vec e_\varphi$ and $\vec e_x,\vec e_y$ as cosines involving the angle $\varphi$. Since $\vec e_r$ points in the direction obtained by rotating $\vec e_x$ through the angle $\varphi$, we have $\vec e_r\cdot\vec e_x=\cos\varphi$; and since $\vec e_r$ points in the direction obtained by rotating $\vec e_y$ through the angle $\left(\frac\pi2-\varphi\right)$, we have $\vec e_r\cdot\vec e_y=\cos\!\left(\frac\pi2-\varphi\right)=\sin\varphi$. Similarly, since $\vec e_\varphi$ points in the direction obtained by rotating $\vec e_r$ through a further 90°, it is rotated from $\vec e_x$ through the angle $\left(\frac\pi2+\varphi\right)$, which gives
$$ \vec e_\varphi\cdot\vec e_x=\cos\!\left(\frac\pi2+\varphi\right)=-\sin\varphi,\qquad \vec e_\varphi\cdot\vec e_y=\cos\varphi $$Caution: On a statement in the original notes
At this point the source notes write $\vec e_\varphi\cdot\vec e_z=\cos\!\left(\frac\pi2+\varphi\right)=-\sin\varphi$. However, the right-hand side is a value that depends on $\varphi$, whereas $\vec e_\varphi\cdot\vec e_z=0$ is a relation that holds identically, independently of $\varphi$, as shown on the previous page (Formula 16.3); the two contradict each other. Moreover, what is needed for the computation of $A_x$ immediately following is $\vec e_\varphi\cdot\vec e_x$. For these reasons, we judged that $\vec e_\varphi\cdot\vec e_z$ is a slip of the pen for $\vec e_\varphi\cdot\vec e_x$, and this textbook presents the correct form ($\vec e_\varphi\cdot\vec e_x=-\sin\varphi$).
Substituting these into the expressions for $A_x,A_y$, we obtain the following transformation formula.
Formula 16.5: Transforming vector components from cylindrical to rectangular coordinates
$$ A_x=A_r\cos\varphi-A_\varphi\sin\varphi,\qquad A_y=A_r\sin\varphi+A_\varphi\cos\varphi, $$That is, in matrix form:
$$ \begin{bmatrix} A_x \\ A_y \\ A_z \end{bmatrix} =\begin{bmatrix} \cos\varphi & -\sin\varphi & 0 \\ \sin\varphi & \cos\varphi & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} A_r \\ A_\varphi \\ A_z \end{bmatrix} . $$Intuition: The upper-left $2\times2$ block is a rotation matrix
The upper-left $2\times2$ block $\begin{bmatrix}\cos\varphi&-\sin\varphi\\\sin\varphi&\cos\varphi\end{bmatrix}$ of the matrix above has exactly the same form as the “matrix that rotates by an angle $\varphi$ about the $z$-axis,” which we study in Section 16.4. This is no coincidence. The reason is that the cylindrical basis vectors $\vec e_r,\vec e_\varphi$ are nothing other than the rectangular basis vectors $\vec e_x,\vec e_y$ rotated about the $z$-axis by the angle $\varphi$. The fact that “rotating the coordinate system” and “transforming the components of a vector” can be written with one and the same matrix will appear many more times from now on, as an application of rotation matrices.
Finally, we collect the formulas that express a point $(r,\varphi,z)$ in cylindrical coordinates in terms of rectangular coordinates $(x,y,z)$. We may regard them as the $x,y$ components of the position vector $\overrightarrow{OP}=r\vec e_r+z\vec e_z$ (note that its $\varphi$ component is 0: the position vector from the origin can be written using only the radial direction and the height direction), written out with the help of $\vec e_r=\cos\varphi\,\vec e_x+\sin\varphi\,\vec e_y$.
Formula 16.6: Conversion between cylindrical and rectangular coordinates
$$ x=r\cos\varphi,\qquad y=r\sin\varphi,\qquad z=z . $$Illustration 16.1: Converting two points from cylindrical to rectangular coordinates and finding the distance (example from the original notes)
Express the two points $P_1\!\left(4,\dfrac\pi3,1\right)$ and $P_2(3,\pi,-1)$, given in cylindrical coordinates, in rectangular coordinates, and compute the distance between $P_1$ and $P_2$.
Solution. We use Formula 16.6. For $P_1$ we have $r=4,\varphi=\dfrac\pi3,z=1$, so
$$ x=4\cos\frac\pi3=4\times\frac12=2,\qquad y=4\sin\frac\pi3=4\times\frac{\sqrt3}{2}=2\sqrt3 . $$Hence $P_1(2,\ 2\sqrt3,\ 1)$. For $P_2$ we have $r=3,\varphi=\pi,z=-1$, so
$$ x=3\cos\pi=-3,\qquad y=3\sin\pi=0 . $$Hence $P_2(-3,\ 0,\ -1)$. Therefore the distance between the two points is
$$ \overline{P_1P_2}=\sqrt{(2-(-3))^2+(2\sqrt3-0)^2+(1-(-1))^2}=\sqrt{25+12+4}=\sqrt{41} . $$(SymPy check: $P_1=(2,2\sqrt3,1)$, $P_2=(-3,0,-1)$, distance $=\sqrt{41}$.)
Example 16.2: Converting from cylindrical to rectangular coordinates
Express the cylindrical coordinates $\left(2,\dfrac\pi6,3\right)$ in rectangular coordinates.
Solution. By Formula 16.6, substituting $r=2,\varphi=\dfrac\pi6,z=3$ gives
$$ x=2\cos\frac\pi6=2\times\frac{\sqrt3}{2}=\sqrt3,\qquad y=2\sin\frac\pi6=2\times\frac12=1,\qquad z=3 . $$Hence, in rectangular coordinates, the point is $(\sqrt3,\ 1,\ 3)$. (SymPy check: $(\sqrt3,1,3)$.)
Example 16.3: Checking the orthogonality of the cylindrical basis vectors in components
Express the cylindrical basis vectors $\vec e_r,\vec e_\varphi$ at $\varphi=\dfrac\pi6$ in terms of their rectangular components, and verify directly that $\vec e_r\cdot\vec e_\varphi=0$.
Solution. We have $\vec e_r=\cos\varphi\,\vec e_x+\sin\varphi\,\vec e_y=[\cos\varphi,\sin\varphi,0]$ and $\vec e_\varphi=-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y=[-\sin\varphi,\cos\varphi,0]$. Substituting $\varphi=\dfrac\pi6$, we obtain
$$ \vec e_r=\left[\frac{\sqrt3}{2},\ \frac12,\ 0\right],\qquad \vec e_\varphi=\left[-\frac12,\ \frac{\sqrt3}{2},\ 0\right] . $$Computing the inner product component by component,
$$ \vec e_r\cdot\vec e_\varphi=\frac{\sqrt3}{2}\times\left(-\frac12\right)+\frac12\times\frac{\sqrt3}{2}+0\times0=-\frac{\sqrt3}{4}+\frac{\sqrt3}{4}=0 . $$The two terms of opposite sign cancel and give exactly 0. The same holds for a general $\varphi$: the identity $\cos\varphi\times(-\sin\varphi)+\sin\varphi\times\cos\varphi=0$ holds identically (a direct check of Formula 16.3). (Checked with SymPy.)
16.3 Spherical Coordinate Systems (Polar Coordinates)—Basis Vectors and Conversion
Whereas cylindrical coordinates were based on the “distance from an axis,” spherical coordinates (also called polar coordinates) form a coordinate system based on the “distance from the origin (the center).” They arise naturally when we describe a position on the Earth by latitude, longitude, and altitude, or the state of an electron around an atomic nucleus (for example, the wave function of the hydrogen atom).
Definition 16.4: Spherical coordinate system
An arbitrary point $P(R_1,\theta_1,\varphi_1)$ in spherical coordinates is the point determined as the intersection of the following three surfaces: the sphere of radius $R=R_1$ centered at the origin; the conical surface on which the angle from the $z$-axis is $\theta=\theta_1$ ($\theta$ is the zenith angle, measured from the positive direction of the $z$-axis); and the half-plane on which the angle from the $x$-axis, measured in the $xy$-plane, is $\varphi=\varphi_1$ ($\varphi$ is the azimuthal angle).
The basis vectors $\vec e_R,\vec e_\theta,\vec e_\varphi$ of spherical coordinates are the unit vectors pointing, respectively, in the direction in which $R$ increases (the radial direction), the direction in which $\theta$ increases (southward, the direction in which the zenith angle opens), and the direction in which $\varphi$ increases (eastward, the direction in which the azimuthal angle increases). These, too, are mutually orthogonal and form a right-handed system.
Formula 16.7: Cross products and inner products of the spherical basis vectors
$$ \vec e_R\times\vec e_\theta=\vec e_\varphi,\qquad \vec e_\theta\times\vec e_\varphi=\vec e_R,\qquad \vec e_\varphi\times\vec e_R=\vec e_\theta, $$ $$ \vec e_R\cdot\vec e_\theta=0,\qquad \vec e_\theta\cdot\vec e_\varphi=0,\qquad \vec e_\varphi\cdot\vec e_R=0 . $$Using the basis vectors of spherical coordinates, an arbitrary vector $\vec A$ is expressed as $\vec A=A_R\vec e_R+A_\theta\vec e_\theta+A_\varphi\vec e_\varphi$.
Formula 16.8: Component representation of a vector in spherical coordinates
$$ \vec A=A_R\vec e_R+A_\theta\vec e_\theta+A_\varphi\vec e_\varphi . $$Here, $R$ has the dimension of length, but the zenith angle $\theta$ and the azimuthal angle $\varphi$ do not have the dimension of length. As in the case of cylindrical coordinates, to convert them into lengths we must multiply by a radius. In the $\theta$ direction the displacement runs along a circular arc of radius $R$, so it is $R\,d\theta$; in the $\varphi$ direction it runs along a circular arc of radius $R\sin\theta$ (note that the horizontal circle at the height reached by tilting through the angle $\theta$ from the $z$-axis has radius $R\sin\theta$), so it is $R\sin\theta\,d\varphi$.
Formula 16.9: Infinitesimal displacement vector and infinitesimal volume element in spherical coordinates
$$ d\vec l=\vec e_R\,dR+\vec e_\theta\,R\,d\theta+\vec e_\varphi\,R\sin\theta\,d\varphi,\qquad dV=R^2\sin\theta\,dR\,d\theta\,d\varphi . $$Finally, we collect the formulas that express a point $(R,\theta,\varphi)$ in spherical coordinates in terms of rectangular coordinates $(x,y,z)$. They are derived from the facts that the “horizontal extent” seen from the $z$-axis is $R\sin\theta$ (see the schematic illustration in the center of Figure 16.6) and that the $z$ component is $R\cos\theta$, by way of the conversion formulas for cylindrical coordinates (Formula 16.6, with $r\to R\sin\theta$ substituted).
Formula 16.10: Conversion between spherical and rectangular coordinates
$$ x=R\sin\theta\cos\varphi,\qquad y=R\sin\theta\sin\varphi,\qquad z=R\cos\theta . $$Example 16.4: Converting from spherical to rectangular coordinates
Express the spherical coordinates $\left(2,\dfrac\pi3,\dfrac\pi4\right)$ (in the order $R,\theta,\varphi$) in rectangular coordinates.
Solution. Substitute $R=2,\theta=\dfrac\pi3,\varphi=\dfrac\pi4$ into Formula 16.10. Noting that $\sin\dfrac\pi3=\dfrac{\sqrt3}{2}$, $\cos\dfrac\pi3=\dfrac12$, and $\cos\dfrac\pi4=\sin\dfrac\pi4=\dfrac{1}{\sqrt2}$, we obtain
$$ x=2\times\frac{\sqrt3}{2}\times\frac{1}{\sqrt2}=\frac{\sqrt3}{\sqrt2}=\frac{\sqrt6}{2},\qquad y=2\times\frac{\sqrt3}{2}\times\frac{1}{\sqrt2}=\frac{\sqrt6}{2},\qquad z=2\times\frac12=1 . $$Hence, in rectangular coordinates, the point is $\left(\dfrac{\sqrt6}{2},\ \dfrac{\sqrt6}{2},\ 1\right)$. That $x=y$ is reasonable, because $\varphi=\pi/4$ is exactly the direction halfway between the $x$-axis and the $y$-axis. (SymPy check: $(\sqrt6/2,\sqrt6/2,1)$.)
Example 16.5: Checking the orthogonality of the spherical basis vectors numerically
At $\theta=\dfrac\pi4,\ \varphi=\dfrac\pi3$, express the basis vectors $\vec e_R,\vec e_\theta,\vec e_\varphi$ of spherical coordinates as linear combinations of the basis $\vec e_x,\vec e_y,\vec e_z$ of rectangular coordinates, and verify that any two of them are orthogonal (that is, that their inner product is 0). (The general formulas expressing $\vec e_R,\vec e_\theta,\vec e_\varphi$ in terms of $\vec e_x,\vec e_y,\vec e_z$ are given in Formula 16.12 of Section 16.5.)
Solution. Using Formula 16.12 in advance, we have
$$ \vec e_R=\sin\theta\cos\varphi\,\vec e_x+\sin\theta\sin\varphi\,\vec e_y+\cos\theta\,\vec e_z, $$ $$ \vec e_\theta=\cos\theta\cos\varphi\,\vec e_x+\cos\theta\sin\varphi\,\vec e_y-\sin\theta\,\vec e_z, $$ $$ \vec e_\varphi=-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y . $$Substituting $\theta=\pi/4$ ($\sin\theta=\cos\theta=1/\sqrt2$) and $\varphi=\pi/3$ ($\cos\varphi=1/2,\ \sin\varphi=\sqrt3/2$), we obtain
$$ \vec e_R=\left[\frac{\sqrt2}{4},\ \frac{\sqrt6}{4},\ \frac{\sqrt2}{2}\right],\quad \vec e_\theta=\left[\frac{\sqrt2}{4},\ \frac{\sqrt6}{4},\ -\frac{\sqrt2}{2}\right],\quad \vec e_\varphi=\left[-\frac{\sqrt3}{2},\ \frac12,\ 0\right] . $$We can confirm that all three vectors have magnitude 1 (for example, $|\vec e_R|^2=\frac18+\frac{6}{16}+\frac12=\frac2{16}+\frac6{16}+\frac8{16}=1$). Computing the inner products, we get
$$ \vec e_R\cdot\vec e_\theta=\frac{2}{16}+\frac{6}{16}-\frac12=\frac{8}{16}-\frac12=0, $$ $$ \vec e_\theta\cdot\vec e_\varphi=\frac{\sqrt2}{4}\times\left(-\frac{\sqrt3}{2}\right)+\frac{\sqrt6}{4}\times\frac12+\left(-\frac{\sqrt2}{2}\right)\times0=-\frac{\sqrt6}{8}+\frac{\sqrt6}{8}=0, $$ $$ \vec e_\varphi\cdot\vec e_R=-\frac{\sqrt3}{2}\times\frac{\sqrt2}{4}+\frac12\times\frac{\sqrt6}{4}+0=-\frac{\sqrt6}{8}+\frac{\sqrt6}{8}=0 . $$All of them are 0, so we have confirmed with concrete numbers that the three vectors are mutually orthogonal. (Checked with SymPy.)
16.4 Rotation Matrices of Coordinate Axes and Euler Angles
In the preceding sections, it has come up again and again that the basis vectors of cylindrical and spherical coordinates are obtained by rotating the basis vectors of rectangular coordinates (for example, the upper-left block of Formula 16.5). In this section, therefore, we take up the operation of rotating the coordinate axes themselves head-on, using the tool of matrices. This is a common foundation both for deriving the basis vectors of spherical coordinates systematically in the next section, Section 16.5, and for treating the rotation of rigid bodies and the symmetry operations of crystal structures in later chapters.
Theorem 16.1: Rotation matrix about the $z$-axis
The transformation that rotates the $xyz$ coordinate system about the $z$-axis by an angle $\theta$ is represented by the following matrix $R_z(\theta)$.
$$ R_z(\theta)=\begin{bmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix} . $$Derivation: Verifying that $R_z(\theta)$ is correct
A rotation about the $z$-axis leaves the $z$ coordinate unchanged and is itself a rotation within the $xy$-plane. Suppose that a point $(x,y)$ in the $xy$-plane lies at distance $\rho$ from the origin and makes an angle $\alpha$ with the $x$-axis; then we can write $x=\rho\cos\alpha,\ y=\rho\sin\alpha$. If we rotate this point by the angle $\theta$, the new point $(x',y')$ stays at the same distance $\rho$ while its angle becomes $\alpha+\theta$, so
$$ x'=\rho\cos(\alpha+\theta),\qquad y'=\rho\sin(\alpha+\theta) . $$Expanding with the addition formulas that we learned in High School Mathematics (AD 01, Chapter 5), we get
$$ x'=\rho(\cos\alpha\cos\theta-\sin\alpha\sin\theta)=x\cos\theta-y\sin\theta, $$ $$ y'=\rho(\sin\alpha\cos\theta+\cos\alpha\sin\theta)=x\sin\theta+y\cos\theta $$(here we substituted $\rho\cos\alpha=x,\ \rho\sin\alpha=y$). Combining these with $z'=z$ and writing the result in matrix form, we obtain exactly the expression stated for $R_z(\theta)$.
∎
Carrying out the same argument for the rotation within the $xz$-plane (about the $y$-axis) and the rotation within the $yz$-plane (about the $x$-axis), we obtain the following two results.
Theorem 16.2: Rotation matrix about the $x$-axis
$$ R_x(\theta)=\begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{bmatrix} . $$Theorem 16.3: Rotation matrix about the $y$-axis
$$ R_y(\theta)=\begin{bmatrix} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\ -\sin\theta & 0 & \cos\theta \end{bmatrix} . $$Caution: On the sign of $R_y(\theta)$ in the original notes
In the original notes, $R_y(\theta)=\begin{bmatrix}\cos\theta&0&-\sin\theta\\0&1&0\\\sin\theta&0&\cos\theta\end{bmatrix}$, so the signs of $\sin\theta$ are opposite to those above. Comparing $R_x(\theta)$ and $R_z(\theta)$, we see that $\sin\theta$ follows a cyclic sign pattern along $x\to y\to z\to x$: it carries $+$ in the entry whose axis number is one step later and $-$ in the entry whose axis number is one step earlier ($R_x$: the $(2,3)$ entry is $-\sin\theta$ and the $(3,2)$ entry is $+\sin\theta$; $R_z$: the $(1,2)$ entry is $-\sin\theta$ and the $(2,1)$ entry is $+\sin\theta$). Only the $R_y(\theta)$ of the original notes has this pattern reversed, so we can conclude that the signs were assigned by mistake. The correct signs (the form shown above) can also be confirmed by checking with SymPy that $R_x,R_y,R_z$ are all rotation matrices, that is, orthogonal matrices ($R^{\mathrm T}R=I$) with determinant $+1$.
Intuition: Why does only the $y$-axis seem to have a different sign?
If we apply the operation of shifting the indices by one, $x\to y\to z\to x$ (a cyclic permutation), to the expression for $R_x(\theta)$, then the replacement $1\to2\to3\to1$ should turn the expression for $R_x(\theta)$ directly into the expression for $R_y(\theta)$. However, if we derive $R_y(\theta)$ naively as a “rotation within the $xz$-plane,” the direction of the angle measured from $x$ to $z$ is, within a right-handed system, reversed once compared with the cases from $y$ to $z$ and from $z$ to $x$ (in the arrangement $x,y,z$, the order $z,x$ is cyclic, but the order $x,z$ is not). As a result, only $R_y(\theta)$ ends up with the sign of $\sin\theta$ flipped. This phenomenon of “the $y$-axis alone being treated specially” shows up in every situation that deals with rotations, such as Euler angles and Rodrigues's rotation formula, so it is a good idea to remember it now, together with the sign pattern.
By combining the three rotation matrices $R_x,R_y,R_z$, we can represent a rotation of any orientation in space. In practice, a single rotation is often specified in three stages: “by an angle $\alpha$ about the $z$-axis,” “by an angle $\beta$ about the new $y$-axis (the $y'$-axis),” and “by an angle $\gamma$ about the further new $z$-axis (the $z''$-axis).” These three angles $(\alpha,\beta,\gamma)$ are called the Euler angles. The original notes end here after merely introducing the name Euler angles, so, as a textbook, let us complete the formula that composes the three-stage rotation.
Formula 16.11: Composition of rotations by Euler angles ($z$–$y$–$z$ sequence)
The rotation by the Euler angles $(\alpha,\beta,\gamma)$ is given by the matrix product
$$ R(\alpha,\beta,\gamma)=R_z(\alpha)\,R_y(\beta)\,R_z(\gamma) $$Since all three factors are rotation matrices (orthogonal matrices with determinant 1), their product $R(\alpha,\beta,\gamma)$ is also a rotation matrix.
Why?: Mind the order of the matrix product
Matrix multiplication is not commutative in general (as we learned in a previous chapter). In composing the Euler angles, we first apply $R_z(\gamma)$, then apply $R_y(\beta)$ to the result, and finally apply $R_z(\alpha)$, so the transformation of a vector $\vec v$ takes the form $R(\alpha,\beta,\gamma)\vec v=R_z(\alpha)\big(R_y(\beta)(R_z(\gamma)\vec v)\big)$, in which the factors act in order from the right. Note that if we mix up the axis about which we rotate, or the order of the rotations, we get a completely different rotation.
Why?: Why do the “moving axes” description and the “fixed axes” matrix agree?
Reading the explanation in the main text carefully, we find a slightly puzzling point. In the explanation of the Euler angles, the three-stage rotation was specified relative to the coordinate axes as they move at each step: “by an angle $\alpha$ about the $z$-axis,” “by an angle $\beta$ about the new $y$-axis (the $y'$-axis),” and “by an angle $\gamma$ about the further new $z$-axis (the $z''$-axis)” (this way of specifying a rotation relative to the axes as moved by the preceding rotation is called intrinsic rotation). However, $R(\alpha,\beta,\gamma)=R_z(\alpha)R_y(\beta)R_z(\gamma)$ in Formula 16.11 is a product of matrices defined solely relative to the original $x,y,z$ axes, which never move from beginning to end (this way of specifying a rotation relative only to axes that do not move is called extrinsic rotation). That the intrinsic specification, “relative to the moving axes, first $\gamma$, then $\beta$, and finally $\alpha$,” and the extrinsic specification, “relative to the fixed axes, multiply the matrices $R_z(\alpha)$, $R_y(\beta)$, $R_z(\gamma)$ in this order from the left,” represent one and the same rotation is a well-known fact, but it is not so obvious that it can be accepted without proof. In this book we do not go as far as a general proof of this equivalence, but in the next section, Section 16.5, the component-level computation of $R_z(\varphi)R_y(\theta)\,\vec e_z=\vec e_R$ that uses precisely this formula serves as one concrete verification of this correspondence.
In fact, this composition of Euler angles is directly connected with the basis vectors of spherical coordinates that we study in the next section. If we rotate the unit vector $\vec e_z=[0,0,1]$ in the direction of the $z$-axis, first about the $y$-axis by an angle $\theta$ ($R_y(\theta)$), and then about the $z$-axis by an angle $\varphi$ ($R_z(\varphi)$), we obtain
$$ R_z(\varphi)R_y(\theta)\,\vec e_z=\big[\sin\theta\cos\varphi,\ \sin\theta\sin\varphi,\ \cos\theta\big]=\vec e_R $$that is, exactly the basis vector $\vec e_R$ of spherical coordinates in the radial direction (checked with SymPy). In the next section, taking this fact as the starting point, we systematically derive the matrix that expresses $\vec e_R,\vec e_\theta,\vec e_\varphi$ in terms of the basis of rectangular coordinates.
Example 16.6: Finding the image of a point under a rotation about the $z$-axis
Find the image of the point $(1,0,0)$ when it is rotated about the $z$-axis by $\dfrac\pi2$.
Solution. Substituting $\theta=\dfrac\pi2$ ($\cos\dfrac\pi2=0,\ \sin\dfrac\pi2=1$) into $R_z(\theta)$ of Theorem 16.1, we get
$$ R_z\!\left(\frac\pi2\right)=\begin{bmatrix}0&-1&0\\1&0&0\\0&0&1\end{bmatrix} . $$Applying this to the point $(1,0,0)$ (the column vector $[1,0,0]^{\mathrm T}$), we get
$$ R_z\!\left(\frac\pi2\right)\begin{bmatrix}1\\0\\0\end{bmatrix}=\begin{bmatrix}0\times1-1\times0+0\times0\\1\times1+0\times0+0\times0\\0\times1+0\times0+1\times0\end{bmatrix}=\begin{bmatrix}0\\1\\0\end{bmatrix} . $$Hence the image is $(0,1,0)$. This agrees with our intuition: rotating a point on the $x$-axis by $90°$ about the $z$-axis moves it onto the $y$-axis. (Checked with SymPy.)
16.5 Orthogonality and Partial Derivatives of the Spherical Basis Vectors, and the Nabla Operator
Here we come to the climax of this chapter. The basis vectors $\vec e_x,\vec e_y,\vec e_z$ of rectangular coordinates were constant vectors whose directions do not change anywhere in space. The basis vectors $\vec e_R,\vec e_\theta,\vec e_\varphi$ of spherical coordinates, however, change their very directions every time the position of the point (the angles $\theta,\varphi$) changes. For example, on a globe, “south” (which corresponds to $\vec e_\theta$) points in completely different directions on the equator and at a place near the North Pole. Mastering the technique of differentiating these “basis vectors that change direction” is the key to expressing the gradient, divergence, and curl in spherical coordinates.
16.5.1 Expressing $\vec e_R,\vec e_\theta,\vec e_\varphi$ in terms of the rectangular basis
At the end of the previous section we saw that rotating $\vec e_z$ about the $y$-axis through the angle $\theta$, and then about the $z$-axis through the angle $\varphi$, gives $\vec e_R$. Applying the same rotation $R_z(\varphi)R_y(\theta)$ to $\vec e_x=[1,0,0]$ and $\vec e_y=[0,1,0]$ as well gives $\vec e_\theta,\vec e_\varphi$.
Derivation: Formula 16.12 (as a product of rotation matrices)
Multiplying together the matrices $R_z(\varphi),R_y(\theta)$ of Theorems 16.1 and 16.3 gives
$$ R_z(\varphi)R_y(\theta)=\begin{bmatrix}\cos\varphi&-\sin\varphi&0\\\sin\varphi&\cos\varphi&0\\0&0&1\end{bmatrix}\begin{bmatrix}\cos\theta&0&\sin\theta\\0&1&0\\-\sin\theta&0&\cos\theta\end{bmatrix} =\begin{bmatrix}\cos\varphi\cos\theta&-\sin\varphi&\cos\varphi\sin\theta\\\sin\varphi\cos\theta&\cos\varphi&\sin\varphi\sin\theta\\-\sin\theta&0&\cos\theta\end{bmatrix} $$(each entry was computed directly from the definition of the matrix product). Applying this matrix in turn to $\vec e_x=[1,0,0]^{\mathrm T}$, $\vec e_y=[0,1,0]^{\mathrm T}$, and $\vec e_z=[0,0,1]^{\mathrm T}$ picks out the first, second, and third columns, respectively.
$$ R_z(\varphi)R_y(\theta)\,\vec e_x=\big[\cos\theta\cos\varphi,\ \cos\theta\sin\varphi,\ -\sin\theta\big]=\vec e_\theta, $$ $$ R_z(\varphi)R_y(\theta)\,\vec e_y=\big[-\sin\varphi,\ \cos\varphi,\ 0\big]=\vec e_\varphi, $$ $$ R_z(\varphi)R_y(\theta)\,\vec e_z=\big[\sin\theta\cos\varphi,\ \sin\theta\sin\varphi,\ \cos\theta\big]=\vec e_R $$(SymPy check: we confirmed that the three columns agree with $\vec e_\theta,\vec e_\varphi,\vec e_R$, respectively.) Rewriting this in a form in which $\vec e_R,\vec e_\theta,\vec e_\varphi$ are arranged as rows, we obtain the following formula.
∎
Formula 16.12: The spherical basis vectors in terms of the rectangular basis
$$ \begin{bmatrix}\vec e_R\\\vec e_\theta\\\vec e_\varphi\end{bmatrix} =\begin{bmatrix}\sin\theta\cos\varphi&\sin\theta\sin\varphi&\cos\theta\\\cos\theta\cos\varphi&\cos\theta\sin\varphi&-\sin\theta\\-\sin\varphi&\cos\varphi&0\end{bmatrix} \begin{bmatrix}\vec e_x\\\vec e_y\\\vec e_z\end{bmatrix}, $$that is, written out component by component,
$$ \begin{cases} \vec e_R=\sin\theta\cos\varphi\,\vec e_x+\sin\theta\sin\varphi\,\vec e_y+\cos\theta\,\vec e_z\\ \vec e_\theta=\cos\theta\cos\varphi\,\vec e_x+\cos\theta\sin\varphi\,\vec e_y-\sin\theta\,\vec e_z\\ \vec e_\varphi=-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y\ (+0\cdot\vec e_z) \end{cases} $$Using this formula, let us check, one at a time, the computations that correspond to Problems 1–5 of the original notes.
16.5.2 Checking orthogonality (Problem 1)
Theorem 16.4: Orthogonality of the spherical basis vectors
Any two of the vectors $\vec e_R,\vec e_\theta,\vec e_\varphi$ are orthogonal to each other. That is, $\vec e_R\cdot\vec e_\theta=0,\ \vec e_\theta\cdot\vec e_\varphi=0,\ \vec e_\varphi\cdot\vec e_R=0$.
Proof (Problem 1 and Solution 1 in the original notes)
Substitute Formula 16.12 component by component, and use the fact that $\vec e_x,\vec e_y,\vec e_z$ are mutually orthogonal unit vectors ($|\vec e_x|=|\vec e_y|=|\vec e_z|=1$, and the inner product of two of them with different subscripts is 0). First, computing $\vec e_R\cdot\vec e_\theta$, we get
$$ \vec e_R\cdot\vec e_\theta=(\sin\theta\cos\varphi)(\cos\theta\cos\varphi)|\vec e_x|^2+(\sin\theta\sin\varphi)(\cos\theta\sin\varphi)|\vec e_y|^2+(\cos\theta)(-\sin\theta)|\vec e_z|^2 $$ $$ =\sin\theta\cos\theta\cos^2\varphi+\sin\theta\cos\theta\sin^2\varphi-\sin\theta\cos\theta $$ $$ =\sin\theta\cos\theta(\cos^2\varphi+\sin^2\varphi)-\sin\theta\cos\theta=\sin\theta\cos\theta-\sin\theta\cos\theta=0 . $$Next, for $\vec e_\theta\cdot\vec e_\varphi$, noting that $\vec e_\varphi$ has no $\vec e_z$ component, we get
$$ \vec e_\theta\cdot\vec e_\varphi=(\cos\theta\cos\varphi)(-\sin\varphi)|\vec e_x|^2+(\cos\theta\sin\varphi)(\cos\varphi)|\vec e_y|^2+(-\sin\theta)(0) =-\cos\theta\sin\varphi\cos\varphi+\cos\theta\sin\varphi\cos\varphi=0 . $$Finally, for $\vec e_\varphi\cdot\vec e_R$, in the same way,
$$ \vec e_\varphi\cdot\vec e_R=(-\sin\varphi)(\sin\theta\cos\varphi)|\vec e_x|^2+(\cos\varphi)(\sin\theta\sin\varphi)|\vec e_y|^2+0 =-\sin\theta\sin\varphi\cos\varphi+\sin\theta\sin\varphi\cos\varphi=0 . $$In every case, the two terms with opposite signs cancel exactly and the result is 0. (Checked with SymPy.)
∎
Caution: On the computation in the original notes
The computation of $\vec e_R\cdot\vec e_\theta$ in the source notes contains a slip: the second term is written as $\sin\theta\cos\varphi\sin^2\varphi$ (where $\cos\varphi$ appears in the place that should have $\cos\theta$). The conclusion itself, that the expression finally comes to 0 after factoring, is nevertheless correct, and this textbook shows the computation with the correct intermediate expressions. Also, in the computation of $\vec e_\varphi\cdot\vec e_R$, the exponent of $|\vec e_x|$ in the first term is written as “3”; since this is an exponent on $|\vec e_x|=1$ it does no real harm, but the correct exponent is “2,” the same as in the other terms.
16.5.3 Partial derivatives with respect to $\theta,\varphi$ (Problem 2)
Since $\vec e_R,\vec e_\theta,\vec e_\varphi$ are functions of $\theta,\varphi$ (they do not depend on $R$), we can differentiate them partially with respect to $\theta,\varphi$. We differentiate each component of Formula 16.12 directly with respect to $\theta$ or $\varphi$, and then reread the resulting vector once again as a combination of $\vec e_R,\vec e_\theta,\vec e_\varphi$.
Derivation: The six partial derivatives (Problem 2 and Solution 2 in the original notes)
(1) $\dfrac{\partial\vec e_R}{\partial\theta}$: Differentiating the expression for $\vec e_R$ in Formula 16.12 partially with respect to $\theta$, we get
$$ \frac{\partial\vec e_R}{\partial\theta}=\cos\theta\cos\varphi\,\vec e_x+\cos\theta\sin\varphi\,\vec e_y-\sin\theta\,\vec e_z . $$The right-hand side is exactly the expression for $\vec e_\theta$ in Formula 16.12. Therefore $\dfrac{\partial\vec e_R}{\partial\theta}=\vec e_\theta$.
(2) $\dfrac{\partial\vec e_R}{\partial\varphi}$: This time, differentiating partially with respect to $\varphi$, we get
$$ \frac{\partial\vec e_R}{\partial\varphi}=-\sin\theta\sin\varphi\,\vec e_x+\sin\theta\cos\varphi\,\vec e_y+0\cdot\vec e_z=\sin\theta\,(-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y)=\sin\theta\,\vec e_\varphi $$(we factored out the common factor, using the fact that the expression in parentheses is exactly the expression for $\vec e_\varphi$ in Formula 16.12). Therefore $\dfrac{\partial\vec e_R}{\partial\varphi}=\sin\theta\,\vec e_\varphi$.
(3) $\dfrac{\partial\vec e_\theta}{\partial\theta}$: Differentiating $\vec e_\theta=\cos\theta\cos\varphi\,\vec e_x+\cos\theta\sin\varphi\,\vec e_y-\sin\theta\,\vec e_z$ partially with respect to $\theta$, we get
$$ \frac{\partial\vec e_\theta}{\partial\theta}=-\sin\theta\cos\varphi\,\vec e_x-\sin\theta\sin\varphi\,\vec e_y-\cos\theta\,\vec e_z=-(\sin\theta\cos\varphi\,\vec e_x+\sin\theta\sin\varphi\,\vec e_y+\cos\theta\,\vec e_z)=-\vec e_R . $$(We used the fact that the expression in parentheses is exactly the expression for $\vec e_R$ in Formula 16.12.) Therefore $\dfrac{\partial\vec e_\theta}{\partial\theta}=-\vec e_R$.
(4) $\dfrac{\partial\vec e_\theta}{\partial\varphi}$: Differentiating $\vec e_\theta$ partially with respect to $\varphi$, we get
$$ \frac{\partial\vec e_\theta}{\partial\varphi}=-\cos\theta\sin\varphi\,\vec e_x+\cos\theta\cos\varphi\,\vec e_y=\cos\theta\,(-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y)=\cos\theta\,\vec e_\varphi . $$Therefore $\dfrac{\partial\vec e_\theta}{\partial\varphi}=\cos\theta\,\vec e_\varphi$.
(5) $\dfrac{\partial\vec e_\varphi}{\partial\theta}$: Since $\theta$ does not appear in $\vec e_\varphi=-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y$,
$$ \frac{\partial\vec e_\varphi}{\partial\theta}=0 . $$(6) $\dfrac{\partial\vec e_\varphi}{\partial\varphi}$: Differentiating $\vec e_\varphi$ partially with respect to $\varphi$, we get
$$ \frac{\partial\vec e_\varphi}{\partial\varphi}=-\cos\varphi\,\vec e_x-\sin\varphi\,\vec e_y . $$We want to express this as a combination of $\vec e_R,\vec e_\theta$. Looking at the $\vec e_z$ components of the expressions for $\vec e_R,\vec e_\theta$ in Formula 16.12, the $\vec e_z$ component of $-\sin\theta\,\vec e_R-\cos\theta\,\vec e_\theta$ is $-\sin\theta\cos\theta-\cos\theta(-\sin\theta)=0$, which is consistent with the present expression, which has no $\vec e_z$ component. When we actually compare the $x,y$ components as well, we find
$$ -\sin\theta\,\vec e_R-\cos\theta\,\vec e_\theta=-\sin\theta(\sin\theta\cos\varphi\,\vec e_x+\sin\theta\sin\varphi\,\vec e_y+\cos\theta\,\vec e_z)-\cos\theta(\cos\theta\cos\varphi\,\vec e_x+\cos\theta\sin\varphi\,\vec e_y-\sin\theta\,\vec e_z) $$ $$ =-(\sin^2\theta+\cos^2\theta)\cos\varphi\,\vec e_x-(\sin^2\theta+\cos^2\theta)\sin\varphi\,\vec e_y+(-\sin\theta\cos\theta+\sin\theta\cos\theta)\vec e_z=-\cos\varphi\,\vec e_x-\sin\varphi\,\vec e_y $$which indeed agrees with $\dfrac{\partial\vec e_\varphi}{\partial\varphi}$. Therefore $\dfrac{\partial\vec e_\varphi}{\partial\varphi}=-\sin\theta\,\vec e_R-\cos\theta\,\vec e_\theta$.
∎
Caution: On the computation in the original notes
In parts (1) and (2) of the source notes, the expression immediately after differentiation is already written in terms of $\vec e_R,\vec e_\theta,\vec e_\varphi$ (the spherical basis). What actually appears immediately after differentiating Formula 16.12 with respect to $\theta$ or $\varphi$, however, is a linear combination of $\vec e_x,\vec e_y,\vec e_z$ (the rectangular basis), and the order of events is that one “notices” $\vec e_\theta$ or $\vec e_\varphi$ only after comparing the two. In this textbook, so that this process of noticing can be seen, we have written out the intermediate expressions in the rectangular basis. Also, in the concluding part of (6), the source notes have $-\sin\theta\,\vec e_R-\cos\theta\,\vec e_\varphi$, but we judged the subscript of the second term on the right-hand side to be a slip for $\vec e_\theta$, on the basis of consistency with the context of Problem 1 on page 14.14 (p013) and with the other expressions on p014.
Formula 16.13: Partial derivatives of the spherical basis vectors
$$ \pdiff{\vec e_R}{\theta}=\vec e_\theta,\qquad \pdiff{\vec e_R}{\varphi}=\sin\theta\,\vec e_\varphi,\qquad \pdiff{\vec e_\theta}{\theta}=-\vec e_R, $$ $$ \pdiff{\vec e_\theta}{\varphi}=\cos\theta\,\vec e_\varphi,\qquad \pdiff{\vec e_\varphi}{\theta}=0,\qquad \pdiff{\vec e_\varphi}{\varphi}=-\sin\theta\,\vec e_R-\cos\theta\,\vec e_\theta . $$Example 16.7: Numerical check of $\partial\vec e_R/\partial\theta$ and $\partial\vec e_R/\partial\varphi$
At $\theta=\dfrac\pi3,\ \varphi=\dfrac\pi4$, find $\dfrac{\partial\vec e_R}{\partial\theta}$ and $\dfrac{\partial\vec e_R}{\partial\varphi}$ in terms of rectangular components, and verify that they agree with Formula 16.13 ($\vec e_\theta$ and $\sin\theta\,\vec e_\varphi$, respectively).
Solution. By Formula 16.12, $\vec e_\theta=\cos\theta\cos\varphi\,\vec e_x+\cos\theta\sin\varphi\,\vec e_y-\sin\theta\,\vec e_z$. Substituting $\theta=\pi/3$ ($\cos\theta=1/2,\sin\theta=\sqrt3/2$) and $\varphi=\pi/4$ ($\cos\varphi=\sin\varphi=1/\sqrt2$), we get
$$ \vec e_\theta=\frac12\cdot\frac{1}{\sqrt2}\,\vec e_x+\frac12\cdot\frac1{\sqrt2}\,\vec e_y-\frac{\sqrt3}{2}\,\vec e_z=\left[\frac{\sqrt2}{4},\ \frac{\sqrt2}{4},\ -\frac{\sqrt3}{2}\right] . $$On the other hand, since $\dfrac{\partial\vec e_R}{\partial\theta}=\vec e_\theta$ by Formula 16.13, this value is the answer as it stands. Next we compute $\dfrac{\partial\vec e_R}{\partial\varphi}=\sin\theta\,\vec e_\varphi$. We have $\vec e_\varphi=-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y=\left[-\frac{1}{\sqrt2},\frac1{\sqrt2},0\right]$, and multiplying by $\sin\theta=\sqrt3/2$ gives
$$ \frac{\partial\vec e_R}{\partial\varphi}=\frac{\sqrt3}{2}\left[-\frac1{\sqrt2},\ \frac1{\sqrt2},\ 0\right]=\left[-\frac{\sqrt6}{4},\ \frac{\sqrt6}{4},\ 0\right] . $$If we compare these with the result of differentiating $\vec e_R=\sin\theta\cos\varphi\,\vec e_x+\sin\theta\sin\varphi\,\vec e_y+\cos\theta\,\vec e_z$ of Formula 16.12 directly with respect to $\theta,\varphi$, we also obtain the same values, $\left[\frac{\sqrt2}{4},\frac{\sqrt2}{4},-\frac{\sqrt3}{2}\right]$ and $\left[-\frac{\sqrt6}{4},\frac{\sqrt6}{4},0\right]$. (Checked with SymPy.)
16.5.4 Total differential of the position vector (Problem 3)
In spherical coordinates, the position vector of a point can be written as $\vec r=R\vec e_R$ (note that it has no component in the $\theta,\varphi$ directions and can be written with the radial direction alone). Let us find the change $d\vec r$ of $\vec r$ when $R,\theta,\varphi$ change by $dR,d\theta,d\varphi$, respectively.
Derivation: $d\vec r$ (Problem 3 and Solution 3 in the original notes)
Using the rule for differentiating a product (Leibniz's rule, which we learned in the previous volume, Calculus), we have
$$ d\vec r=d(R\vec e_R)=dR\,\vec e_R+R\,d\vec e_R . $$Here $\vec e_R$ is a function of $\theta,\varphi$, so its total differential is
$$ d\vec e_R=\pdiff{\vec e_R}{\theta}d\theta+\pdiff{\vec e_R}{\varphi}d\varphi . $$Substituting Formula 16.13 ($\partial\vec e_R/\partial\theta=\vec e_\theta$ and $\partial\vec e_R/\partial\varphi=\sin\theta\,\vec e_\varphi$), we get
$$ d\vec e_R=d\theta\,\vec e_\theta+\sin\theta\,d\varphi\,\vec e_\varphi . $$Therefore we obtain
$$ d\vec r=dR\,\vec e_R+R\,d\theta\,\vec e_\theta+R\sin\theta\,d\varphi\,\vec e_\varphi $$This has exactly the same form as the infinitesimal displacement vector $d\vec l$ of Formula 16.9, so we can confirm that $d\vec r=d\vec l$ (this is a natural consequence, since the infinitesimal change of the position vector is itself the infinitesimal displacement vector). (Checked with SymPy.)
∎
Formula 16.14: Total differential of the position vector in spherical coordinates
$$ d\vec r=dR\,\vec e_R+R\,d\theta\,\vec e_\theta+R\sin\theta\,d\varphi\,\vec e_\varphi . $$Very soon, in Section 16.5.5, when we derive the nabla operator in spherical coordinates, we will use this expression for the total differential of the position vector just as it stands (the margin of the original notes also carries the remark “This will be useful later on (in a modest way)”).
16.5.5 The nabla operator in spherical coordinates (Problem 4)
In rectangular coordinates, the nabla operator is defined as $\nabla=\pdiff{}{x}\vec e_x+\pdiff{}{y}\vec e_y+\pdiff{}{z}\vec e_z$ (we will study the meaning of gradient, divergence, and curl as tools in earnest from Chapter 18 onward; here, let us first simply rewrite this very definition in rectangular coordinates in terms of the spherical-coordinate basis, by computation alone). Let us express it in terms of the spherical-coordinate basis $\vec e_R,\vec e_\theta,\vec e_\varphi$.
Derivation: The nabla operator in spherical coordinates (Problem 4 and Solution 4 in the original notes)
On the one hand, the total differential of a scalar function $u(\vec r)$ is, by the chain rule (differentiation of a composite function) with $R,\theta,\varphi$ regarded as the variables,
$$ du=\pdiff ur\,dR+\pdiff u\theta\,d\theta+\pdiff u\varphi\,d\varphi $$(to avoid confusion between symbols, we have written the radial coordinate as $r$; in what follows, $r=R$). On the other hand, we make use ahead of time of just one defining property of the gradient vector, which we will study formally in Chapter 18: the gradient vector $\nabla u$ is defined so as to satisfy $du=\nabla u\cdot d\vec r$ (this property comes from the intuition that it is the vector that extracts the directional derivative in the form of an inner product). Using this together with $d\vec r$ from Formula 16.14, we have
$$ du=\nabla u\cdot d\vec r=\nabla u\cdot(dR\,\vec e_R+R\,d\theta\,\vec e_\theta+R\sin\theta\,d\varphi\,\vec e_\varphi) . $$Writing $\nabla u=(\nabla u)_R\vec e_R+(\nabla u)_\theta\vec e_\theta+(\nabla u)_\varphi\vec e_\varphi$ in terms of its components, and expanding this inner product using the fact that $\vec e_R,\vec e_\theta,\vec e_\varphi$ form an orthonormal basis (Theorem 16.4), we obtain
$$ du=(\nabla u)_R\,dR+(\nabla u)_\theta\,R\,d\theta+(\nabla u)_\varphi\,R\sin\theta\,d\varphi . $$Comparing the coefficients of this with the first expression, we obtain $(\nabla u)_R=\pdiff ur$, $(\nabla u)_\theta\,R=\pdiff u\theta$, and $(\nabla u)_\varphi\,R\sin\theta=\pdiff u\varphi$, so that
$$ \nabla u=\pdiff ur\,\vec e_R+\frac1R\pdiff u\theta\,\vec e_\theta+\frac{1}{R\sin\theta}\pdiff u\varphi\,\vec e_\varphi . $$Since $u$ was an arbitrary scalar function, the operator itself can be written as
$$ \nabla=\vec e_R\pdiff{}{R}+\frac1R\vec e_\theta\pdiff{}{\theta}+\frac{1}{R\sin\theta}\vec e_\varphi\pdiff{}{\varphi} $$(SymPy check: we confirmed that $\nabla u\cdot d\vec r=du$ holds identically.)
∎
Formula 16.15: The nabla operator in spherical coordinates
$$ \nabla=\vec e_R\pdiff{}{R}+\frac1R\vec e_\theta\pdiff{}{\theta}+\frac{1}{R\sin\theta}\vec e_\varphi\pdiff{}{\varphi} . $$Application: Gradients of the Coulomb potential and the gravitational potential
The potential produced by a point charge or a point mass is often a function $u(R)$ of the distance $R$ from the center alone (independent of the angles; spherically symmetric). In this case $\partial u/\partial\theta=\partial u/\partial\varphi=0$, so in the gradient given by Formula 16.15 only $\nabla u=u'(R)\,\vec e_R$ remains. We put this to actual use in the next example, Example 16.8.
Example 16.8: Computing $\nabla(1/R)$ with the spherical-coordinate formula
Using Formula 16.15, find the gradient $\nabla u$ of $u=1/R$ (the form that appears in the Coulomb potential and the gravitational potential).
Solution. Since $u=1/R$ does not involve the variables $\theta,\varphi$, we have $\partial u/\partial\theta=\partial u/\partial\varphi=0$. Therefore, by Formula 16.15,
$$ \nabla u=\pdiff{}{R}\!\left(\frac1R\right)\vec e_R=-\frac{1}{R^2}\,\vec e_R . $$This result also agrees with the result of directly computing, in rectangular coordinates, the gradient of $u=1/\sqrt{x^2+y^2+z^2}$, namely $\nabla u=-\dfrac{[x,y,z]}{(x^2+y^2+z^2)^{3/2}}=-\dfrac{1}{R^2}\vec e_R$ (note that $[x,y,z]/R=\vec e_R$). This is a good example of how, for a spherically symmetric function, spherical coordinates let us find the gradient merely by differentiating a function of one variable. (Checked with SymPy.)
Illustration 16.2: Components obtained by using $\nabla$ twice (Problem 5 in the original notes; a stepping stone to the Laplacian)
Find (a) $\vec e_R\cdot\pdiff{}{R}\nabla$, (b) $\vec e_\theta\cdot\dfrac1R\pdiff{}{\theta}\nabla$, and (c) $\vec e_\varphi\cdot\dfrac{1}{R\sin\theta}\pdiff{}{\varphi}\nabla$.
Solution. (a) Since $\vec e_R,\vec e_\theta,\vec e_\varphi$ do not depend on $R$, when we partially differentiate Formula 16.15 with respect to $R$, we only need to differentiate the coefficients of the operator.
$$ \vec e_R\cdot\pdiff{}{R}\nabla=\vec e_R\cdot\left(\vec e_R\pdiff{^2}{R^2}+\cdots\right)=\frac{\partial^2}{\partial R^2} $$(Since $\vec e_R\cdot\vec e_R=1$ and $\vec e_R\cdot\vec e_\theta=\vec e_R\cdot\vec e_\varphi=0$, only the coefficient of $\vec e_R$ remains.)
(b) This time $\vec e_\theta,\vec e_\varphi$ themselves depend on $\theta$, so we must also pick up that dependence through the product rule. Using Formula 16.13, we obtain
$$ \pdiff{}{\theta}\nabla=\left(\pdiff{^2}{R\partial\theta}\vec e_R+\pdiff{}{R}\underbrace{\pdiff{\vec e_R}{\theta}}_{\vec e_\theta}\right) +\frac1R\left(\pdiff{^2}{\theta^2}\vec e_\theta+\pdiff{}{\theta}\underbrace{\pdiff{\vec e_\theta}{\theta}}_{-\vec e_R}\right) +\frac{1}{R\sin\theta}\left(-\frac{\cos\theta}{\sin\theta}\pdiff{}{\varphi}\vec e_\varphi+\pdiff{^2}{\varphi\partial\theta}\vec e_\varphi+\pdiff{}{\varphi}\underbrace{\pdiff{\vec e_\varphi}{\theta}}_{0}\right) . $$When we take the inner product of this with $\vec e_\theta$, only the terms proportional to $\vec e_\theta$ remain, since $\vec e_\theta\cdot\vec e_R=0,\ \vec e_\theta\cdot\vec e_\theta=1,\ \vec e_\theta\cdot\vec e_\varphi=0$.
$$ \vec e_\theta\cdot\frac1R\pdiff{}{\theta}\nabla=\frac1R\left(\pdiff{}{R}+\frac1R\pdiff{^2}{\theta^2}\right) . $$(c) Similarly, partially differentiating with respect to $\varphi$ gives
$$ \pdiff{}{\varphi}\nabla=\left(\pdiff{^2}{R\partial\varphi}\vec e_R+\pdiff{}{R}\underbrace{\pdiff{\vec e_R}{\varphi}}_{\sin\theta\,\vec e_\varphi}\right) +\frac1R\left(\pdiff{^2}{\theta\partial\varphi}\vec e_\theta+\pdiff{}{\theta}\underbrace{\pdiff{\vec e_\theta}{\varphi}}_{\cos\theta\,\vec e_\varphi}\right) +\frac{1}{R\sin\theta}\left(\pdiff{^2}{\varphi^2}\vec e_\varphi+\pdiff{}{\varphi}\underbrace{\pdiff{\vec e_\varphi}{\varphi}}_{-\sin\theta\,\vec e_R-\cos\theta\,\vec e_\theta}\right), $$and taking the inner product of this with $\vec e_\varphi\cdot\dfrac{1}{R\sin\theta}$ (using $\vec e_\varphi\cdot\vec e_R=\vec e_\varphi\cdot\vec e_\theta=0$ and $\vec e_\varphi\cdot\vec e_\varphi=1$), we obtain
$$ \vec e_\varphi\cdot\frac{1}{R\sin\theta}\pdiff{}{\varphi}\nabla=\frac{1}{R\sin\theta}\left(\sin\theta\pdiff{}{R}+\cos\theta\frac1R\pdiff{}{\theta}+\frac{1}{R\sin\theta}\pdiff{^2}{\varphi^2}\right) . $$(SymPy check: we applied each of the operators (a), (b), (c) to the test function $u=R^3\cos2\theta\sin3\varphi$ and confirmed that the results agree numerically with the expressions above.)
The original notes reach a natural stopping point here, once (a), (b), (c) have been found. These are the building blocks for assembling $\nabla\cdot\nabla=\nabla^2$ (the Laplacian) in spherical coordinates, and in fact simply adding (a)+(b)+(c) together completes the Laplacian in spherical coordinates.
$$ (a)+(b)+(c)=\pdiff{^2u}{R^2}+\frac2R\pdiff uR+\frac1{R^2}\pdiff{^2u}{\theta^2}+\frac{\cos\theta}{R^2\sin\theta}\pdiff u\theta+\frac1{R^2\sin^2\theta}\pdiff{^2u}{\varphi^2} . $$Undoing the product rule on the right-hand side one term at a time (we use the facts that $\dfrac1{R^2}\pdiff{}{R}\!\left(R^2\pdiff uR\right)=\pdiff{^2u}{R^2}+\dfrac2R\pdiff uR$ and $\dfrac{1}{R^2\sin\theta}\pdiff{}{\theta}\!\left(\sin\theta\,\pdiff u\theta\right)=\dfrac1{R^2}\pdiff{^2u}{\theta^2}+\dfrac{\cos\theta}{R^2\sin\theta}\pdiff u\theta$), we compare the result with the familiar form of the Laplacian in spherical coordinates
$$ \nabla^2u=\frac1{R^2}\pdiff{}{R}\!\left(R^2\pdiff uR\right)+\frac1{R^2\sin\theta}\pdiff{}{\theta}\!\left(\sin\theta\,\pdiff u\theta\right)+\frac1{R^2\sin^2\theta}\pdiff{^2u}{\varphi^2} $$and see that the two coincide exactly (an independent check with the general functions $u=x^2yz+z^3-3xy^2-2x^2z$ and $u=\sin x\,e^y+z^2x$, which are not spherically symmetric, also gave exact agreement in both cases). Although we used nothing but the partial derivatives of the basis vectors in Formula 16.13 to find (a), (b), (c), when they are added together the same dependence on $R,\theta$ as appears in the infinitesimal volume element $dV=R^2\sin\theta\,dR\,d\theta\,d\varphi$ (Formula 16.9) emerges of its own accord. This is no coincidence. It is because information about the stretching and shrinking of the scale of the curvilinear coordinates (the scale factors) is already woven into the fact that the directions of $\vec e_R,\vec e_\theta,\vec e_\varphi$ change with position.
16.6 Velocity and Acceleration in Polar Coordinates (Circular Motion)
To close this chapter, we learn how to describe the motion (velocity and acceleration) of an object using polar coordinates, which are cylindrical coordinates restricted to a plane (the coordinates $(r,\theta)$ in the $xy$-plane, which correspond to the case $z=0$ of cylindrical coordinates). The equations of motion of an object moving under a centrally symmetric force, such as the motion of a planet or of a pendulum, become much simpler when written in polar coordinates than when written in rectangular coordinates. In this section, as a first step, we convert the velocity and acceleration themselves into polar coordinates.
16.6.1 Velocity
From the original notes: Remember! Review of rotation matrices
In this section we use a rotation matrix to convert the rectangular components $(V_x,V_y)$ into the polar components $(V_r,V_\theta)$. In general, if we rotate the coordinate axes in the $xy$-plane about the origin by an angle $\theta$, the new coordinates $(x',y')$ are obtained from the original coordinates $(x,y)$ by the matrix equation
$$ \begin{bmatrix}x'\\y'\end{bmatrix}=\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix} $$in which the matrix (note the position of $-\sin\theta$) is the one we have already seen. This is exactly the same form of rotation matrix that we used in Formula 16.5 of Section 16.2 to convert the vector components in cylindrical coordinates into rectangular coordinates. From here on, when we convert the rectangular components $(V_x,V_y),(A_x,A_y)$ of the velocity and acceleration into the polar components $(V_r,V_\theta),(A_r,A_\theta)$, we will again use this rotation matrix (in the form of its inverse rotation).
Let the position of a point moving in the plane be $(x(t),y(t))=(r(t)\cos\theta(t),\ r(t)\sin\theta(t))$. Since the velocity is the time derivative of the position vector, using the product rule (from the previous volume, Calculus) we obtain
$$ \begin{cases} V_x=\dfrac{d}{dt}(r\cos\theta)=\dot r\cos\theta-r\dot\theta\sin\theta &\cdots① \\[4pt] V_y=\dfrac{d}{dt}(r\sin\theta)=\dot r\sin\theta+r\dot\theta\cos\theta &\cdots② \end{cases} $$(Here we have written the time derivatives in Newton's notation, $\dot r=dr/dt$ and $\dot\theta=d\theta/dt$. In the product rule $\frac{d}{dt}(r\cos\theta)=\dot r\cos\theta+r\cdot\frac{d}{dt}(\cos\theta)$ we have used $\frac{d}{dt}\cos\theta(t)=-\sin\theta\cdot\dot\theta$.) On the other hand, the conversion from the rectangular velocity components $(V_x,V_y)$ to the velocity components $(V_r,V_\theta)$ in the radial and angular directions can be carried out with the same rotation matrix as in Formula 16.5. Since $(\vec e_r,\vec e_\theta)$ is the coordinate basis rotated by the angle $\theta$, the conversion of components uses its inverse rotation (the rotation by the angle $-\theta$). Since a rotation matrix is an orthogonal matrix, its inverse equals its transpose, and we have
$$ \begin{bmatrix}V_r\\V_\theta\end{bmatrix}=\begin{bmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{bmatrix}\begin{bmatrix}V_x\\V_y\end{bmatrix}, \qquad\text{that is}\qquad \begin{cases}V_r=V_x\cos\theta+V_y\sin\theta\\V_\theta=-V_x\sin\theta+V_y\cos\theta\end{cases} $$Substituting ① and ② into this, we obtain
$$ V_r=(\dot r\cos\theta-r\dot\theta\sin\theta)\cos\theta+(\dot r\sin\theta+r\dot\theta\cos\theta)\sin\theta $$ $$ =\dot r\cos^2\theta-r\dot\theta\sin\theta\cos\theta+\dot r\sin^2\theta+r\dot\theta\sin\theta\cos\theta $$ $$ =\dot r(\cos^2\theta+\sin^2\theta)+r\dot\theta(-\sin\theta\cos\theta+\sin\theta\cos\theta)=\dot r , $$ $$ V_\theta=-(\dot r\cos\theta-r\dot\theta\sin\theta)\sin\theta+(\dot r\sin\theta+r\dot\theta\cos\theta)\cos\theta $$ $$ =-\dot r\sin\theta\cos\theta+r\dot\theta\sin^2\theta+\dot r\sin\theta\cos\theta+r\dot\theta\cos^2\theta=r\dot\theta(\sin^2\theta+\cos^2\theta)=r\dot\theta . $$(Along the way, the two terms that differ only in sign cancel each other, and we collect the rest using $\sin^2\theta+\cos^2\theta=1$.)
Formula 16.16: Velocity in polar coordinates
$$ V_r=\dot r,\qquad V_\theta=r\dot\theta . $$That is, the velocity vector is expressed as $\vec V=\dot r\,\vec e_r+r\dot\theta\,\vec e_\theta$.
16.6.2 Acceleration
The acceleration is the velocity differentiated once more with respect to time, that is, the second time derivative of the position. Differentiating $x=r\cos\theta,\ y=r\sin\theta$ twice each (using the product rule once more), we obtain
$$ \begin{cases} A_x=\dfrac{d^2}{dt^2}(r\cos\theta)=\ddot r\cos\theta-2\dot r\dot\theta\sin\theta-r\cos\theta\cdot\dot\theta^2-r\sin\theta\cdot\ddot\theta &\cdots③\\[4pt] A_y=\dfrac{d^2}{dt^2}(r\sin\theta)=\ddot r\sin\theta+2\dot r\dot\theta\cos\theta-r\sin\theta\cdot\dot\theta^2+r\cos\theta\cdot\ddot\theta &\cdots④ \end{cases} $$Intuition: Where do ③ and ④ come from?
Differentiate ① ($V_x=\dot r\cos\theta-r\dot\theta\sin\theta$) with respect to $t$ once more. By the product rule, the derivative of $\dot r\cos\theta$ is $\ddot r\cos\theta+\dot r(-\sin\theta\dot\theta)=\ddot r\cos\theta-\dot r\dot\theta\sin\theta$. The derivative of $r\dot\theta\sin\theta$ is given by the rule for differentiating a product of three factors (differentiate just one of $r,\dot\theta,\sin\theta$ at a time, multiply by the remaining two, and add the results), and is $\dot r\dot\theta\sin\theta+r\ddot\theta\sin\theta+r\dot\theta^2\cos\theta$. Subtracting, with attention to the signs, we get $\ddot r\cos\theta-\dot r\dot\theta\sin\theta-\dot r\dot\theta\sin\theta-r\ddot\theta\sin\theta-r\dot\theta^2\cos\theta=\ddot r\cos\theta-2\dot r\dot\theta\sin\theta-r\dot\theta^2\cos\theta-r\ddot\theta\sin\theta$, and this gives ③. ④ is obtained in the same way.
Using the same rotation matrix as for the velocity, we convert $(A_x,A_y)$ into $(A_r,A_\theta)$.
$$ \begin{bmatrix}A_r\\A_\theta\end{bmatrix}=\begin{bmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{bmatrix}\begin{bmatrix}A_x\\A_y\end{bmatrix},\qquad\text{that is}\qquad \begin{cases}A_r=A_x\cos\theta+A_y\sin\theta\\A_\theta=-A_x\sin\theta+A_y\cos\theta\end{cases} $$Substituting ③ and ④, we obtain
$$ \begin{aligned} A_r&=\ddot r\cos^2\theta-2\dot r\dot\theta\sin\theta\cos\theta-r\dot\theta^2\cos^2\theta-r\ddot\theta\sin\theta\cos\theta\\ &\quad+\ddot r\sin^2\theta+2\dot r\dot\theta\sin\theta\cos\theta-r\dot\theta^2\sin^2\theta+r\ddot\theta\sin\theta\cos\theta\\ &=\ddot r(\cos^2\theta+\sin^2\theta)-r\dot\theta^2(\cos^2\theta+\sin^2\theta)+2\dot r\dot\theta(-\sin\theta\cos\theta+\sin\theta\cos\theta)+r\ddot\theta(-\sin\theta\cos\theta+\sin\theta\cos\theta)\\ &=\ddot r-r\dot\theta^2 , \end{aligned} $$ $$ \begin{aligned} A_\theta&=-\ddot r\sin\theta\cos\theta+2\dot r\dot\theta\sin^2\theta+r\dot\theta^2\sin\theta\cos\theta+r\ddot\theta\sin^2\theta\\ &\quad+\ddot r\sin\theta\cos\theta+2\dot r\dot\theta\cos^2\theta-r\dot\theta^2\sin\theta\cos\theta+r\ddot\theta\cos^2\theta\\ &=2\dot r\dot\theta(\sin^2\theta+\cos^2\theta)+r\ddot\theta(\sin^2\theta+\cos^2\theta)+\ddot r(-\sin\theta\cos\theta+\sin\theta\cos\theta)+r\dot\theta^2(\sin\theta\cos\theta-\sin\theta\cos\theta)\\ &=2\dot r\dot\theta+r\ddot\theta . \end{aligned} $$Tracing the product rule backward, we notice that the last expression, $A_\theta$, can also be written as $\dfrac1r\dfrac{d}{dt}(r^2\dot\theta)$. Indeed, $\dfrac{d}{dt}(r^2\dot\theta)=2r\dot r\dot\theta+r^2\ddot\theta=r(2\dot r\dot\theta+r\ddot\theta)$, so dividing both sides by $r$ returns the original expression.
Formula 16.17: Acceleration in polar coordinates
$$ A_r=\ddot r-r\dot\theta^2,\qquad A_\theta=2\dot r\dot\theta+r\ddot\theta=\frac1r\frac{d}{dt}\!\left(r^2\dot\theta\right) . $$Physical meaning: Centripetal acceleration and Coriolis acceleration
The term $-r\dot\theta^2$ in $A_r$ is the centripetal acceleration (pointing toward the center), familiar from circular motion with radius $r$ and angular velocity $\dot\theta$. The term $2\dot r\dot\theta$ in $A_\theta$ appears only when the object is rotating while $r$ is changing, and it is the origin of the Coriolis term, which is famous in astronomy and meteorology. If $r$ is constant (pure circular motion), then $\dot r=0,\ddot r=0$, so only $A_r=-r\dot\theta^2$ and $A_\theta=r\ddot\theta$ remain, and we are led back to the familiar formulas for circular motion (we confirm this in the next example, Example 16.9).
Example 16.9: Velocity and acceleration in uniform circular motion with constant radius
A point mass moves in uniform circular motion on a circle of radius $a$ (constant) centered at the origin, with angular velocity $\omega$ (constant, $\dot\theta=\omega$). Using Formulas 16.16 and 16.17, find the velocity and acceleration in terms of polar components.
Solution. Since $r=a$ (constant), $\dot r=0,\ \ddot r=0$. Also, since $\dot\theta=\omega$ (constant), $\ddot\theta=0$. By Formula 16.16,
$$ V_r=\dot r=0,\qquad V_\theta=r\dot\theta=a\omega . $$The velocity has magnitude $a\omega$ and always points in the $\vec e_\theta$ direction (the direction of motion, the direction tangent to the circle). By Formula 16.17,
$$ A_r=\ddot r-r\dot\theta^2=0-a\omega^2=-a\omega^2,\qquad A_\theta=2\dot r\dot\theta+r\ddot\theta=0+0=0 . $$The acceleration has magnitude $a\omega^2$ and points opposite to $\vec e_r$; that is, it consists solely of the centripetal acceleration pointing toward the center (the angular component is 0). This agrees exactly with the result learned in high school physics (mechanics): “the acceleration in uniform circular motion has magnitude $a\omega^2$ and points toward the center.” (Checked with SymPy.)
16.7 Summary and Exercises
16.7.1 Summary
- Rectangular, cylindrical, and spherical coordinates each have a set of mutually orthogonal unit vectors (basis vectors), namely $(\vec e_x,\vec e_y,\vec e_z)$, $(\vec e_r,\vec e_\varphi,\vec e_z)$, and $(\vec e_R,\vec e_\theta,\vec e_\varphi)$, and each set forms a right-handed system (the cyclic relation $\vec e_1\times\vec e_2=\vec e_3$).
- The basis vectors of rectangular coordinates are constant, independent of position, but the basis vectors of cylindrical and spherical coordinates change direction from point to point. This is the reason why extra factors ($r$, $R^2\sin\theta$) appear in the infinitesimal volume element, and it is also the reason why we have to differentiate the basis vectors.
- The vector components in cylindrical and spherical coordinates are related to the components in rectangular coordinates by a rotation matrix (Formula 16.5). This rotation matrix is none other than the rotation matrices about the coordinate axes, $R_x,R_y,R_z$ (Theorems 16.1–16.3).
- The Euler angles $(\alpha,\beta,\gamma)$ represent an arbitrary orientation as the composition of three rotations, $R_z(\alpha)R_y(\beta)R_z(\gamma)$ (Formula 16.11). Applying $R_z(\varphi)R_y(\theta)$ to $\vec e_x,\vec e_y,\vec e_z$ gives the basis vectors of spherical coordinates, $\vec e_\theta,\vec e_\varphi,\vec e_R$, directly (Formula 16.12).
- Using the partial derivatives of the spherical basis vectors with respect to $\theta,\varphi$ (Formula 16.13), we can derive the total differential of the position vector (Formula 16.14) and the spherical-coordinate expression of the nabla operator (Formula 16.15).
- Motion in plane polar coordinates is described by the velocity $\vec V=\dot r\,\vec e_r+r\dot\theta\,\vec e_\theta$ (Formula 16.16) and the acceleration $\vec A=(\ddot r-r\dot\theta^2)\vec e_r+\left(2\dot r\dot\theta+r\ddot\theta\right)\vec e_\theta$ (Formula 16.17). In the special case of circular motion ($r=$ constant), only the centripetal acceleration $-r\dot\theta^2$ remains.
16.7.2 Exercises
Exercise 16.1: Converting from cylindrical to rectangular coordinates
Express the cylindrical coordinates $P\!\left(5,\dfrac{2\pi}{3},-2\right)$ (in the order $r,\varphi,z$) in rectangular coordinates.
Hint: Simply substitute into Formula 16.6 ($x=r\cos\varphi,\ y=r\sin\varphi,\ z=z$). To find the values of $\cos\varphi,\sin\varphi$ at $\varphi=2\pi/3$, recall that this angle lies in the second quadrant of the unit circle.
Exercise 16.2: Converting from spherical to rectangular coordinates
Express the spherical coordinates $P\!\left(3,\dfrac\pi4,\dfrac\pi2\right)$ (in the order $R,\theta,\varphi$) in rectangular coordinates.
Hint: Substitute into Formula 16.10. Note that at $\varphi=\pi/2$ we have $\cos\varphi=0,\sin\varphi=1$, so the $x$ component should turn out to be 0.
Exercise 16.3: Rotation about the $y$-axis
Using the rotation matrix $R_y(\theta)$ of Theorem 16.3, find the image of the point $(1,0,1)$ when it is rotated about the $y$-axis by $\theta=\dfrac\pi2$.
Hint: Write out $R_y(\pi/2)$ explicitly, entry by entry, and then multiply it by the column vector $[1,0,1]^{\mathrm T}$. Use the correct sign that was confirmed in the “Caution” box immediately following Theorem 16.3.
Exercise 16.4: Confirming that the spherical basis vectors form a right-handed system
Using Formula 16.12, verify by direct computation that $\vec e_R\times\vec e_\theta=\vec e_\varphi$ holds at the level of components (use the component formula for the cross product that you learned in the previous chapter).
Hint: Substitute $\vec e_R=[\sin\theta\cos\varphi,\sin\theta\sin\varphi,\cos\theta]$ and $\vec e_\theta=[\cos\theta\cos\varphi,\cos\theta\sin\varphi,-\sin\theta]$ into the component formula for the cross product, $[a_2b_3-a_3b_2,\ a_3b_1-a_1b_3,\ a_1b_2-a_2b_1]$, simplify using $\sin^2+\cos^2=1$, and observe that the result agrees with $\vec e_\varphi=[-\sin\varphi,\cos\varphi,0]$.
Exercise 16.5: Velocity and acceleration in circular motion with a varying radius
The motion of a particle is given by $r(t)=r_0(1+\varepsilon\sin\omega t)$ ($r_0,\varepsilon,\omega$ are positive constants, and $\varepsilon$ is small) and $\theta(t)=\omega t$. Using Formulas 16.16 and 16.17, find the velocity components $V_r,V_\theta$ and the acceleration components $A_r,A_\theta$ as functions of the time $t$.
Hint: First compute $\dot r,\ddot r$ in terms of $t$, and then substitute them directly into the formulas. Since $\dot\theta=\omega$ (constant), we have $\ddot\theta=0$. Confirming that your result agrees with Example 16.9 (the case $\varepsilon=0$) serves as a check on the computation.
Exercise 16.6: The partial derivatives of $\vec e_\varphi$
Starting from $\vec e_\varphi=-\sin\varphi\,\vec e_x+\cos\varphi\,\vec e_y$ in Formula 16.12, derive for yourself the results $\partial\vec e_\varphi/\partial\theta=0$ and $\partial\vec e_\varphi/\partial\varphi=-\sin\theta\,\vec e_R-\cos\theta\,\vec e_\theta$ that were given in Formula 16.13.
Hint: It is enough to retrace the computations (5) and (6) in Section 16.5.3, but this time carry them out yourself, expressing the result as a linear combination of $\vec e_R,\vec e_\theta$ while keeping in mind that it has no $\vec e_z$ component.
16.7.3 References
- Yasuhide Mochizuki, Mathematics Notes: Vector Analysis (handwritten lecture notes, in Japanese). The source of this chapter.
- Kanichi Terazawa, Shizen Kagakusha no Tame no Sūgaku Gairon [Outline of Mathematics for Natural Scientists], Iwanami Shoten, 1983 (in Japanese).
- Morikazu Toda, Bekutoru Kaiseki [Vector Analysis], Iwanami Shoten, 1987 (in Japanese).
- D. J. Griffiths, Introduction to Electrodynamics, 4th ed., Pearson, 2013. (a standard treatment of the basis vectors of spherical and cylindrical coordinates)