# What is the formula for the distance between two polar coordinates?

Aug 21, 2014

sqrt(r_1^2+r_2^2-2r_1r_2cos(theta_1-theta_2)

#### Explanation:

The distance is sqrt(r_1^2+r_2^2-2r_1r_2cos(theta_1-theta_2) if we are given ${P}_{1} = \left({r}_{1} , {\theta}_{1}\right)$ and ${P}_{2} = \left({r}_{2} , {\theta}_{2}\right)$.

This is an application of the cosine law. Taking the difference between ${\theta}_{1}$ and ${\theta}_{2}$ gives us the angle between side ${r}_{1}$ and side ${r}_{2}$. And the cosine law gives us the length of the ${3}^{r d}$ side.

Jun 13, 2017

See below.

#### Explanation:

Given in cartesian coordinates.

${P}_{1} = \left({x}_{1} , {y}_{1}\right)$ and ${P}_{2} = \left({x}_{2} , {y}_{2}\right)$

the transition formulas

$\left\{\begin{matrix}x = r \cos \theta \\ y = r \sin \theta\end{matrix}\right.$

then

$\left({x}_{1} , {y}_{1}\right) \Rightarrow \left({r}_{1} \cos {\theta}_{1} , {r}_{1} \sin {\theta}_{1}\right)$
$\left({x}_{2} , {y}_{2}\right) \Rightarrow \left({r}_{2} \cos {\theta}_{2} , {r}_{2} \sin {\theta}_{2}\right)$

so

$d = \sqrt{{\left({x}_{1} - {x}_{2}\right)}^{2} + {\left({y}_{1} - {y}_{2}\right)}^{2}} \Rightarrow \sqrt{{\left({r}_{1} \cos {\theta}_{1} - {r}_{2} \cos {\theta}_{2}\right)}^{2} + {\left({r}_{1} \sin {\theta}_{1} - {r}_{2} \sin {\theta}_{2}\right)}^{2}}$

then

$d = \sqrt{{r}_{1}^{2} + {r}_{2}^{2} - 2 {r}_{1} {r}_{2} \left(\cos {\theta}_{1} \cos {\theta}_{2} + \sin {\theta}_{1} \sin {\theta}_{2}\right)} = \sqrt{{r}_{1}^{2} + {r}_{2}^{2} - 2 {r}_{1} {r}_{2} \cos \left({\theta}_{1} - {\theta}_{2}\right)}$