Rectangular to Polar Coordinates Logo
Rectangular to Polar Coordinates
Geometry & Math • July 23, 2026

How to Calculate Distance and Angle Between Two Points in Polar Coordinates

Learn how to calculate distance and angle between two points in polar coordinates using the Law of Cosines without converting back to Cartesian coordinates.

How to Calculate Distance and Angle Between Two Points in Polar Coordinates

Calculating the distance and angle between two points in polar coordinates (r1,θ1)(r_1, \theta_1) and (r2,θ2)(r_2, \theta_2) is a fundamental task in geometry, physics, and navigational routing.

While a common approach is to convert both polar points back to Cartesian rectangular coordinates (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) and apply the standard Pythagorean distance formula, there is a direct mathematical shortcut using the Law of Cosines. To perform individual point conversions online, test our interactive rectangular to polar converter or read our complete tutorial on How to Convert Rectangular to Polar Coordinates.


Formula for Distance and Angle Between Two Points in Polar Coordinates

The straight-line Euclidean distance dd between two points P1=(r1,θ1)P_1 = (r_1, \theta_1) and P2=(r2,θ2)P_2 = (r_2, \theta_2) in polar coordinates is given by:

d=r12+r22−2r1r2cos⁡(θ2−θ1)d = \sqrt{r_1^2 + r_2^2 - 2 r_1 r_2 \cos(\theta_2 - \theta_1)}

Mathematical Derivation via Law of Cosines

  1. Consider the triangle formed by the origin O(0,0)O(0,0), point P1(r1,θ1)P_1(r_1, \theta_1), and point P2(r2,θ2)P_2(r_2, \theta_2).
  2. Side OAOA has length r1r_1, side OBOB has length r2r_2, and the opposite side ABAB is the distance dd.
  3. The enclosed angle between the two position vectors is Δθ=∣θ2−θ1∣\Delta \theta = |\theta_2 - \theta_1|.
  4. Applying the Law of Cosines (c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab \cos C): d2=r12+r22−2r1r2cos⁡(Δθ)d^2 = r_1^2 + r_2^2 - 2 r_1 r_2 \cos(\Delta \theta)
  5. Taking the square root yields the polar distance formula.

Solved Example: Distance Between Two Polar Points

Problem: Find the distance between P1=(5,30∘)P_1 = (5, 30^\circ) and P2=(8,90∘)P_2 = (8, 90^\circ)

  1. Identify Given Values:

    • r1=5,θ1=30∘r_1 = 5, \quad \theta_1 = 30^\circ
    • r2=8,θ2=90∘r_2 = 8, \quad \theta_2 = 90^\circ
  2. Calculate Enclosed Angle Δθ\Delta \theta: Δθ=90∘−30∘=60∘\Delta \theta = 90^\circ - 30^\circ = 60^\circ

  3. Apply the Polar Distance Formula: d=52+82−2(5)(8)cos⁡(60∘)d = \sqrt{5^2 + 8^2 - 2(5)(8) \cos(60^\circ)} d=25+64−80(0.5)=89−40=49=7d = \sqrt{25 + 64 - 80(0.5)} = \sqrt{89 - 40} = \sqrt{49} = 7

Result: The exact distance between P1P_1 and P2P_2 is 7 units.


Practical Applications in Radar Target Tracking and Collision Avoidance

Calculating distance directly in polar coordinates avoids unnecessary round-trip conversions to Cartesian form:

  • Marine Radar Range Tracking: When an automated radar plotting aid (ARPA) tracks two surface vessels at coordinates (r1,θ1)(r_1, \theta_1) and (r2,θ2)(r_2, \theta_2), the polar distance formula computes the distance between them in real time to trigger closest point of approach (CPA) alarms.
  • Drone Swarm Formations: Autonomous aerial vehicles measure relative distances to neighboring drones using lidar range (r)(r) and gimbal azimuth (θ)(\theta) to maintain swarm spacing.
  • Acoustic Sonar Triangulation: Subsurface hydrophone arrays calculate target distances from acoustic bearing angles without having to establish a shared Cartesian grid.

Learn more about directional applications in Applications of Polar Coordinates in Navigation and Radar.


Frequently Asked Questions

Does the order of θ1\theta_1 and θ2\theta_2 matter?

No. Because cosine is an even function (cos⁡(−Δθ)=cos⁡(Δθ)\cos(-\Delta \theta) = \cos(\Delta \theta)), ∣θ2−θ1∣=∣θ1−θ2∣|\theta_2 - \theta_1| = |\theta_1 - \theta_2|, yielding identical distance results.

What if Δθ=0∘\Delta \theta = 0^\circ?

If Δθ=0∘\Delta \theta = 0^\circ, cos⁡(0∘)=1\cos(0^\circ) = 1. The formula simplifies to d=r12+r22−2r1r2=(r1−r2)2=∣r1−r2∣d = \sqrt{r_1^2 + r_2^2 - 2r_1r_2} = \sqrt{(r_1 - r_2)^2} = |r_1 - r_2|, which is the simple scalar difference between two points lying on the same radial line.


• Rectangular to Polar Converter – Convert individual coordinates online instantly.

• Applications of Polar Coordinates – Read about radar navigation and robotics geometry.

• Step-by-Step Rectangular to Polar Guide – Manual calculations with full quadrant explanations.

• Polar vs Cartesian Coordinates – Comparing efficiency between coordinate systems.

• Rectangular to Polar Formulas – Complete mathematical identities and vector formulas.