Rectangular, Cylindrical, and Spherical Coordinates

Since virtually everything we do in this course deals with three dimensional space, it makes sense to start with a short discussion of how to represent a point in 3-D space. Three dimensional space is often written R3\mathbb{R}^3 (read "R three"), to denote that we're dealing with real numbers in three dimensions; similarly, 2-D space is called R2,ℝ^2, the number line is called R,ℝ, and n-dimensional space is called Rn.ℝ^n.

We'll cover three ways of describing the location of a point: with rectangular coordinates, cylindrical coordinates, and spherical coordinates. There are other coordinate systems (including some wacky ones like hyperbolic and spheroidal coordinates), but these are the ones that are most commonly used for three dimensions. We won't actually use cylindrical and spherical coordinates for a while, but getting a look at them now can help to get comfortable thinking in three dimensions, and when they come back again, we'll be at least somewhat comfortable with them.

As we go through this section, we'll see that in each coordinate system, a point in 3-D space is represented by three coordinates, just like a point in 2-D space is represented by two coordinates (xx and yy in rectangular, rr and θθ in polar).

Rectangular Coordinates

Using rectangular coordinates, a point in R3ℝ^3 is represented by (x,y,z).(x,y,z). Similar to what we do in R2,ℝ^2, to get to a specified point, we start at the origin, travel along the xx axis the distance specified by the first coordinate, then parallel to the yy axis according to the second coordinate, and then up parallel to the zz axis according to the third coordinate.

Rectangular Coordinates

We can also talk about the projection of a point (or a line or plane or other figure, later) onto one of the three planes that make up the coordinate system: the xyxy plane (where z=0z=0), the yzyz plane (where x=0x=0), and the xzxz plane (where y=0y=0). To project a point onto any one of these planes, simply set the appropriate coordinate to zero.

Projection into xy place

Cylindrical Coordinates

Cylindrical coordinates are essentially polar coordinates in R3.ℝ^3. Remember, polar coordinates specify the location of a point using the distance from the origin and the angle formed with the positive xx axis when traveling to that point. Cylindrical coordinates use those those same coordinates, and add zz for the third dimension. In other words, to find a point (r,θ,z)(r,θ,z) in cylindrical coordinates, find the point (r,θ)(r,θ) in the xyxy plane, then move straight up (parallel to the zz axis) according to the third dimension given.

Cylindrical coordinates

For instance, the point (3,π4,4)(3,\dfrac{π}{4},4) in cylindrical coordinates is shown below.

Point in cylindrical coordinates

Converting Between Rectangular and Cylindrical Coordinates

Converting rectangular coordinates to cylindrical coordinates and vice versa is straightforward, provided you remember how to deal with polar coordinates. To convert from cylindrical coordinates to rectangular, use the following set of formulas: x=rcosθy=rsinθz=z\begin{aligned} x &= r\cos θ\ y &= r\sin θ\ z &= z \end{aligned}

Notice that the first two are identical to what we use when converting polar coordinates to rectangular, and the third simply says that the zz coordinates are equal in the two systems.

Cylindrical to Rectangular

Convert (3,π4,4)(3,\dfrac{π}{4},4) in cylindrical coordinates to rectangular coordinates.


Use the formulas, noting that r=3,r=3, θ=π/4,θ=π/4, and z=4.z=4.

x=rcosθ=3cosπ4=322y=rsinθ=3sinπ4=322z=z=4\begin{aligned} x &= r\cos θ = 3\cos \dfrac{π}{4}=\dfrac{3\sqrt{2}}{2}\ y &= r\sin θ = 3\sin \dfrac{π}{4}=\dfrac{3\sqrt{2}}{2}\ z &= z=4 \end{aligned}

Therefore, this point is (322,322,4)\ans{\left(\dfrac{3\sqrt{2}}{2},\dfrac{3\sqrt{2}}{2},4\right)} in rectangular coordinates.

To go in the other direction (from rectangular coordinates to cylindrical), use the following set of formulas (again, the first two are exactly what we use to convert from rectangular to polar in R2ℝ^2):

r=x2+y2θ=tan1yxz=z\begin{aligned} r &= \sqrt{x^2+y^2}\ θ &= \tan^{−1}\dfrac{y}{x}\ z &= z \end{aligned}

Rectangular to Cylindrical

Convert (2,2,6)(−2,2,6) in rectangular coordinates to cylindrical coordinates.


Use the formulas, noting that x=2,x=−2, y=2,y=2, and z=6.z=6.

r=x2+y2=8=22θ=tan1yx=tan1(1)=3π4z=z=6\begin{aligned} r &= \sqrt{x^2+y^2} =\sqrt{8}=2\sqrt{2}\ θ &= \tan^{−1} \dfrac{y}{x}=\tan^{−1}(−1)=\dfrac{3π}{4}\ z &= z=6 \end{aligned}

Therefore, this point is (22,3π4,6)\ans{\left(2\sqrt{2},\dfrac{3π}{4},6\right)} in cylindrical coordinates.

Spherical Coordinates

Spherical coordinates are similar to the way we describe a point on the surface of the earth using latitude and longitude. By specifying the radius of a sphere and the latitude and longitude of a point on the surface of that sphere, we can describe any point in R3.ℝ^3. To describe the latitude and longitude, we use two angles: θθ (the angle from the positive xx axis) and ϕϕ (the angle from the positive zz axis). We therefore have three coordinates (ρ,θ,ϕ),(ρ,θ,ϕ), where ρρ is the radius of the sphere.

Spherical Coordinates

Note that 0θ<2π0ϕπρ0\begin{aligned} 0 &≤ θ <2π\ 0 &≤ ϕ ≤π\ ρ &≥ 0 \end{aligned}

Converting Between Rectangular and Spherical Coordinates

The formulas that we need in order to convert between rectangular and spherical coordinates are given below, without derivation (although they aren't hard to derive; you should look at the figure above and see if you can make sense of them).

ρ=x2+y2+z2x=ρcosθsinϕy=ρsinθsinϕz=ρcosϕ\begin{aligned} ρ &= \sqrt{x^2+y^2+z^2}\ x &= ρ \cos θ \sin ϕ\ y &= ρ \sin θ \sin ϕ\ z &= ρ \cos ϕ \end{aligned}

Spherical to Rectangular

Convert (5,π,π2)\left(5,π,\dfrac{π}{2}\right) in spherical coordinates to rectangular coordinates.


Use the formulas, noting that ρ=5,ρ=5, θ=π,θ=π, and ϕ=π2.ϕ=\dfrac{π}{2}.

x=ρcosθsinϕ=5(cosπ)(sinπ2)=5(1)(1)=5y=ρsinθsinϕ=5(sinπ)(sinπ2)=5(0)(1)=0z=ρcosϕ=5cosπ2=5(0)=0\begin{aligned} x &= ρ \cos θ \sin ϕ=5(\cos π)\left(\sin \dfrac{π}{2}\right)=5(−1)(1)=−5\ y &= ρ \sin θ \sin ϕ=5(\sin π)\left(\sin \dfrac{π}{2}\right)=5(0)(1)=0\ z &= ρ \cos ϕ=5 \cos \dfrac{π}{2}=5(0)=0 \end{aligned}

Therefore, this point is (5,0,0)\ans{(−5,0,0)} in rectangular coordinates.

Rectangular to Spherical

Convert (3,4,7)(3,4,7) in rectangular coordinates to spherical coordinates.


Use the formula for ρρ first. ρ=x2+y2+z2=74ρ=\sqrt{x^2+y^2+z^2}=\sqrt{74}

Then, find ϕϕ by noting that cosϕ=zρ.\cos ϕ=\dfrac{z}{ρ}. ϕ=cos1zρ=cos1774=0.62 radiansϕ=\cos^{−1}\dfrac{z}{ρ}=\cos^{−1}\dfrac{7}{\sqrt{74}} = 0.62 \textrm{ radians}

Finally, use the fact that cosθ=xρsinϕ\cos θ=\dfrac{x}{ρ \sin ϕ} to find θθ. θ=cos1xρsinϕ=cos1374sin0.62=0.93 radiansθ=\cos^{−1}\dfrac{x}{ρ\sin ϕ}=\cos^{−1}\dfrac{3}{\sqrt{74} \sin 0.62} = 0.93 \textrm{ radians}

Therefore, this point is (74,0.93,0.62)\ans{(\sqrt{74},0.93,0.62)} in spherical coordinates.


RectangularCylindricalSphericalx,y,z)(r,θ,z)(ρ,θ,ϕ)\begin{array}{c c c} \textrm{Rectangular} & \textrm{Cylindrical} & \textrm{Spherical}\ x,y,z) & (r,θ,z) & (ρ,θ,ϕ) \end{array}

Rectangular \leftrightarrow Cylindrical

x=rcosθy=rsinθz=z\begin{aligned} x &= r\cos θ\ y &= r\sin θ\ z &= z \end{aligned}

r=x2+y2θ=tan1yxz=z\begin{aligned} r &= \sqrt{x^2+y^2}\ θ &= \tan^{−1}\dfrac{y}{x}\ z &= z \end{aligned}

Rectangular \leftrightarrow Spherical

x=ρcosθsinϕy=ρsinθsinϕz=ρcosϕ\begin{aligned} x &= ρ \cos θ \sin ϕ\ y &= ρ \sin θ \sin ϕ\ z &= ρ \cos ϕ \end{aligned}

ρ=x2+y2+z2ϕ=cos1zρθ=cos1xρsinϕ\begin{aligned} ρ &= \sqrt{x^2+y^2+z^2}\ ϕ &= \cos^{-1}\dfrac{z}{ρ}\ θ &= \cos^{-1}\dfrac{x}{ρ \sin ϕ} \end{aligned}