Convert rectangular (Cartesian) coordinates (x, y) to polar coordinates (r, θ). Essential tool for mathematics, physics, and engineering applications.
Coordinate systems are essential in mathematics, physics, engineering, and many other fields for describing the position of points in space.
Rectangular (Cartesian) Coordinates (x, y):
Polar Coordinates (r, θ):
| Conversion | Formulas | Notes |
|---|---|---|
| Rectangular to Polar |
r = √(x² + y²) θ = atan2(y, x) |
atan2 gives correct quadrant for θ (0 to 2π) |
| Polar to Rectangular |
x = r·cos(θ) y = r·sin(θ) |
Direct conversion using trigonometric functions |
| Quadrant Determination |
I: x>0, y>0 → 0° < θ < 90° II: x<0, y>0 → 90° < θ < 180° III: x<0, y<0 → 180° < θ < 270° IV: x>0, y<0 → 270° < θ < 360° |
atan2(y, x) automatically handles this |
| Special Cases |
Origin: (0, 0) → r=0, θ undefined On x-axis: y=0 → θ=0° (x>0) or 180° (x<0) On y-axis: x=0 → θ=90° (y>0) or 270° (y<0) |
For origin, θ is typically taken as 0 by convention |
The atan2(y, x) function is essential for correct rectangular to polar conversion because it considers the signs of both x and y to determine the correct quadrant for the angle θ.
Why not use arctan(y/x)? The regular arctan(y/x) only gives angles in the range (-90°, 90°), which covers only Quadrants I and IV. It cannot distinguish between points in Quadrants II and III.
How atan2 works: atan2(y, x) returns the angle from the positive x-axis to the point (x, y), with the result in the range (-π, π] radians or (-180°, 180°] degrees.
Standard conversion: To get θ in the standard range [0, 2π) or [0°, 360°), add 2π or 360° to negative angles.
Physics: Converting position vectors from Cartesian to polar form for problems with circular or rotational symmetry.
Engineering: Signal processing where polar form (magnitude and phase) is more convenient than rectangular form (real and imaginary parts).
Computer Graphics: Converting between coordinate systems for rotations, transformations, and texture mapping.
Navigation: Converting Cartesian map coordinates to bearing and distance for navigation purposes.
Calculator Features: