# The distance between point P_{1}(\rho_{1},\ \theta_{1},\ \phi_{1}) and P_{2}(\rho_{2},\ \theta_{2},\

The distance between point $$\displaystyle{P}_{{{1}}}{\left(\rho_{{{1}}},\ \theta_{{{1}}},\ \phi_{{{1}}}\right)}$$ and $$\displaystyle{P}_{{{2}}}{\left(\rho_{{{2}}},\ \theta_{{{2}}},\ \phi_{{{2}}}\right)}$$ given in spherical coordinates extract the formula.

• Questions are typically answered in as fast as 30 minutes

### Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Cheryl King

Step 1
Given point $$\displaystyle{P}_{{{1}}}{\left(\rho_{{{1}}},\ \theta_{{{1}}},\ \phi_{{{1}}}\right)},\ {P}_{{{2}}}{\left(\rho_{{{2}}},\ \theta_{{{2}}},\ \phi_{{{2}}}\right)}$$
Let corresponding coutesian cordinates are,
$$\displaystyle{P}_{{{1}}}{\left({x}_{{{1}}},\ {y}_{{{1}}},\ {z}_{{{1}}}\right)}\ \&\ {P}_{{{2}}}{\left({x}_{{{2}}},\ {y}_{{{2}}},\ {z}_{{{2}}}\right)}$$
Relation between coutesian cordinates and sherical coordinates are
$$\displaystyle{x}_{{{1}}}=\rho_{{{1}}},\ {{\sin{\theta}}_{{{1}}},}\ {{\cos{\phi}}_{{{1}}}}$$
$$\displaystyle{y}_{{{1}}}=\rho_{{{1}}},\ {{\sin{\phi}}_{{{1}}},}\ {{\sin{\theta}}_{{{1}}}}$$
$$\displaystyle{z}_{{{1}}}=\rho_{{{1}}},\ {{\cos{\theta}}_{{{1}}}}$$
$$\displaystyle{x}_{{{2}}}=\rho_{{{2}}},\ {{\sin{\theta}}_{{{2}}},}\ {{\cos{\phi}}_{{{2}}}}$$
$$\displaystyle{y}_{{{2}}}=\rho_{{{2}}}{{\sin{\theta}}_{{{2}}}\ }{{\sin{\phi}}_{{{2}}}}$$
$$\displaystyle{z}_{{{2}}}=\rho_{{{2}}}\ {{\cos{\theta}}_{{{2}}}}$$
Distance between paints $$\displaystyle{P}_{{{1}}}\ \&\ {P}_{{{2}}}$$
$$\displaystyle{d}=\sqrt{{{\left({x}_{{{1}}}-{x}_{{{2}}}\right)}^{{{2}}}+{\left({y}_{{{1}}}-{y}_{{{2}}}\right)}^{{{2}}}+{\left({z}_{{{1}}}-{z}_{{{2}}}\right)}^{{{2}}}}}$$
$$\displaystyle=\sqrt{{{{x}_{{{1}}}^{{{2}}}}+{x}_{{{2}}}-{2}{x}_{{{1}}}{x}_{{{2}}}+{{y}_{{{1}}}^{{{2}}}}+{{y}_{{{2}}}^{{{2}}}}-{2}{y}_{{{1}}}{y}_{{{2}}}+{{z}_{{{1}}}^{{{2}}}}+{{z}_{{{2}}}^{{{2}}}}-{2}{z}_{{{1}}}{z}_{{{2}}}}}$$
$$\displaystyle=\sqrt{{{\left({{x}_{{{1}}}^{{{2}}}}+{{y}_{{{1}}}^{{{2}}}}+{{z}_{{{1}}}^{{{2}}}}\right)}+{\left({{x}_{{{2}}}^{{{2}}}}+{{y}_{{{2}}}^{{{2}}}}+{{z}_{{{2}}}^{{{2}}}}\right)}-{2}{\left({x}_{{{1}}}{x}_{{{2}}}+{y}_{{{1}}}{y}_{{{2}}}+{z}_{{{1}}}{z}_{{{2}}}\right)}}}$$
But $$\displaystyle{{x}_{{{1}}}^{{{2}}}}+{{y}_{{{1}}}^{{{2}}}}+{{z}_{{{1}}}^{{{2}}}}={\rho_{{{1}}}^{{{2}}}}$$
and $$\displaystyle{{x}_{{{2}}}^{{{2}}}}+{{y}_{{{2}}}^{{{2}}}}+{{z}_{{{2}}}^{{{2}}}}={\rho_{{{2}}}^{{{2}}}}$$
and also put the values of $$\displaystyle{x}_{{{1}}},\ {x}_{{{2}}},\ {y}_{{{1}}},\ {y}_{{{2}}},\ {z}_{{{1}}},\ {z}_{{{2}}}$$
we get,
$$\displaystyle{d}=\sqrt{{{\rho_{{{1}}}^{{{2}}}}+{\rho_{{{2}}}^{{{2}}}}-{2}{x}{\left(\rho_{{{1}}}\ {{\sin{\theta}}_{{{1}}}\ }{\cos{\phi}}_{{{1}}}\right)}{\left(\rho_{{{2}}}\ {{\sin{\theta}}_{{{2}}}\ }{\cos{\phi}}_{{{2}}}\right)}}}$$
$$\displaystyle=\sqrt{{-{2}{\left(\rho_{{{1}}}{{\sin{\theta}}_{{{1}}}{\sin{\phi}}_{{{1}}}}\right)}{\left(\rho_{{{2}}}{{\sin{\theta}}_{{{2}}}{\sin{\phi}}_{{{2}}}}\right)}-{2}{\left(\rho_{{{1}}}{\cos{\theta}}_{{{1}}}\right)}{\left(\rho_{{{2}}}{\cos{\theta}}_{{{2}}}\right)}}}$$
$$\displaystyle{d}=\sqrt{{{\rho_{{{1}}}^{{{2}}}}+{\rho_{{{2}}}^{{{2}}}}-{2}\rho_{{{1}}}\rho_{{{2}}}{{\sin{\theta}}_{{{1}}}{{\sin{\theta}}_{{{2}}}{\left({{\cos{\phi}}_{{{1}}}{{\cos{\phi}}_{{{2}}}+}}{{\sin{\phi}}_{{{1}}}{\sin{\phi}}_{{{2}}}}\right)}}}-{2}\rho_{{{1}}}\rho_{{{2}}}{{\cos{\theta}}_{{{1}}}{\cos{\theta}}_{{{2}}}}}}$$
Step 2
$$\displaystyle\Rightarrow{d}=\sqrt{{{\rho_{{{1}}}^{{{2}}}}+{\rho_{{{2}}}^{{{2}}}}-{2}\rho_{{{1}}}\rho_{{{2}}}{{\sin{\theta}}_{{{1}}}{{\sin{\theta}}_{{{2}}}{\cos{{\left(\phi_{{{1}}}-\phi_{{{2}}}\right)}}}}}-{2}\rho_{{{1}}}\rho_{{{2}}}{{\cos{\theta}}_{{{1}}}\times}{\cos{\theta}}_{{{2}}}}}$$
$$\displaystyle{\left\lbrace∵{\cos{{A}}}{\cos{{B}}}+{\sin{{A}}}{\sin{{B}}}={\cos{{\left({A}-{B}\right)}}}\right\rbrace}$$

###### Not exactly what you’re looking for?
ambarakaq8
Assuming that $$\displaystyle\theta$$ is the latitude and $$\displaystyle\phi$$ is the longitude we have that the cartesian coordinates of the first point are:
$$\displaystyle{\left(\rho_{{{1}}}{{\cos{\theta}}_{{{1}}}{{\cos{\phi}}_{{{1}}},}}\ \rho_{{{1}}}{{\cos{\theta}}_{{{1}}}{{\sin{\phi}}_{{{1}}},}}\ \rho_{{{1}}}{\sin{\theta}}_{{{1}}}\right)}$$
so the distance between the two points is given by:
$$\displaystyle\sqrt{{{\rho_{{{1}}}^{{{2}}}}+{\rho_{{{2}}}^{{{2}}}}-{2}\rho_{{{1}}}\rho_{{{2}}}{\left({{\cos{\theta}}_{{{1}}}{{\cos{\theta}}_{{{2}}}{\cos{{\left(\phi_{{{1}}}-\phi_{{{2}}}\right)}}}}}+{{\sin{\theta}}_{{{1}}}{\sin{\theta}}_{{{2}}}}\right\rbrace}}}$$
nick1337

Step 1
The expression of the distance between two vectors in spherical coordinates provided in the other response is usually expressed in a more compact form that is not only easier to remember but is also ideal for capitalizing on certain symmetries when solving problems.
$$||r-r'||=\sqrt{(x-x')^{2}+(y-y')^{2}+(z-z')^{2}}$$
$$=\sqrt{r^{2}+r'^{2}-2rr'[\sin(\theta)\sin(\theta')\cos(\phi)\cos(\phi')+\sin(\theta)\sin(\theta')\sin(\phi)\sin(\phi')+\cos(\theta)\cos(\theta')]}$$
$$=\sqrt{r^{2}+r'^{2}-2rr'[\sin(\theta)\sin(\theta')(\cos(\phi)\cos(\phi')+\sin(\phi)\sin(\phi'))+\cos(\theta)\cos(\theta')]}$$
$$=\sqrt{r^{2}+r'^{2}-2rr'[\sin(\theta)\sin(\theta')\cos(\phi-\phi')+\cos(\theta)\cos(\theta')]}$$
This form makes it fairly transparent how azimuthal symmetry allows you to automatically eliminate some of the angular dependencies in certain integration problems
Another advantage of this form is that you now have at least two variables, namely $$\phi\ and\ \phi'$$,  that appear in the equation only once, which can make finding series expansions w.r.t. these variables a little less of a pain than the others.