## Conversion between Polar and Cartesian Coordinates

An ordered pair (a, b) when plotted in the Cartesian coordinate system, generally speaking, has 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 is the coordinates of that point in the other coordinate system so that they both locate the same point. To answer this question, we assume the in Cartesian coordinate system the independent axis is horizontal and the dependent axis is vertical and also the polar axis coincide with the x-axis and share the same origin, and that both Cartesian axes and the polar axis have the same scales.

### Converting Polar Coordinates to Cartesian Coordinates

Converting polar coordinates to Cartesian coordinates, by the way trig functions are defined on a trig circle, is straightforward. Referring to the following figure, it is obvious 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. Because 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 you see from the following figure regardless of the location of the point (x, y), by the *Pythagorean Theorem*, we have
r =√( x^{2} + y^{2}) and we have tan(φ) = y/x
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 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 have to add (or subtract) π to the 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 above can be expressed concisely by using the **signum** function, *sgn()*, as

Cartesian to Polar Coordinates

*If x = 0*

*Otherwise*

^{2}+y

^{2}) φ = tan

^{-1}(y/x)