One Point, Two Coordinate Systems
Cylindrical and spherical coordinates describe points in three-dimensional space using different measurements. Cylindrical coordinates record a point’s distance from the vertical axis, its azimuth around that axis, and its height. Spherical coordinates record its distance from the origin, the same azimuth, and an angle measured down from the positive \(z\)-axis.
Because both systems use the same azimuth, converting between them does not require changing the direction around the \(z\)-axis. The conversion concerns the other two measurements: cylindrical radius and height become the horizontal and vertical components of the spherical radius.
The Coordinate Conventions
We use cylindrical coordinates \((r,\theta,z)\), with \(r\geq 0\). The angle \(\theta\) is measured in the \(xy\)-plane from the positive \(x\)-axis. We use spherical coordinates \((\rho,\theta,\phi)\), where \(\rho\geq 0\), \(\theta\) is the azimuth from the positive \(x\)-axis, and \(\phi\) is measured from the positive \(z\)-axis. The usual polar-angle range is \(0\leq\phi\leq\pi\).
With these conventions, the Cartesian coordinates of a point are related to cylindrical coordinates by \(x=r\cos\theta\), \(y=r\sin\theta\), and \(z=z\). In spherical coordinates they are \(x=\rho\sin\phi\cos\theta\), \(y=\rho\sin\phi\sin\theta\), and \(z=\rho\cos\phi\). The angle \(\phi\) is not measured up from the \(xy\)-plane: it is measured down from the positive \(z\)-axis.
Deriving the Conversion Formulas
Compare the two expressions for \(x\) and \(y\). Since the azimuth is the same, the distance from the point’s projection onto the \(xy\)-plane to the \(z\)-axis is \(r\) in cylindrical coordinates and \(\rho\sin\phi\) in spherical coordinates. Comparing the vertical coordinates gives the corresponding vertical component.
Squaring these equations and adding eliminates \(\phi\). This produces the formula for the spherical distance. When \(\rho>0\), the ratios of the components to \(\rho\) determine the polar angle.
In the reverse direction, once \(\rho\) and \(\phi\) are known, the cylindrical radius and height follow directly from the first pair of formulas. The azimuth is retained.
The conditions on the angle matter. Since \(r\geq 0\), the quantity \(r/\rho\) is nonnegative, consistent with \(\sin\phi\geq 0\) for \(0\leq\phi\leq\pi\). The sign of \(z\) determines whether \(\phi\) is below, at, or above \(\pi/2\): positive \(z\) gives \(0\leq\phi<\pi/2\), \(z=0\) gives \(\phi=\pi/2\), and negative \(z\) gives \(\pi/2<\phi\leq\pi\).
Worked Conversions
Worked Example: Cylindrical to Spherical Above the Plane
Convert the cylindrical point \((3,\pi/6,4)\) to spherical coordinates.
The cylindrical radius is \(r=3\) and the height is \(z=4\). First find the distance from the origin:
Next, use the vertical component to determine the polar angle. Here \(\cos\phi=z/\rho=4/5\), and the required angle is in the first quadrant because \(z>0\). Thus \(\phi=\arccos(4/5)\). The azimuth remains \(\theta=\pi/6\).
Check the conversion: \(\sin\phi=3/5\), since \(\phi\) is in the first quadrant and \(\cos\phi=4/5\). Therefore \(\rho\sin\phi=5(3/5)=3=r\), and \(\rho\cos\phi=5(4/5)=4=z\). Both cylindrical components are recovered, and the azimuth is unchanged.
Worked Example: Spherical to Cylindrical
Convert \((8,5\pi/4,\pi/3)\) from spherical to cylindrical coordinates.
Here \(\rho=8\), \(\theta=5\pi/4\), and \(\phi=\pi/3\). Apply the formulas for the cylindrical radius and height:
The azimuth is still \(5\pi/4\), so the cylindrical coordinates are \((4\sqrt3,5\pi/4,4)\).
The recovered spherical radius is \(8\). Also, \(z/\rho=4/8=1/2\), giving \(\phi=\pi/3\) in the allowed range, and the azimuth remains \(5\pi/4\). This checks all three spherical coordinates.
Worked Example: Cylindrical to Spherical Below the Plane
Convert \((12,2\pi/3,-5)\) from cylindrical to spherical coordinates. The negative height means the point lies below the \(xy\)-plane, so its spherical polar angle must be greater than \(\pi/2\).
First compute the spherical radius:
Now \(\cos\phi=z/\rho=-5/13\). The angle in \([0,\pi]\) with this cosine is \(\phi=\arccos(-5/13)\), which lies between \(\pi/2\) and \(\pi\). The azimuth remains \(2\pi/3\).
For a check, the sine of this polar angle is positive and equals \(12/13\), because \(\sin^2\phi=1-25/169=144/169\). Hence \(\rho\sin\phi=13(12/13)=12\), while \(\rho\cos\phi=13(-5/13)=-5\). The original cylindrical radius and height are recovered.
Why the Formulas Work in Both Directions
The conversion is not an independent rule for each pair of coordinates; it follows from describing the same point in two ways. The following argument verifies that the formulas reconstruct the same Cartesian point, including the shared azimuth.
For a point \((r,\theta,z)\), set \(\rho=\sqrt{r^2+z^2}\). If \(r>0\), choose \(\phi\in[0,\pi]\) with \(\sin\phi=r/\rho\) and \(\cos\phi=z/\rho\). These choices are consistent because \((r/\rho)^2+(z/\rho)^2=1\), and \(r/\rho>0\).
Using spherical coordinates gives \(x=\rho\sin\phi\cos\theta=(\rho\sin\phi)\cos\theta=r\cos\theta\), and \(y=\rho\sin\phi\sin\theta=(\rho\sin\phi)\sin\theta=r\sin\theta\). These are exactly the cylindrical expressions.
The spherical expression gives \(z=\rho\cos\phi=\rho(z/\rho)=z\). Thus all three Cartesian coordinates agree, so the conversion represents the same point.
In the reverse direction, start from \((\rho,\theta,\phi)\), and set \(r=\rho\sin\phi\) and \(z=\rho\cos\phi\). The cylindrical horizontal coordinates are \(r\cos\theta=\rho\sin\phi\cos\theta\) and \(r\sin\theta=\rho\sin\phi\sin\theta\), which match the spherical expressions; its vertical coordinate is \(z=\rho\cos\phi\), also matching. This proves that the reverse conversion gives the same point as well.
Angle and Axis Cases
For points with \(r>0\), the azimuth is geometrically defined and is shared by the two coordinate systems. If an angle is represented in a different interval, its value may differ by an integer multiple of \(2\pi\), but it describes the same direction. When converting coordinates, keep the same azimuth representative whenever both systems use the same interval.
On the \(z\)-axis, \(r=0\), so the point has no unique azimuth: changing \(\theta\) does not change the point. If \(z>0\), then \(\rho=z\) and \(\phi=0\); if \(z<0\), then \(\rho=-z\) and \(\phi=\pi\). At the origin, \(\rho=0\), and neither angular coordinate describes a unique direction. These are coordinate ambiguities, not failures of the conversion formulas: the point itself remains well defined.
A Common Mistake: Ignoring the Polar-Angle Range
A tempting shortcut is to set \(\phi=\arctan(z/r)\) for every cylindrical point. This can give an angle outside the required range or place the point in the wrong half of the vertical cross-section. For example, with \(r=3\) and \(z=-4\), that shortcut gives \(\arctan(-4/3)\), a negative angle. Using \(\rho=5\), this angle has negative sine, so \(\rho\sin\phi=-3\), not the required cylindrical radius \(3\).
The correction is to use the range \(0\leq\phi\leq\pi\) and account for the signs of both components. In this example, \(\cos\phi=-4/5\) and \(\sin\phi=3/5\), so the correct angle is \(\phi=\arccos(-4/5)\). It satisfies \(\rho\cos\phi=5(-4/5)=-4\) and \(\rho\sin\phi=5(3/5)=3\). Checking both component equations prevents a quadrant error.
Why the Relationship Is Useful
The conversion lets you choose whichever coordinate description makes a point or a calculation clearer while keeping its location fixed. Cylindrical coordinates separate the distance from the vertical axis, the direction around it, and the height. Spherical coordinates instead combine the radial and vertical measurements into a distance from the origin and an inclination angle. Understanding their relationship makes it possible to translate between these descriptions without losing track of the point.
The essential geometry is a right triangle in a vertical plane through the \(z\)-axis: its horizontal leg is \(r\), its vertical leg is \(z\), and its hypotenuse is \(\rho\). The angle \(\phi\) is measured from the positive vertical direction. Thus \(r\) is the side opposite \(\phi\), while \(z\) is the signed adjacent component. That picture explains both the formulas and why a negative \(z\) requires \(\phi>\pi/2\).
Check Your Understanding
Use the conversion formulas and the stated angle ranges to answer the following questions.
- Convert \((5,\pi/4,12)\) from cylindrical to spherical coordinates, and verify the recovered radius and height.
- Convert \((10,\pi/3,2\pi/3)\) from spherical to cylindrical coordinates. Which coordinate is preserved?
- For a cylindrical point with \(r>0\) and \(z<0\), what interval contains its spherical polar angle \(\phi\)? Explain why.
- What goes wrong if \(\phi=\arctan(z/r)\) is used without checking the required angle range?
- Why is the azimuth not uniquely determined for a point on the \(z\)-axis?