on the appropriate space of curves , where is the metric tensor. This implies that it satisfies the corresponding Euler-Lagrange equations, which in this case means that the covariant derivative (for the Levi-Civita connection)
In local coordinates, with Christoffel symbols the Euler-Lagrange equations for geodesics form a system
A geodesic may not globally minimize the distance between its end points. For instance, on a 2-dimensional sphere, geodesics are arcs? of great circle?s. Any two distinct non-antipodal points are connected by exactly two such geodesics, one shorter than the other (you can go from Los Angeles to Boston directly across North America, or the long way around the world).
A geodesic which does globally minimize distance between its end points is called a minimizing geodesic. The length of a minimizing geodesic between two points defines a distance function for any Riemannian manifold which makes it into a metric space.
Sh. Kobayashi, K. Nomidzu, Foundations of differential geometry, vol 1, 1963, vol 2, 1969, Wiley Interscience; reedition 1996 in series Wiley Classics; Russian ed.: Nauka, Moscow 1981.
Arthur L. Besse, Einstein manifolds, Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 10, Springer-Verlag 1987, xii + 510 pp. (for a review see Bull. AMS and MR88f:53087); reprinted 2008, Springer Classics in Math.