## Conversion between Polar and Cartesian Coordinates

An ordered pair (a, b) plotted in the **Cartesian coordinate system** generally has a different location from when plotted in the **polar coordinate system** (with the same origin and pole). Given the coordinates of a point in one coordinate system, you might ask what its coordinates are in the other coordinate system so that both identify the same point. To answer this question, we assume that in the **Cartesian coordinate system**, the independent axis is horizontal and the dependent axis is vertical. We also assume that the polar axis coincides with the x-axis, shares the same origin, and both Cartesian axes and the polar axis have the same scales.

### Converting Polar Coordinates to Cartesian Coordinates

Converting **polar coordinates** to **Cartesian coordinates** is straightforward using the definitions of trigonometric functions on a trig circle. Referring to the following figure, it is clear that the point (r, φ) in the **polar coordinate system** and the point (rcos(φ), rsin(φ)) in the **Cartesian coordinate system** coincide.

So we have the following formula for converting **polar coordinates** to **Cartesian coordinates**:

Polar to Cartesian Coordinates

x = r*cos(φ) y = r*sin(φ)Note: The above conversion formula holds even if r is negative. If r < 0, then x = -|r|*cosφ = -(-r)*cosφ = r*cosφ, and similarly, y = -|r|*sinφ = -(-r)*sinφ = r*sinφ.

### Converting Cartesian Coordinates to Polar Coordinates

As shown in the following figure, regardless of the location of the point (x, y), we have r =√(x^{2} + y^{2}) and tan(φ) = y/x by the *Pythagorean Theorem*.

Because tan^{-1}() always gives an "angle" between -π/2 and π/2, we have φ = tan^{-1}(y/x) if (x, y) is in the first or fourth quadrant (that is, if x > 0) by the definition of tan^{-1}.

Because we are dividing by x, x must be non-zero. For the case where x = 0, the point is on the y-axis and the **angular coordinate** is θ = π/2 and the radial coordinate is r = y.

If (x, y) is in the second or third quadrant (that is, if x < 0), we must add (or subtract) π to tan^{-1}(y/x) to obtain the corresponding **polar angle**.

To summarize:

Cartesian to Polar Coordinates (1)

*If x = 0*

*Otherwise*

^{2}+y

^{2})

^{-1}(y/x) if x > 0 tan

^{-1}(y/x)+π if x < 0

Alternatively, when x < 0, instead of adding π/2 to tan^{-1}(y/x), we can multiply r by -1 to get the corresponding radial coordinate.

Cartesian to Polar Coordinates (2)

*If x = 0*

*Otherwise*

^{2}+y

^{2}) if x > 0 -√(x

^{2}+y

^{2}) if x < 0

^{-1}(y/x)

The radial coordinate in the above can be expressed concisely using the **signum function, sgn()**, as:

Cartesian to Polar Coordinates

*If x = 0*

*Otherwise*

^{2}+y

^{2}) φ = tan

^{-1}(y/x)

NOTE: Each of the above three formulas can be used to convert Cartesian to polar coordinates.