How do I convert from Cartesian to polar coordinates?
Given a Cartesian point (x, y), the polar radius is r = √(x² + y²) and the angle is θ = arctan(y/x). Be sure to account for the quadrant of the point when computing θ — using atan2(y, x) handles all four quadrants correctly and gives angles in the range (−π, π]. See also our use the Vector Addition Calculator.
How do I convert from polar to Cartesian coordinates?
Given polar coordinates (r, θ), the Cartesian equivalents are x = r × cos(θ) and y = r × sin(θ). Make sure θ is in the correct unit (radians or degrees) before applying the trigonometric functions.
Can all Cartesian coordinates be written as polar coordinates?
Yes, every point (x, y) in the Cartesian plane has a polar representation (r, θ). The representation is not unique — adding any multiple of 2π to θ gives the same point, and using a negative r with θ + π is also valid. By convention, r ≥ 0 and θ ∈ [0, 2π) or (−π, π] is typically chosen.
What is the polar point (2, π) in Cartesian coordinates?
Using x = r cos θ and y = r sin θ: x = 2 × cos(π) = −2 and y = 2 × sin(π) = 0. So the Cartesian point is (−2, 0), which lies on the negative x-axis at a distance of 2 from the origin.
What does the radius r represent in polar coordinates?
The radius r (also called the radial distance or modulus) represents the straight-line distance from the origin (pole) to the point. It is always non-negative in the standard convention and equals √(x² + y²) when converting from Cartesian coordinates.
What is the difference between atan and atan2 when computing the angle?
The standard arctan function only returns angles in (−π/2, π/2), so it cannot distinguish between points in opposite quadrants (e.g. (1,1) and (−1,−1) give the same arctan value). The atan2(y, x) function uses the signs of both x and y to return the correct angle across all four quadrants in (−π, π].
Are polar coordinates used only in 2D?
Standard polar coordinates are a 2D system. For three-dimensional space, the analogues are cylindrical coordinates (r, θ, z) and spherical coordinates (ρ, θ, φ), which extend the polar idea by adding a vertical dimension or a second angle.