Great circle

A great circle of a sphere is the intersection of the surface of the sphere with a plane passing through the center C of the sphere. The radius of a great circle is equal to the radius of the sphere. The center of the great circle coincides with the center of the sphere. An intersection plane that does not pass through the center of the sphere cuts off a circle that is smaller (has a smaller radius).

It can be proved that a great circle passing through two points is a geodetic, a line of shortest distance connecting the two points. In the figure we see a plane spanned by two vectors (r1 and r2) that passes through C. Hence the green arc is part of the great circle connecting the two points and is the shortest distance between the points.

It is not difficult to find an expression for the angle &alpha;, the length of the green arc. Write in spherical polar coordinates the dot product

\begin{align} \mathbf{r}_1\cdot\mathbf{r}_2 &= r^2 \cos\alpha \\ &=\left( r\cos\phi_1\sin\theta_1, r\sin\phi_1\sin\theta_1, r\cos\theta_1\right) \begin{pmatrix} r\cos\phi_2\sin\theta_2\\ r\sin\phi_2\sin\theta_2\\ r\cos\theta_2 \end{pmatrix} \\ &= r^2 \sin(\phi_1+\phi_2)\sin\theta_1\sin\theta_2 + r^2\cos\theta_1\cos\theta_2, \end{align} $$ where we wrote r for the radius of the sphere and used that this is the length of both vectors. Now clearly

\alpha = \arccos \big(\sin(\phi_1+\phi_2)\sin\theta_1\sin\theta_2 + \cos\theta_1\cos\theta_2 \big)\, $$ is the required arc length.