An ordered pair `(a,b)`

plotted in the **Cartesian or polar coordinate systems** typically has a different location from when plotted in the other coordinate system (with the same origin or 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.

**Remark** (**complex numbers convertion**): For those familiar with complex numbers, or for users of complex number calculators like our rectangular/polar complex number converter, the conversion here is analogous to converting between rectangular and polar forms of complex numbers. By noting that the complex number `a + bi`

can also be represented by the ordered pair `(a,b)`

, the following conversion formulae can also be applied to complex number conversion.

As shown in the following figure, regardless of the location of the point `(x,y)`

, we have `r =√(x`

and ^{2} + y^{2})`tan(φ) = y/x`

by the *Pythagorean Theorem*.

Because `tan`

always gives an ^{-1}()*angle* between `-π/2`

and `π/2`

, we have `φ = tan`

if ^{-1}(y/x)`(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`

, it must be non-zero. For the case where `x = 0`

, the point is on the y-axis and the **polar angle** 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`

to obtain the corresponding ^{-1}(y/x)**polar angle**.

To summarize:

Cartesian to Polar Coordinates (1)

`x = 0`

, then`r = y`

`φ = π/2`

`r = √(x`^{2}+y^{2})

`φ = `

{
`tan`^{-1}(y/x)

if `x > 0`

`tan`^{-1}(y/x)+π

if `x < 0`

Alternatively, when `x < 0`

, instead of adding `π/2`

to `tan`

, we can multiply ^{-1}(y/x)`r`

by `-1`

to get the corresponding **radial coordinate**.

Cartesian to Polar Coordinates (2)

r = y
φ = π/2

r = {

φ= tan
√(x^{2}+y^{2}) if x > 0
-√(x^{2}+y^{2}) if x < 0

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

Cartesian to Polar Coordinates

`x = 0`

, then`r = y`

`φ = π/2`

`r = sgn(x)√(x`^{2}+y^{2})

`φ = tan`^{-1}(y/x)

Note: Any of the above three formulas can be used to convert Cartesian to polar 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φ`

.