Calculus 3Vectors and Space

Cylindrical and Spherical Coordinates

Describe points by (r, θ, z) or (ρ, θ, φ).

Not started Jump to practice

Rectangular coordinates are not always the easiest way to describe a shape. You already know polar coordinates for circles in the plane. Space has two natural extensions: cylindrical coordinates (polar in the floor, plus height) for things with an axis, like pipes and cans, and spherical coordinates (distance from the origin and two angles) for balls and cones.

Key idea

Cylindrical $(r, \theta, z)$: $x = r\cos\theta$, $y = r\sin\theta$, $z = z$, with $r^2 = x^2 + y^2$.
Spherical $(\rho, \theta, \varphi)$: $\rho$ is the distance from the origin, $\theta$ the same angle as in polar coordinates, and $\varphi$ the angle measured down from the positive $z$-axis, with $\rho \ge 0$ and ${}0 \le \varphi \le \pi$. $$x = \rho\sin\varphi\cos\theta, \quad y = \rho\sin\varphi\sin\theta, \quad z = \rho\cos\varphi, \quad \rho^2 = x^2 + y^2 + z^2.$$

Why it works

Picture the vertical half-plane that contains the point and the $z$-axis. In it, the segment from the origin to the point has length $\rho$ and makes angle $\varphi$ with the $z$-axis. That right triangle has vertical leg $z = \rho\cos\varphi$ and horizontal leg $r = \rho\sin\varphi$, the distance from the $z$-axis. The horizontal leg points in the direction $\theta$, so polar coordinates finish the job: $x = r\cos\theta$ and $y = r\sin\theta$.
$\varphi$ (purple) is measured from the positive $z$-axis. At $\varphi = 90^\circ$ the point lies in the $xy$-plane; beyond ${}90^\circ$ it is below it.
Each system makes some surfaces look simple.
SurfaceCylindricalSpherical
cylinder $x^2 + y^2 = 9$$r = 3$
sphere $x^2 + y^2 + z^2 = 9$$\rho = 3$
cone $z = \sqrt{x^2 + y^2}$$z = r$$\varphi = \frac{\pi}{4}$
half-plane through the $z$-axis$\theta = \frac{\pi}{3}$$\theta = \frac{\pi}{3}$
plane $z = 2$$z = 2$$\rho\cos\varphi = 2$

Worked examples

Worked example: Cylindrical to rectangular

Convert $(r, \theta, z) = \left(4, \frac{2\pi}{3}, -1\right)$.
  1. $x = 4\cos\frac{2\pi}{3} = 4\left(-\frac{1}{2}\right) = -2$.
  2. $y = 4\sin\frac{2\pi}{3} = 4 \cdot \frac{\sqrt{3}}{2} = 2\sqrt{3}$.
  3. $z = -1$ stays.

Answer: $\left(-2, 2\sqrt{3}, -1\right)$

Worked example: Spherical to rectangular

Convert $(\rho, \theta, \varphi) = \left(6, \frac{\pi}{4}, \frac{\pi}{3}\right)$.
  1. $z = 6\cos\frac{\pi}{3} = 3$ and $r = 6\sin\frac{\pi}{3} = 3\sqrt{3}$.
  2. $x = r\cos\frac{\pi}{4} = 3\sqrt{3} \cdot \frac{\sqrt{2}}{2} = \frac{3\sqrt{6}}{2}$, and $y$ is the same.

Answer: $\left(\frac{3\sqrt{6}}{2}, \frac{3\sqrt{6}}{2}, 3\right)$

Worked example: Rectangular to spherical

Convert $\left(1, -1, \sqrt{2}\right)$.
  1. $\rho = \sqrt{1 + 1 + 2} = 2$.
  2. $\cos\varphi = \frac{z}{\rho} = \frac{\sqrt{2}}{2}$, so $\varphi = \frac{\pi}{4}$.
  3. $(x, y) = (1, -1)$ is in the fourth quadrant: $\theta = \frac{7\pi}{4}$.

Answer: $\left(2, \frac{7\pi}{4}, \frac{\pi}{4}\right)$

Common mistake

Mixing up $\theta$ and $\varphi$, or measuring $\varphi$ from the $xy$-plane. $\theta$ goes around the $z$-axis, exactly as in polar coordinates; $\varphi$ tilts down from the north pole. A point above the $xy$-plane has $\varphi < \frac{\pi}{2}$. Quick check: the sign of $z = \rho\cos\varphi$ must match your point. If you measured from the $xy$-plane (latitude), you would get $\frac{\pi}{2} - \varphi$ instead, and $z$ and $r$ swap roles.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • OpenStax Calculus Volume 3, 2.7 Cylindrical and Spherical Coordinates
@teddyrookbook GitHub