Why Derive the Spherical Coordinate Formulas?
Spherical coordinates describe a point by its distance from the origin and two angles. The resulting conversion formulas are compact, but their signs and geometric meaning matter: a right triangle has nonnegative side lengths, whereas Cartesian coordinates can be negative. A sound derivation keeps those facts distinct.
We use the spherical convention in which \(\rho\) is the distance from the origin, \(\theta\) is the directed azimuth in the \(xy\)-plane measured from the positive \(x\)-axis, and \(\phi\) is the angle from the positive \(z\)-axis. For \(\rho>0\), take \(0\leq\phi\leq\pi\). The symbol \(r\) will denote the distance of the point’s projection from the origin in the \(xy\)-plane.
The goal is to derive the relations between \((\rho,\theta,\phi)\) and \((x,y,z)\), not to rely on a memorized formula. We will first determine the vertical coordinate and the projection radius, then resolve that projection into its two signed components.
Vertical Component and Planar Projection
Let \(O\) be the origin, \(P=(x,y,z)\), and \(Q=(x,y,0)\) be the projection of \(P\) onto the \(xy\)-plane. The lengths \(OP\), \(OQ\), and \(QP\) are respectively \(\rho\), \(r\), and \(|z|\). Since \(OQ\) is perpendicular to the \(z\)-axis, triangle \(OQP\) is a right triangle, so its side lengths satisfy
This length equation is useful, but by itself it does not determine the sign of \(z\). That sign comes from the angle \(\phi\), which is measured from the positive \(z\)-axis. In vector terms, the position vector is \(\mathbf{p}=\langle x,y,z\rangle\), and the unit vector in the positive \(z\)-direction is \(\mathbf{k}=\langle 0,0,1\rangle\). For \(\rho>0\), the dot-product formula for the angle between two vectors gives
Here \(\mathbf{p}\cdot\mathbf{k}=z\), \(\|\mathbf{p}\|=\rho\), and \(\|\mathbf{k}\|=1\). Rearranging gives \(z=\rho\cos\phi\). This relation retains the sign: when \(P\) is below the \(xy\)-plane, \(\phi\) is obtuse and \(\cos\phi<0\), so \(z<0\).
Now substitute \(z=\rho\cos\phi\) into the right-triangle length equation. This determines the radius \(r\) of the projection:
Because \(r\) is a length, \(r\geq0\). Also, \(0\leq\phi\leq\pi\), so \(\sin\phi\geq0\). Taking the nonnegative square root therefore gives
This reasoning handles points both above and below the \(xy\)-plane. The right triangle uses \(|z|\) as a side length; the signed vertical coordinate comes from the angle with the positive \(z\)-axis. In particular, one should not infer that \(z\) is a nonnegative side length.
Resolving the Projection into \(x\) and \(y\)
The point \(Q\) lies in the \(xy\)-plane at distance \(r\) from the origin. Its direction is specified by the directed azimuth \(\theta\), measured from the positive \(x\)-axis. In the plane, the direction of \(OQ\) is the unit vector \(\langle\cos\theta,\sin\theta\rangle\). Multiplying by the projection’s length \(r\), its signed components are
These are component equations, not claims that \(x\) and \(y\) are always nonnegative triangle side lengths. The signs are supplied by the directed angle: for example, \(\cos\theta<0\) when the projection points to the left of the \(y\)-axis, and \(\sin\theta<0\) when it points below the \(x\)-axis.
Substituting \(r=\rho\sin\phi\) into the two planar component equations produces the Cartesian coordinates directly.
The angle from the positive \(z\)-axis gives \(z=\rho\cos\phi\), with its sign determined by \(\cos\phi\).
The right-triangle relation and \(0\leq\phi\leq\pi\) give \(r=\rho\sin\phi\).
The directed azimuth gives \(x=r\cos\theta\) and \(y=r\sin\theta\).
Worked Examples
Worked Example: Deriving Spherical Coordinates from a Point Below the Plane
Find spherical coordinates for \(P=(-3,3,-3\sqrt{2})\), using the stated convention.
First compute the distance from the origin:
The projection radius is
Use the signed vertical relation to find \(\phi\):
Since \(\phi\in[0,\pi]\), this gives \(\phi=3\pi/4\). The projection has \(x<0\) and \(y>0\), so its directed azimuth is \(\theta=3\pi/4\). Check by converting back:
All three coordinates match the original point, including the negative \(z\)-coordinate.
Worked Example: Converting Spherical Coordinates to Cartesian Coordinates
Let \(\rho=8\), \(\theta=\pi/3\), and \(\phi=2\pi/3\). Find \((x,y,z)\).
First find the projection radius:
Now resolve the projection into its signed planar components and compute the vertical component:
Thus the Cartesian point is \((2\sqrt3,6,-4)\). Check its distance:
The distance agrees with the given \(\rho=8\), and the negative \(z\)-coordinate agrees with the obtuse value of \(\phi\).
Worked Example: A Projection with a Negative \(y\)-Coordinate
Let \(\rho=10\), \(\theta=5\pi/3\), and \(\phi=\pi/3\). Find and check the Cartesian coordinates.
The projection radius is
Using the directed azimuth, \(\cos(5\pi/3)=1/2\) and \(\sin(5\pi/3)=-\sqrt3/2\). Therefore
Check the distance using these coordinates:
The negative \(y\)-coordinate is correct: the projection points below the \(x\)-axis in the plane, as indicated by \(\sin(5\pi/3)<0\).
A Common Mistake: Using Side Lengths for Signed Coordinates
A frequent error is to treat \(z\), \(x\), and \(y\) as if they were always nonnegative sides of right triangles. For example, suppose \(\rho=1\) and \(\phi=2\pi/3\). A mistaken calculation might use the acute interior angle \(\pi/3\) in the vertical triangle and conclude
That result is wrong: the point is below the \(xy\)-plane. The angle \(\phi\) is measured from the positive \(z\)-axis, so the signed relation gives
The projection radius remains a nonnegative length:
The analogous planar mistake is to call \(x\) the adjacent side and \(y\) the opposite side without accounting for the direction of \(\theta\). For an azimuth such as \(5\pi/6\), \(\cos\theta<0\), so \(x=r\cos\theta\) is negative even though \(r\) is a length. The correct interpretation is that \(x\) and \(y\) are signed components of the projection.
Why These Relations Are Useful
The derivation separates the geometry into two steps. The angle \(\phi\) controls how the distance \(\rho\) splits into a vertical component and a planar projection. The azimuth \(\theta\) then determines the direction of that projection within the plane. This separation makes the formulas easier to remember and helps diagnose sign errors.
It also gives immediate checks. Since \(r^2=x^2+y^2\), the planar equations imply
Combining this with \(r=\rho\sin\phi\) and \(z=\rho\cos\phi\) yields
This verifies that the derived Cartesian coordinates lie at distance \(\rho\) from the origin. The formulas also behave sensibly at the axis: if \(\phi=0\) or \(\phi=\pi\), then \(r=0\), so \(x=y=0\), while \(z=\rho\) or \(z=-\rho\), respectively. At the origin, \(\rho=0\) makes all three Cartesian coordinates zero regardless of the angles.
Check Your Understanding
Use the projection and signed-component reasoning above to answer these questions.
- Why does \(z=\rho\cos\phi\) remain valid when the point is below the \(xy\)-plane?
- Starting from \(\rho^2=r^2+z^2\) and \(z=\rho\cos\phi\), derive \(r=\rho\sin\phi\). Which range condition on \(\phi\) ensures the nonnegative square root is \(\rho\sin\phi\)?
- For \(\rho=4\), \(\theta=\pi\), and \(\phi=\pi/3\), find \(x\), \(y\), and \(z\), then verify that \(x^2+y^2+z^2=16\).
- For a projection with \(\theta=3\pi/2\) and \(r>0\), which of \(x\) and \(y\) are zero, positive, or negative? Explain using the signed component formulas.
- Explain why the right-triangle side lengths alone do not determine the sign of \(z\).