Unit 1, lesson 7

Cylindrical and Spherical Coordinates

How cylindrical and spherical coordinates locate a point, how to convert points, surfaces and solids with the right quadrant and domain, and where the coordinates stop being unique.

  • Theory part 13
  • Practice part 14
  • Surfaces and Coordinate Systems

A pipe, a water tank or a planet has an obvious center or axis, and describing it with xx, yy and zz makes even simple shapes look messy. A cylinder of radius 3 around the zz-axis is x2+y2=9x^2 + y^2 = 9 in Cartesian coordinates, but in cylindrical coordinates it is just r=3r = 3. Picking coordinates that match the symmetry keeps equations short and, later, makes triple integrals far easier.

Key terms

Cylindrical coordinates

Definition Fix right-handed Cartesian axes. A point P=(x,y,z)P = (x, y, z) has cylindrical coordinates (r,θ,z)(r, \theta, z) when

x=rcos⁡θ,y=rsin⁡θ,z=z,\begin{aligned} x &= r\cos\theta, \\[0.4em] y &= r\sin\theta, \\[0.4em] z &= z, \end{aligned}

with r≥0r \ge 0. Here (r,θ)(r, \theta) are polar coordinates of the projection (x,y,0)(x, y, 0) of PP onto the xyxy-plane, so r=x2+y2r = \sqrt{x^2 + y^2} is the distance from PP to the zz-axis, and zz is the usual height.

In plain words Drop the point straight down to the xyxy-plane, describe that shadow in polar coordinates, and keep the height as it is.

Example The point with cylindrical coordinates (2,2π3,5)(2, \frac{2\pi}{3}, 5) has

x=2cos⁡2π3=−1,y=2sin⁡2π3=3,\begin{aligned} x &= 2\cos\tfrac{2\pi}{3} = -1, \\[0.4em] y &= 2\sin\tfrac{2\pi}{3} = \sqrt{3}, \end{aligned}

so in Cartesian coordinates it is (−1,3,5)(-1, \sqrt{3}, 5). Its distance from the zz-axis is 1+3=2\sqrt{1 + 3} = 2, as it should be.

Spherical coordinates

Definition A point P=(x,y,z)P = (x, y, z) has spherical coordinates (ρ,θ,ϕ)(\rho, \theta, \phi) when

x=ρsin⁡ϕcos⁡θ,y=ρsin⁡ϕsin⁡θ,z=ρcos⁡ϕ,\begin{aligned} x &= \rho\sin\phi\cos\theta, \\[0.4em] y &= \rho\sin\phi\sin\theta, \\[0.4em] z &= \rho\cos\phi, \end{aligned}

with ρ≥0\rho \ge 0 and 0≤ϕ≤π0 \le \phi \le \pi. The number ρ=x2+y2+z2\rho = \sqrt{x^2 + y^2 + z^2} is the distance from the origin to PP, the angle ϕ\phi is the angle between the positive zz-axis and the segment from the origin to PP, and θ\theta is the same angle as in cylindrical coordinates. The two systems are linked by r=ρsin⁡ϕr = \rho\sin\phi and z=ρcos⁡ϕz = \rho\cos\phi, where sin⁡ϕ≥0\sin\phi \ge 0 guarantees r≥0r \ge 0.

In plain words Say how far the point is from the origin, how far it tilts down from straight up, and which way its shadow points in the xyxy-plane.

Example For (ρ,θ,ϕ)=(4,π3,π6)(\rho, \theta, \phi) = (4, \frac{\pi}{3}, \frac{\pi}{6}) we get r=4sin⁡π6=2r = 4\sin\frac{\pi}{6} = 2 and z=4cos⁡π6=23z = 4\cos\frac{\pi}{6} = 2\sqrt{3}, and then

x=2cos⁡π3=1,y=2sin⁡π3=3.\begin{aligned} x &= 2\cos\tfrac{\pi}{3} = 1, \\[0.4em] y &= 2\sin\tfrac{\pi}{3} = \sqrt{3}. \end{aligned}

The point is (1,3,23)(1, \sqrt{3}, 2\sqrt{3}). As a check, 1+3+12=16=ρ21 + 3 + 12 = 16 = \rho^2.

Azimuth and polar angle conventions

Definition The azimuth θ\theta is measured in the xyxy-plane from the positive xx-axis toward the positive yy-axis, which is counterclockwise when you look down from the positive zz-axis. The polar angle ϕ\phi is measured from the positive zz-axis, so ϕ=0\phi = 0 points straight up, ϕ=π2\phi = \frac{\pi}{2} lies in the xyxy-plane and ϕ=π\phi = \pi points straight down. Angles are in radians. This course uses the letters θ\theta for the azimuth and ϕ\phi for the polar angle, and lists spherical coordinates in the order (ρ,θ,ϕ)(\rho, \theta, \phi). Many physics books swap the letters, so always check which angle a source means.

In plain words The azimuth turns you around the vertical axis like a compass heading. The polar angle tips you down from the north pole.

Example A point on the negative yy-axis, such as (0,−3,0)(0, -3, 0), has azimuth θ=3π2\theta = \frac{3\pi}{2}, because the counterclockwise turn from the positive xx-axis to the negative yy-axis is three quarters of a full turn. It has polar angle ϕ=π2\phi = \frac{\pi}{2}, because it lies in the xyxy-plane. With ρ=3\rho = 3 the formulas give (3⋅1⋅0, 3⋅1⋅(−1), 0)=(0,−3,0)(3 \cdot 1 \cdot 0, \, 3 \cdot 1 \cdot (-1), \, 0) = (0, -3, 0).

Domains

Definition The standard domains are

r≥0,0≤θ<2π,z∈Rr \ge 0, \qquad 0 \le \theta < 2\pi, \qquad z \in \mathbb{R}

for cylindrical coordinates and

ρ≥0,0≤θ<2π,0≤ϕ≤π\begin{gathered} \rho \ge 0, \qquad 0 \le \theta < 2\pi, \\[0.4em] 0 \le \phi \le \pi \end{gathered}

for spherical coordinates. Any half-open interval of length 2π2\pi works just as well for θ\theta, because it still covers each direction exactly once. Some books use −π<θ≤π-\pi < \theta \le \pi, and when you describe a particular curve or solid you may pick whichever such interval keeps the description simplest, as long as you say which one you use. The radial coordinates rr and ρ\rho are never negative here, and ϕ\phi never leaves [0,π][0, \pi], since ϕ\phi outside that range would let sin⁡ϕ\sin\phi turn negative and break the link r=ρsin⁡ϕr = \rho\sin\phi.

In plain words Distances are not negative, the azimuth goes once around, and the polar angle only goes from the top to the bottom.

Example The triple (ρ,θ,ϕ)=(2,0,3π2)(\rho, \theta, \phi) = (2, 0, \frac{3\pi}{2}) is not allowed, because ϕ>π\phi > \pi. Plugging it in anyway gives (−2,0,0)(-2, 0, 0), which in the standard domain is (ρ,θ,ϕ)=(2,π,π2)(\rho, \theta, \phi) = (2, \pi, \frac{\pi}{2}).

Coordinate conversion

Definition To go from Cartesian to cylindrical coordinates, use

r=x2+y2,cos⁡θ=xr,sin⁡θ=yr,\begin{gathered} r = \sqrt{x^2 + y^2}, \\[0.4em] \cos\theta = \frac{x}{r}, \qquad \sin\theta = \frac{y}{r}, \end{gathered}

valid when r>0r > 0, and keep zz. For spherical coordinates add

ρ=x2+y2+z2,ϕ=arccos⁡zρ,\begin{gathered} \rho = \sqrt{x^2 + y^2 + z^2}, \\[0.4em] \phi = \arccos\frac{z}{\rho}, \end{gathered}

valid when ρ>0\rho > 0, with the same θ\theta as before, which again needs r>0r > 0. The formula tan⁡θ=yx\tan\theta = \frac{y}{x} alone does not fix θ\theta, since arctan⁡yx\arctan\frac{y}{x} lies in (−π2,π2)(-\frac{\pi}{2}, \frac{\pi}{2}) and gives the right direction only when x>0x > 0, and even then a negative value needs 2π2\pi added to land in [0,2π)[0, 2\pi). Choose the angle in the quadrant given by the signs of xx and yy, and when x=0x = 0 take θ=π2\theta = \frac{\pi}{2} if y>0y > 0 and θ=3π2\theta = \frac{3\pi}{2} if y<0y < 0. No such care is needed for ϕ\phi, because arccos⁡\arccos already returns values in [0,π][0, \pi].

In plain words Lengths come from the Pythagorean theorem. For the azimuth, look at the signs of xx and yy before trusting a calculator.

Example Take P=(1,−1,−2)P = (1, -1, -\sqrt{2}). Then

ρ=1+1+2=2,ϕ=arccos⁡−22=3π4.\begin{gathered} \rho = \sqrt{1 + 1 + 2} = 2, \\[0.4em] \phi = \arccos\frac{-\sqrt{2}}{2} = \frac{3\pi}{4}. \end{gathered}

Since x>0x > 0 and y<0y < 0, the shadow lies in the fourth quadrant and θ=7π4\theta = \frac{7\pi}{4}. So PP has spherical coordinates (2,7π4,3π4)(2, \frac{7\pi}{4}, \frac{3\pi}{4}). For Q=(−3,−3,4)Q = (-3, -3, 4), the quotient yx=1\frac{y}{x} = 1 tempts you to write θ=π4\theta = \frac{\pi}{4}, but both xx and yy are negative, so θ=5π4\theta = \frac{5\pi}{4} and QQ has cylindrical coordinates (32,5π4,4)(3\sqrt{2}, \frac{5\pi}{4}, 4).

Coordinate surfaces

Definition A coordinate surface is the set of points where one coordinate equals a constant. In the table c>0c > 0, kk is any real number, 0≤β<2π0 \le \beta < 2\pi, and 0<α<π0 < \alpha < \pi with α≠π2\alpha \ne \frac{\pi}{2}.

EquationSurface
r=cr = ccircular cylinder of radius cc about the zz-axis
z=kz = khorizontal plane at height kk
θ=β\theta = \betahalf-plane bounded by the zz-axis
ρ=c\rho = csphere of radius cc centered at the origin
ϕ=α\phi = \alphaone nappe of a cone with vertex at the origin, the upper one if α<π2\alpha < \frac{\pi}{2} and the lower one if α>π2\alpha > \frac{\pi}{2}

The equation ϕ=π2\phi = \frac{\pi}{2} gives the xyxy-plane, and ϕ=0\phi = 0 and ϕ=π\phi = \pi give the nonnegative and the nonpositive zz-axis. The equation r=0r = 0 gives the zz-axis and ρ=0\rho = 0 gives the origin. A half-plane θ=β\theta = \beta includes its edge, the zz-axis, since points with r=0r = 0 may take any θ\theta.

In plain words Freeze one coordinate and let the other two roam. You get the basic shapes these coordinates are built for.

Example The cone z=x2+y2z = \sqrt{x^2 + y^2} becomes ρcos⁡ϕ=ρsin⁡ϕ\rho\cos\phi = \rho\sin\phi. For ρ>0\rho > 0 this gives tan⁡ϕ=1\tan\phi = 1, so ϕ=π4\phi = \frac{\pi}{4}, the upper nappe only. The sphere x2+y2+z2=4zx^2 + y^2 + z^2 = 4z, of radius 2 centered at (0,0,2)(0, 0, 2), becomes ρ2=4ρcos⁡ϕ\rho^2 = 4\rho\cos\phi, that is

ρ=4cos⁡ϕ,0≤ϕ≤π2,\rho = 4\cos\phi, \qquad 0 \le \phi \le \tfrac{\pi}{2},

where dividing by ρ\rho is safe because the origin itself still satisfies ρ=4cos⁡ϕ\rho = 4\cos\phi at ϕ=π2\phi = \frac{\pi}{2}. Solids work the same way. The ice cream cone inside the sphere ρ=2\rho = 2 and above the cone ϕ=π4\phi = \frac{\pi}{4} is

0≤ρ≤2,0≤θ<2π,0≤ϕ≤π4.\begin{gathered} 0 \le \rho \le 2, \qquad 0 \le \theta < 2\pi, \\[0.4em] 0 \le \phi \le \tfrac{\pi}{4}. \end{gathered}

Nonuniqueness at singular coordinates

Definition Even within the standard domains, some points have more than one coordinate triple. In cylindrical coordinates every point of the zz-axis has r=0r = 0, and θ\theta can be anything. In spherical coordinates the origin has ρ=0\rho = 0 with θ\theta and ϕ\phi arbitrary, and every other point of the zz-axis has ϕ=0\phi = 0 or ϕ=π\phi = \pi with θ\theta arbitrary. Off the zz-axis, the coordinates in the standard domains are unique. If the domain of θ\theta is allowed to be a closed interval such as [0,2π][0, 2\pi], then θ=0\theta = 0 and θ=2π\theta = 2\pi also name the same half-plane.

In plain words On the vertical axis there is no shadow to point anywhere, so the azimuth means nothing there. At the origin both angles mean nothing.

Example The point (0,0,5)(0, 0, 5) has cylindrical coordinates (0,θ,5)(0, \theta, 5) for every θ\theta, and spherical coordinates (5,θ,0)(5, \theta, 0) for every θ\theta. This is why the conversion formula cos⁡θ=xr\cos\theta = \frac{x}{r} requires r>0r > 0. The same thing shows up in equations. The cylinder x2+y2=2xx^2 + y^2 = 2x becomes r2=2rcos⁡θr^2 = 2r\cos\theta, so r=0r = 0 or r=2cos⁡θr = 2\cos\theta, and the second equation already contains the zz-axis. Since r≥0r \ge 0, it needs cos⁡θ≥0\cos\theta \ge 0, which in the standard domain means

0≤θ≤π2or3π2≤θ<2π.0 \le \theta \le \tfrac{\pi}{2} \quad \text{or} \quad \tfrac{3\pi}{2} \le \theta < 2\pi.

Both θ=π2\theta = \frac{\pi}{2} and θ=3π2\theta = \frac{3\pi}{2} give r=0r = 0, two different angles for the same line, the zz-axis, which lies on this cylinder. With the interval −π<θ≤π-\pi < \theta \le \pi instead, the same cylinder is r=2cos⁡θr = 2\cos\theta for −π2≤θ≤π2-\frac{\pi}{2} \le \theta \le \frac{\pi}{2}, and the zz-axis is reached at both ends of that range.

Check yourself

  1. Find cylindrical coordinates of the point (0,−2,3)(0, -2, 3).
Show the answer

The distance to the zz-axis is r=2r = 2. The shadow (0,−2)(0, -2) lies on the negative yy-axis, so θ=3π2\theta = \frac{3\pi}{2}. The point is (2,3π2,3)(2, \frac{3\pi}{2}, 3).

  1. Find spherical coordinates of (−3,1,0)(-\sqrt{3}, 1, 0).
Show the answer

Here ρ=3+1=2\rho = \sqrt{3 + 1} = 2 and ϕ=arccos⁡0=π2\phi = \arccos 0 = \frac{\pi}{2}. The quotient yx=−13\frac{y}{x} = -\frac{1}{\sqrt{3}} alone suggests −π6-\frac{\pi}{6}, but x<0x < 0 and y>0y > 0 put the shadow in the second quadrant, so θ=5π6\theta = \frac{5\pi}{6}. The answer is (2,5π6,π2)(2, \frac{5\pi}{6}, \frac{\pi}{2}).

  1. Identify the surface ρsin⁡ϕ=3\rho\sin\phi = 3.
Show the answer

The product ρsin⁡ϕ\rho\sin\phi equals r=x2+y2r = \sqrt{x^2 + y^2}, so the surface is x2+y2=9x^2 + y^2 = 9, the circular cylinder of radius 3 about the zz-axis.

How this lesson connects

It also uses Cartesian coordinates, polar coordinates, sine, cosine and basic surface equations.