Geodesic — In mathematics and specifically in differential geometry, a geodesic is a path that furnishes shortest paths between any points on it that are close enough together.
The most familiar examples are the straight lines in Euclidean geometry. In more general spaces the geodesics can be more complicated, but one often still thinks of them as “straight” in a sense.
On a sphere, for instance, the geodesics are the great circles. The shortest path from point A to point B on a sphere is given by the shorter piece of the great circle passing through A and B. Note that if A and B are antipodal points (like the North pole and the South pole), then there are many shortest paths between them.
In the theory of general relativity, particles travel along geodesics through space-time, and so their paths depend on the space-time’s curvature. This curvature is in turn is determined by the energy and mass distribution; this is the content of the Einstein equation.
In general, geodesics can be defined for any Riemannian manifold. Every shortest path from A to B yields a geodesic, but the converse is not always true, as the example of a sphere shows.
Furthermore, it is possible that there are no shortest paths from A to B, but there are geodesics connecting A and B. An example of this is the sphere with a point between A and B removed.