The great-circle distance is the shortest distance between any two points on the surface of a sphere measured along a path on the surface of the sphere (as opposed to going through the sphere's interior). Because spherical geometry is rather different from ordinary Euclidean geometry, the equations for distance take on a different form. The distance between two points in Euclidean space is the length of a straight line from one point to the other. On the sphere, however, there are no straight lines. In non-Euclidean geometry, straight lines are replaced with Geodesics. Geodesics on the sphere are the great circles (circles on the sphere whose centers are coincident with the center of the sphere).
Between any two points on a sphere which are not directly opposite each other, there is a unique great circle. The two points separate the great circle into two arcs. The length of the shorter arc is the great-circle distance between the points. A great circle endowed with such a distance is the Riemannian circle.
Between two points which are directly opposite each other, called antipodal points, there are infinitely many great circles, but all great circle arcs between antipodal points have the same length, i.e. half the circumference of the circle, or , where r is the radius of the sphere.
Because the Earth is approximately spherical (see Earth radius), the equations for great-circle distance are important for finding the shortest distance between points on the surface of the Earth, and so have important applications in navigation.
The geographical formula
Let be the geographical latitude and longitude of two points (a base "standpoint" and the destination "forepoint"), respectively, the longitude difference and the (spherical) angular difference/distance, or central angle, which can be constituted from the spherical law of cosines:
The distance d, i.e. the arc length, for a sphere of radius r and given in radians, is then:
This arccosine formula above can have large rounding errors for the common case where the distance is small, however, so it is not normally used. Instead, an equation known historically as the haversine formula was preferred, which is much more accurate for small distances: