Precalculus

Analytic Geometry

Analytic Geometry Logo

Spherical Coordinates

To introduce spherical coordinates in space, consider three mutually perpendicular x-, y-, and z- axes with a common origin O. Let M be any point in space other than the point O and N be its projection onto the xy-plane. Further denote: ρ is the distance from the origin O to point M (the radial distance or radius), θ is the angle (also called the polar or zenith angle) that forms the directed line segment OM with the z-axis, and φ is the angle (azimuth) by which you need to turn the x-axis counterclockwise to coincide with the ray ON.

Spherical coordinate system
Figure 1.

Note that \(\rho\) is defined differently in polar and spherical coordinates. In polar (or cylindrical) coordinates, the distance \(\rho\) is defined in the \(xy-\)plane, while in the spherical coordinate system it is measured in space.

The three numbers \(\rho, \varphi, \theta\) are called the spherical coordinates of the point \(M.\) The name "spherical coordinates" is due to the fact that the coordinate surface \(\rho = const\) (that is, the surface with all points which are equidistant from the origin) is a sphere.

To provide a one-to-one correspondence between points in space and triplets of spherical coordinates \(\left({\rho, \varphi, \theta}\right),\) it is usually assumed that \(\rho\) and \(\varphi\) change within the following limits:

\[0 \le \rho \lt \infty,\;0 \le \varphi \lt 2\pi.\]

By definition, the \(\theta-\)coordinate lies in the range \(0 \le \theta \le \pi.\)

If point M coincides with point O, then \(\rho = 0.\) For point O, the \(\varphi-\) and \(\theta-\)coordinates are not defined.

Converting Between Spherical and Cartesian Coordinates

If you choose the axes of the Cartesian coordinate system as indicated above in the figure, then the Cartesian coordinates \(x, y, z\) of a point are related to its spherical coordinates \({\rho, \varphi, \theta}\) by the relations

\[x = \rho\sin\theta\cos\varphi,\;\;y = \rho\sin\theta\sin\varphi,\;\;z = \rho\cos\theta.\]

For converting a point from Cartesian coordinates to spherical coordinates, we use the formulas

\[\rho = \sqrt{x^2 + y^2 + z^2},\;\;\tan\varphi = \frac{y}{x},\;\;\cos\theta = \frac{z}{\rho} = \frac{z}{\sqrt{x^2 + y^2 + z^2}}.\]

Solved Problems

Example 1.

Find the spherical coordinates of each point given its Cartesian coordinates.

  1. \(A\left({1,0,0}\right)\)
  2. \(B\left({-4,-3,0}\right)\)
  3. \(C\left({2,2,1}\right)\)
  4. \(D\left({8,-4,1}\right)\)

Solution.

We use the following formulas:

\[\rho = \sqrt{x^2 + y^2 + z^2},\;\;\tan\varphi = \frac{y}{x},\;\;\cos\theta = \frac{z}{\rho}.\]
  1. \(A\left({1,0,0}\right)\)
    \[\rho = \sqrt{1^2 + 0^2 + 0^2} = 1,\;\tan\varphi = \frac{0}{1} = 0, \Rightarrow \varphi = 0,\;\cos\theta = \frac{0}{1} = 0, \Rightarrow \theta = \frac{\pi}{2};\]
    \[A\left({1,0,0}\right) \mapsto A\left({1,0,\frac{\pi}{2}}\right);\]
  2. \(B\left({-4,-3,0}\right)\)
    \[\rho = \sqrt{\left({-4}\right)^2 + \left({-3}\right)^2 + 0^2} = 5,\;\tan\varphi = \frac{-3}{-4} = \frac{3}{4}, \Rightarrow \varphi = \arctan\frac{3}{4},\;\cos\theta = \frac{0}{5} = 0, \Rightarrow \theta = \frac{\pi}{2};\]
    \[B\left({-4,-3,0}\right) \mapsto B\left({5,\arctan\frac{3}{4},\frac{\pi}{2}}\right);\]
  3. \(C\left({2,2,1}\right)\)
    \[\rho = \sqrt{2^2 + 2^2 + 1^2} = 3,\;\tan\varphi = \frac{2}{2} = 1, \Rightarrow \varphi = \frac{\pi}{4},\;\cos\theta = \frac{1}{3}, \Rightarrow \theta = \arccos\frac{1}{3};\]
    \[C\left({2,2,1}\right) \mapsto C\left({3,\frac{\pi}{4},\arccos\frac{1}{3}}\right);\]
  4. \(D\left({8,-4,1}\right)\)
    \[\rho = \sqrt{8^2 + \left({-4}\right)^2 + 1^2} = 9,\;\tan\varphi = \frac{-4}{8} = -\frac{1}{2}, \Rightarrow \varphi = \arctan\left({-\frac{1}{2}}\right) = -\arctan\frac{1}{2},\;\cos\theta = \frac{1}{9}, \Rightarrow \theta = \arccos\frac{1}{9};\]
    \[D\left({8,-4,1}\right) \mapsto D\left({9,-\arctan\frac{1}{2},\arccos\frac{1}{9}}\right).\]

Example 2.

Convert from spherical to Cartesian coordinates.

  1. \(K\left({\sqrt{2},\frac{\pi}{4},\frac{\pi}{6}}\right)\)
  2. \(L\left({3\sqrt{2},\frac{3\pi}{4},\frac{\pi}{2}}\right)\)
  3. \(M\left({5,\frac{3\pi}{2},\frac{\pi}{2}}\right)\)

Solution.

To translate between spherical and cartesian (rectangular) coordinates, we use the formulas

\[x = \rho\sin\theta\cos\varphi,\;\;y = \rho\sin\theta\sin\varphi,\;\;z = \rho\cos\theta.\]
  1. \(K\left({\sqrt{2},\frac{\pi}{4},\frac{\pi}{6}}\right)\)
    \[x = \sqrt{2}\cdot\sin\frac{\pi}{6}\cdot\cos\frac{\pi}{4} = \sqrt{2}\cdot\frac{1}{2}\cdot\frac{\sqrt{2}}{2} = \frac{1}{2},\]
    \[y = \sqrt{2}\cdot\sin\frac{\pi}{6}\cdot\sin\frac{\pi}{4} = \sqrt{2}\cdot\frac{1}{2}\cdot\frac{\sqrt{2}}{2} = \frac{1}{2},\]
    \[z = \sqrt{2}\cdot\cos\frac{\pi}{6} = \sqrt{2}\cdot\frac{\sqrt{3}}{2} = \frac{\sqrt{6}}{2};\]
    \[K\left({\sqrt{2},\frac{\pi}{4},\frac{\pi}{6}}\right) \mapsto K\left({\frac{1}{2},\frac{1}{2},\frac{\sqrt{6}}{2}}\right);\]
  2. \(L\left({3\sqrt{2},\frac{3\pi}{4},\frac{\pi}{2}}\right)\)
    \[x = 3\sqrt{2}\cdot\sin\frac{\pi}{2}\cdot\cos\frac{3\pi}{4} = 3\sqrt{2}\cdot1\cdot\left({-\frac{\sqrt{2}}{2}}\right) = -3,\]
    \[y = 3\sqrt{2}\cdot\sin\frac{\pi}{2}\cdot\sin\frac{3\pi}{4} = 3\sqrt{2}\cdot1\cdot\frac{\sqrt{2}}{2} = 3,\]
    \[z = 3\sqrt{2}\cdot\cos\frac{\pi}{2} = 3\sqrt{2}\cdot0 = 0;\]
    \[L\left({3\sqrt{2},\frac{3\pi}{4},\frac{\pi}{2}}\right) \mapsto L\left({-3,3,0}\right);\]
  3. \(M\left({5,\frac{3\pi}{2},\frac{\pi}{2}}\right)\)
    \[x = 5\cdot\sin\frac{\pi}{2}\cdot\cos\frac{3\pi}{2} = 5\cdot1\cdot0 = 0,\]
    \[y = 5\cdot\sin\frac{\pi}{2}\cdot\sin\frac{3\pi}{2} = 5\cdot1\cdot\left({-1}\right) = -5,\]
    \[z = 5\cdot\cos\frac{\pi}{2} = 5\cdot0 = 0;\]
    \[M\left({5,\frac{3\pi}{2},\frac{\pi}{2}}\right) \mapsto M\left({0,-5,0}\right).\]

Example 3.

Express city's location in spherical coordinates given its latitude and longitude:

  1. London \(51.5^{\circ}\,N, 0.1^{\circ} W\)
  2. Rio de Janeiro \(22.9^{\circ}\,S, 43.2^{\circ} W\)

Solution.

Latitude and longitude
Figure 2.
  1. London lies \(51.5^{\circ}\) north of the equator. Assuming that the vertical axis is directed towards the North Pole, the \(\theta\) angle is equal \(\theta = 90^\circ - 51.5^{\circ} = 38.5^{\circ}.\) Movement to the west corresponds to a negative angle, so we have \(\varphi = -0.1^\circ\). The radius of the earth is known and is \(\rho = 6370\,\text{km}.\) Thus the spherical coordinates of London are
    \[\rho = 6370\,\text{km},\;\varphi = -0.1^\circ,\;\theta = 38.5^{\circ}.\]
  2. Rio de Janeiro lies \(22.9^{\circ}\) south of the equator. Therefore we should add \(90^\circ\) to its latitude. This gives \(\theta = 90^\circ + 22.9^{\circ} = 112.9^{\circ}.\) The \(\varphi\) angle is negative because it is measured in the west direction: \(\varphi = -43.2^\circ\). Hence, the spherical coordinates of Rio de Janeiro are
    \[\rho = 6370\,\text{km},\;\varphi = -43.2^\circ,\;\theta = 112.9^{\circ}.\]

Example 4.

Find the spherical coordinates of point \(M\) if the ray \(\mathbf{OM}\) forms the angles \(\alpha = \frac{\pi}{4}\) and \(\beta = \frac{\pi}{3}\) with the \(x-\) and \(y-\)axis, respectively, and the third coordinate of the point is \(z = 1.\)

Solution.

Point in space given by two cosine angles and z-coordinate
Figure 3.

Let \(ON\) be the projection of the ray \(\mathbf{OM}\) onto the \(xy-\)plane. The angle \(\varphi\) is the azimuth, so we can write:

\[x_M = OL = ON\cos\varphi,\;\;y_M = OK = ON\sin\varphi.\]

On the other hand, the right triangle \(OLM\) implies that

\[x_M = OL = OM\cos\alpha = \rho\cos\frac{\pi}{4} = \rho\frac{\sqrt{2}}{2}.\]

Similarly, from the triangle \(OKM\) we find

\[y_M = OK = OM\cos\beta = \rho\cos\frac{\pi}{3} = \frac{\rho}{2}.\]

Notice that

\[ON = \sqrt{x_M^2 + y_M^2} = \sqrt{\rho^2 - z^2}.\]

From this equation we determine the radius \(\rho:\)

\[\sqrt{\left({\rho\frac{\sqrt{2}}{2}}\right)^2 + \left({\frac{\rho}{2}}\right)^2} = \sqrt{\rho^2 - 1^2}, \Rightarrow \sqrt{\frac{\rho^2}{2} + \frac{\rho^2}{4}} = \sqrt{\rho^2 - 1}, \Rightarrow \frac{3\rho^2}{4} = \rho^2 - 1, \Rightarrow \frac{\rho^2}{4} = 1, \Rightarrow \rho = 2.\]

The Cartesian coordinates of the point \(M\) are

\[x_M = \rho\frac{\sqrt{2}}{2} = \sqrt{2},\;\;y_M = \frac{\rho}{2} = 1.\]

Find the segment \(ON\) and the angle \(\varphi:\)

\[ON = \sqrt{\rho^2 - z^2} = \sqrt{2^2 - 1^2} = \sqrt{3},\;\;\cos\varphi = \frac{OL}{ON} = \frac{x_M}{ON} = \frac{\sqrt{2}}{\sqrt{3}} = \sqrt{\frac{2}{3}},\]

that is \(\varphi = \arccos\sqrt{\frac{2}{3}}.\)

Calculate the \(\theta\) angle:

\[\cos\theta = \frac{z}{\rho} = \frac{1}{2}, \Rightarrow \theta = \arccos\frac{1}{2} = \frac{\pi}{3}.\]

So the spherical coordinates of the point \(M\) are

\[\rho = 2,\;\varphi = \arccos\sqrt{\frac{2}{3}},\;\theta = \frac{\pi}{3}.\]