How can a single dot product determine the shortest distance between two points on a sphere? The answer connects vectors, trigonometry, calculus, navigation, and geometry in any dimension.
1. Two meanings of distance
On a flat sheet, the shortest path between two points is a straight segment. On the surface of a sphere, however, a straight segment generally passes through the sphere. If travel is restricted to the surface, the shortest route is an arc of a great circle, a circle obtained by intersecting the sphere with a plane through its center.
Let and be points on the unit sphere in , so . Their dot product satisfies
where is the angle between the radius vectors. Since the unit great circle has radius one, its shorter arc has length . Thus
On a sphere of radius , with position vectors of length , the formula becomes
Figure 1. The surface route and the straight chord join the same endpoints. The sketch is schematic; the exact arc is a great-circle arc.
2. Chord distance versus spherical distance
The ordinary Euclidean distance between the two unit vectors is
Expanding the square gives
Using , we obtain
For example, if the central angle is , the chord length is , whereas the spherical distance is . They agree approximately for nearby points, but not for distant ones.
Because for , we have . More precisely,
The lower bound follows from the concavity of sine on . Both constants are sharp: the upper bound is approached as the points merge, and the lower bound is attained for antipodal points.
3. Why is a great circle really the shortest path?
So far, we have computed the length of a great-circle arc. But why can no other surface curve be shorter? Here is a proof using only vectors and a basic inequality from calculus.
Fix , and let be any piecewise continuously differentiable curve from to . Define its angular separation from the starting point by
Where , differentiation gives
Since , differentiating shows that . Therefore
The vector in parentheses has length
By Cauchy-Schwarz,
The same inequality holds for the accumulated change in across the exceptional values and , by continuity and the Lipschitz property of the angular-distance function along a smooth curve (or by applying the inequality on intervals away from those values and taking limits). Consequently,
Now set , with , and choose the unit vector
Then , and the curve
lies on the unit sphere, joins the endpoints, and satisfies . Its length is exactly , proving the minimum. Identical endpoints have distance zero. For antipodal endpoints, any half of a great circle has length and is minimizing.
4. Why the formula satisfies the triangle inequality
A distance must obey the triangle inequality. The shortest-path interpretation immediately implies
Indeed, travel from to along a shortest arc, then from to . This produces a surface path of length . The shortest path directly from to cannot be longer.
There is also a purely algebraic proof. Write and . Decompose
where , , and . Cauchy-Schwarz yields
If , the fact that arccosine is decreasing gives . If , the conclusion is automatic because spherical distances never exceed . Thus the triangle inequality is proved directly from vector algebra.
5. From vectors to latitude and longitude
Suppose a location on an ideal spherical Earth of radius has latitude and longitude , both measured in radians. Its position vector is
For two locations, dividing their dot product by and using the cosine difference identity gives
Hence the great-circle distance is
Example. Consider two points on the equator separated by in longitude. Their central angle is , so their surface distance is , whereas the straight chord through the Earth has length .
For very close geographical points, the arccosine formula can lose numerical accuracy because its argument is near one. In software, the equivalent haversine formula is often preferable:
Real Earth is not a perfect sphere, so precise geodesic calculations use an ellipsoidal model.
6. The same formula in every dimension
I came across this formula again while researching Gelfand widths, a topic in approximation theory where the geometry of high-dimensional spheres plays a central role. The formula itself is classical, but it is exactly the tool needed there.
Nothing in the shortest-path proof depended on having exactly three coordinates. On the unit sphere
we still have
The shortest arc always lies in the two-dimensional plane spanned by the endpoint vectors, provided they are not parallel. Thus a problem in an arbitrarily high-dimensional space reduces to an ordinary circle!
7. A bonus: how to interpolate along the sphere
Suppose we want not just the distance but the point a fraction of the way along the shortest arc. For , where , the constant-speed interpolation is
To see why, substitute . The expression simplifies to
It follows that , , , and . This construction is known as spherical linear interpolation, or SLERP. It is useful for smoothly interpolating directions and orientations in computer graphics and robotics.
At , use the constant path. At , the endpoints are antipodal and there are infinitely many shortest semicircular paths, so an additional direction must be chosen.
8. Try it yourself
- For and , compute both the chord and spherical distances.
- Find the spherical distance between and . How many shortest surface paths connect them?
- Prove that as , with .
- Show that the midpoint of the shorter great-circle arc is whenever the endpoints are distinct and not antipodal.
Answers and hints
1. , . 2. ; infinitely many shortest semicircles. 3. Use and . 4. The normalized vector sum bisects the central angle.
Final thought
A dot product seems like a simple algebraic operation. Yet, after taking an arccosine, it becomes the natural distance on a curved space. The same identity explains great-circle navigation, the geometry of high-dimensional unit vectors, and smooth interpolation on spheres. Sometimes the most useful geometric formulas are hiding inside familiar algebra.
The spherical distance formula relies on the Cauchy-Schwarz inequality , which guarantees that the dot product of two unit vectors lies between -1 and 1. This fundamental inequality connects vector geometry, distances, and angles.
For an integral that uses the same symmetry of the sphere, read A Surprising Integral on the Sphere: Why Every Direction Is the Same.

Leave a Reply