Geodesics as Variational Problems
The oldest question in the calculus of variations is also the most concrete: among all the smooth curves joining two fixed points, which is shortest? On a flat table the answer is the straight line every child knows. But stretch the same question over the surface of the Earth, a saddle, or the curved spacetime around a black hole, and "straight line" loses its meaning — none lies in the surface. What survives is the curve that is as straight as possible, the one that extremizes the arc-length functional . These extremals are the geodesics, and finding them is the prototype problem the whole machinery of variations — the Euler–Lagrange equation, the fundamental lemma, first integrals — was built to solve. This article takes the variational route from the length functional to the geodesic equation and shows why the naive route is booby-trapped. Because arc length does not care how you parametrize the curve, its Lagrangian is degenerate — it fixes the shape of the geodesic but not the clock along it. The remedy is to vary the energy functional instead, a clean quadratic that delivers the same curves with a built-in affine parameter and a conserved speed. From that single equation flow great circles on the sphere, helices on the cylinder, Clairaut's turning law on surfaces of revolution, and the free-fall trajectories of general relativity. One subtlety runs underneath: stationary is not the same as shortest. A geodesic is always locally the shortest path, but past a conjugate point — antipodes on a sphere — it stops minimizing while still solving the equation.
- A geodesic is a curve that makes the arc-length functional stationary between fixed endpoints on a surface or Riemannian manifold — the "straightest possible" path.
- Applying the Euler–Lagrange equation gives the geodesic equation , with Christoffel symbols built from first derivatives of the metric.
- The arc-length integrand is reparametrization invariant, hence a degenerate Lagrangian; the equivalent energy functional gives the same geodesics but pins an affine parameter and a conserved speed.
- Geometrically the equation says the velocity is parallel-transported: the intrinsic (tangential) acceleration vanishes, so a geodesic has zero turning as felt inside the surface.
- On a sphere geodesics are great circles (); on a cylinder they are helices; on any surface of revolution Clairaut's relation holds.
- Geodesics are only stationary and locally minimizing — the second variation loses positivity past conjugate points, so the "long way round" a sphere is a geodesic that is not shortest.
- Key idea: geodesics are the Euler–Lagrange solutions of the arc-length functional; because arc length is reparametrization invariant one varies the equivalent non-degenerate energy functional, which yields the affinely parametrized geodesic equation .
Geodesics are the Euler–Lagrange solutions of the arc-length functional; because arc length is reparametrization invariant the variation is best done on the equivalent energy functional, which delivers the affinely parametrized geodesic equation .
Where this lives today
The geodesic equation is the working equation of motion for the century's most dramatic observations. When the Event Horizon Telescope resolved the bright ring around M87 in 2019 and Sagittarius A in 2022, it imaged a bundle of null geodesics — photon paths bent by the Schwarzschild-like metric so severely that light skims a photon sphere at before escaping, producing a dark shadow whose measured angular diameter (about microarcseconds for M87*) matches general relativity. The GRAVITY instrument tracked the star S2 around the Galactic-centre black hole and detected the Schwarzschild precession of its orbit — roughly arcminutes per revolution — a timelike geodesic bending exactly as the variational equation demands. The same mathematics keeps GPS honest, correcting the satellites' clocks and orbits for spacetime curvature. Far from gravity, geodesics are now a staple of data science — in information geometry the distance between probability distributions is a geodesic length in the Fisher metric, and graphics engines compute geodesics on meshes to lay textures and plan paths — each the calculus-of-variations problem of this article on a different metric.
The physical picture
Stretch an ideal elastic band between two pins on a curved surface, forcing it to stay on the surface. It settles into a geodesic, because a taut band minimizes its length. Feel along it: the band pulls you nowhere sideways. Its only acceleration points straight out of the surface — the normal reaction that keeps it there — with no component in the surface, and that vanishing of the in-surface acceleration is the whole content of the geodesic equation. A bug walking the band would swear it was going dead straight, never turning left or right relative to the surface. Equivalently: hold a car's steering wheel rigidly centred and drive across a hill; you make no intrinsic turn, yet the tyre tracks bend when viewed from outside. That "no intrinsic turning" is parallel transport of the velocity vector, and its track is a geodesic.
Length and energy tell the same story on-shell but disagree off it. By Cauchy–Schwarz , with equality precisely for constant-speed curves, so a constant-speed minimizer of the energy automatically minimizes the length — and energy, carrying no square root, has non-degenerate equations and a uniform clock built in. The picture must also carry one warning: "stationary" is weaker than "shortest". Between two nearby points on a sphere both the short great-circle arc and the long way round satisfy the geodesic equation, yet only the short arc is genuinely shortest; the changeover is policed by conjugate points, where neighbouring geodesics refocus. The next figure makes the two paths concrete with the numbers a navigator actually uses.
The core equations
The starting object is the arc-length functional: it returns a curve's length measured with the metric , and geodesics are the curves at which that length is stationary. On a general parameter the integrand is the local speed .
where: — a smooth curve with fixed endpoints; — components of the Riemannian metric at ; — the coordinate velocity; — an arbitrary parameter, not necessarily arc length. Reading: is unchanged if you re-clock the curve, — this reparametrization invariance is the source of both the geometry's elegance and the Lagrangian's degeneracy. To sidestep the square root one varies the energy (or action) functional instead — the quadratic form of the same velocities, and the natural free-particle Lagrangian, kinetic energy with the metric as a position-dependent mass matrix.
where: — the energy functional, quadratic in velocities and non-degenerate; — conventional normalization matching free-particle kinetic energy. Reading: minimizing over constant-speed curves is equivalent to minimizing , and the minimizer arrives with an affine parameter for free. Both functionals are made stationary by the same master tool, the Euler–Lagrange equation — one equation per coordinate, from demanding the first variation vanish for every endpoint-fixing perturbation (where the fundamental lemma does its work).
where: — the integrand, either (length) or (energy); — the coordinate index. Reading: the "momentum" evolves under the "force" , which for the metric comes entirely from how varies from point to point. Feeding the energy integrand into Euler–Lagrange and cleaning up produces the geodesic equation, the central result — a second-order system for the coordinates in an affine parameter.
where: — coordinate acceleration; — Christoffel symbols of the Levi-Civita connection. Reading: the connection term exactly cancels the ordinary acceleration, so the covariant acceleration is zero — the velocity is parallel-transported. The Christoffel symbols are not new data; they are assembled algebraically from first derivatives of the metric, encoding how the coordinate basis twists from point to point.
where: — the inverse metric, ; . Reading: symmetric in the lower pair, ; they vanish wherever the metric components are constant, which is why flat space in Cartesian coordinates has no connection term. Because the energy Lagrangian has no explicit parameter dependence, the geodesic conserves its speed — the payoff that makes the affine parameter automatic and distinguishes energy from length.
where: const — the squared speed, for the unit-speed (arc-length) parametrization. Reading: a geodesic is traced at uniform pace — you cannot speed up and slow down along it and still solve equation (4). Finally, whether a geodesic actually minimizes is decided one order higher, by the second variation of the energy — its index form built from the covariant derivative of a transverse field and the curvature.
where: — a transverse Jacobi field vanishing at both endpoints; — covariant derivative along the curve; — the Riemann curvature tensor. Reading: positive curvature feeds a negative term that can overpower the gradient term past a conjugate point, tipping below zero — where a geodesic stops minimizing.
The goal is to turn the compact statement "geodesics are stationary points of the energy" into the explicit system , and in doing so to manufacture the Christoffel symbols rather than postulate them. We compute the two pieces of the Euler–Lagrange equation and reorganize the metric derivatives by a symmetrization trick — the secret behind the Christoffel formula — on a route that never touches a square root and so never meets the degeneracy that plagues the length functional.
Step 1. Write the energy Lagrangian , which depends on the velocities through the factors and on position only through the metric . Why: separating velocity from position dependence shows in advance which term produces the acceleration and which the connection.
Step 2. Differentiate with respect to velocity for the momentum, , then take its total time derivative, . Why: the chain rule forces a metric-derivative term to appear, the germ of the connection.
Step 3. Differentiate with respect to position for the "force", , since only the metric carries -dependence. Why: the factor of one-half is exactly what the next step's symmetrization balances against.
Step 4. Assemble the equation and symmetrize the mixed term, (since is symmetric). Subtracting the force term gives . Why: that combination of three metric derivatives is precisely the lowered Christoffel symbol , emerging only once the summed indices are symmetrized.
Step 5. Contract with the inverse metric to raise the free index, using , and obtain with . Why: raising the index isolates the pure acceleration and packages every metric derivative into the standard Christoffel object, completing the equation. *As a check: for all metric derivatives vanish, , and the equation reduces to , as expected for a free particle in flat space; the symmetrized three-derivative combination is precisely equation (5).*
Go deeper · Derivation B · 1 minWhy the arc-length functional is degenerate
The purpose is to show by direct computation what goes wrong if you vary the raw arc-length integrand instead of the energy, and to extract the correction term reparametrization invariance leaves behind. The punchline: the length functional does give the geodesic equation, but only up to a term proportional to the velocity that vanishes exactly when the parameter is affine — the rigorous justification for the whole energy-functional detour.
Step 1. Set and abbreviate the speed as , so . Compute the momentum . Why: the square root plants a factor of in front of everything, and it is that factor whose time-derivative will generate the unwanted term.
Step 2. Compute the position gradient , again carrying the . Why: both Euler–Lagrange pieces now share the weighting, so it can be factored out and compared with the energy calculation.
Step 3. Form the Euler–Lagrange equation and expand the total derivative, keeping the term where . Why: that single piece, , is the fingerprint of the degeneracy — absent only if is constant.
Step 4. Multiply through by and raise the index with ; the metric derivatives reassemble into the Christoffel symbols as before, leaving . Why: the right-hand side is the price of a non-affine clock, and being directed along the velocity it only rescales the parameter, never bends the curve.
Step 5. Impose , so , , the right-hand side vanishes, and the affine geodesic equation is recovered. Why: length and energy give the same geodesic curves — they differ only by the clock, and unit speed erases the difference. *As a check: the right-hand side vanishes if and only if the speed is constant; for a flat metric the equation reduces to up to reparametrization. The velocity-Hessian is singular because it annihilates — a direct consequence of Euler's theorem applied to the degree-one homogeneous integrand.*
Go deeper · Derivation C · 1 minGreat circles as geodesics on the sphere
This derivation runs the geodesic machinery on the round sphere and integrates in closed form to prove the geodesics are exactly the great circles. Rather than grind through both Euler–Lagrange equations, we exploit a symmetry: the azimuthal angle is cyclic, so its equation hands us a conserved quantity and the conserved speed supplies a second first integral. Two first integrals reduce the system to a single quadrature that linearizes, and the Cartesian rewrite reveals the answer as the sphere cut by a plane through its centre.
Step 1. Adopt the unit-sphere metric and energy . Since , the Euler–Lagrange equation gives , so is conserved. Why: a cyclic coordinate always yields a Noether first integral; here is the azimuthal "angular momentum" that plays the same role Clairaut's constant plays on any surface of revolution.
Step 2. Use the conserved unit speed from equation (6) and substitute . Why: combining the two first integrals removes the parameter, turning "solve two ODEs in " into "find the orbit ".
Step 3. Divide by to obtain the orbit equation . Why: eliminating is the standard trick that turns a conserved-momentum problem into a separable relation between the coordinates.
Step 4. Substitute , so , and the orbit equation collapses to the harmonic form . Why: this substitution linearizes the equation into that of a simple oscillator, whose solutions are sinusoids in .
Step 5. Integrate to with . Rewriting with , , gives , a plane through the origin. Why: a plane through the centre cuts the sphere in a great circle, so the solution is precisely the great-circle family — the equator and meridians are the special cases and . *As a check: substituting back into the orbit equation of Step 4 gives an identity. The solution is a central plane section, hence a great circle; the equator and all meridians are recovered as limiting cases.*
Limiting cases
The one equation specializes cleanly to every standard geometry, each a check on the general formula.
| Case | Result | Meaning |
|---|---|---|
| Flat Euclidean space | Geodesics are straight lines ; the equation is Newton's first law. | |
| Sphere of radius | Geodesics are great circles; the short arc between non-antipodal points minimizes, the complementary arc is stationary but longer. | |
| Cylinder | Geodesics are helices (vertical lines and circles as limits): intrinsically flat, so unrolling turns geodesics into straight lines. | |
| Surface of revolution | (Clairaut) | Azimuth-independent metric gives , tying the axis-distance to the meridian angle and forbidding . |
| Curved spacetime | Free-fall worldlines: timelike geodesics extremize proper time, null geodesics carry light. |
Worked examples
1 · Great-circle distance, New York to London (fully worked)
The geodesics of the sphere are great circles. Treat the Earth as a sphere of mean radius km and find the shortest surface distance between New York (latitude N, longitude W) and London (N, W). Compare it to the rhumb-line (constant-heading) route.
Step 1. The great-circle arc is the geodesic, so the distance is times the central angle at the Earth's centre. The spherical law of cosines gives that angle from the latitudes and longitude difference : — the great-circle first integral in disguise, the solution written as a dot product of unit position vectors.
Step 2. Insert the numbers with : . Hence rad.
Step 3. Multiply by the radius: , the length no route can beat.
Step 4. For contrast, a rhumb line holds a single compass bearing ( here) and runs — longer by , about . The gap is modest here because the cities sit at similar latitudes, but it is why transatlantic flights visibly arc north over Greenland. Great circle 5570 km; rhumb line 5794 km; the geodesic saves 224 km (4%).
2 · Clairaut's relation: how far north does a great circle climb?
A great-circle route crosses the equator on a heading of (that is, east of due north). Using Clairaut's relation, find the highest latitude it reaches.
Step 1. On a sphere of radius the distance from the polar axis is ( = latitude), and Clairaut's relation reads with the angle between geodesic and meridian. The bearing from north is that angle , so at the equatorial crossing and .
Step 2. Evaluate the constant at the crossing: . The geodesic can never reach a point where , i.e. where .
Step 3. At the northernmost point the geodesic runs due east, so and gives , hence and N. The route peaks at 30°N, then turns back south — the geometric reason a great circle has a single "vertex" and cannot spiral to the pole.
Physics of the portrait
The idea that a surface has a geometry of its own — its own straight lines, triangles, curvature — belongs to one man above all, who arrived at it by surveying the hills of Hanover with a theodolite.
Origins · 1 minCarl Friedrich Gauss and how this was discovered
Gauss came to geodesics through the most practical of tasks: between 1818 and 1832 he directed the triangulation survey of the Kingdom of Hanover, hauling instruments across the countryside and inventing the heliotrope — a mirror that flashed sunlight between stations — to sight lines tens of kilometres long. He is said to have measured the vast triangle joining Hohenhagen, Brocken and Inselsberg partly to test whether its angle sum departed from , whether space itself was curved. Out of that fieldwork he distilled, in the 1827 Disquisitiones generales circa superficies curvas, the science of surfaces measured from within. Its crown is the Theorema Egregium: the Gaussian curvature of a surface can be computed entirely from measurements made inside it, with no reference to how it sits in space — which is why a flat sheet rolls into a cylinder (both have zero curvature) but never wraps smoothly onto a sphere. In this intrinsic geometry geodesics play the role straight lines play in the plane: curves of zero geodesic curvature, stationary paths of arc length, sides of the triangles whose angle excess measures curvature through Gauss–Bonnet. Riemann carried the programme to manifolds of any dimension in 1854, and from there it became the language in which Einstein wrote gravity — free fall as geodesic motion in a curved spacetime.
Going further
Texts. Stone & Goldbart, Mathematics for Physics, Ch. 1 · Arfken & Weber, Mathematical Methods for Physicists, on the calculus of variations · Hassani, Mathematical Physics, on variational problems and Riemannian geometry · Nakahara, Geometry, Topology and Physics, Ch. 7 · Byron & Fuller, Mathematics of Classical and Quantum Physics, Ch. 2 · Riley, Hobson & Bence, Mathematical Methods, Ch. 22 · do Carmo, Riemannian Geometry, Ch. 3–4 · Lovelock & Rund, Tensors, Differential Forms and Variational Principles. Key results to keep in mind: the non-affine correction term is ; the spherical geodesic integrates to . Numerical benchmarks: New York→London central angle giving km at km, rhumb-line km; Clairaut vertex latitude for a equatorial heading.
Prerequisites. Functionals and Function Spaces · First Variation and Stationarity · Euler-Lagrange Equation · Fundamental Lemma of the Calculus of Variations. Leads to. Beltrami Identity and First Integrals · Hamilton's Principle of Stationary Action · Lagrangian Mechanics · Constrained Variation and Lagrange Multipliers.
Ask the tutor: ask me to derive the geodesic equation for any metric you name — the sphere, a cone, the Poincaré disc, or the Schwarzschild spacetime — and watch the Christoffel symbols and first integrals fall out step by step.
What is the difference between a geodesic and a shortest path?
Every shortest path is a geodesic, but not every geodesic is a shortest path. The Euler–Lagrange equation only locates stationary points of the length functional, and a stationary point can be a minimum, a saddle, or neither. On a sphere both the short great-circle arc and the long way round satisfy the geodesic equation, yet only the short arc minimizes. A geodesic is guaranteed shortest only locally, on segments short enough to avoid a conjugate point; to certify a genuine minimum you check that the second variation, equation (7), stays positive along the whole curve.
Why do physicists vary the energy instead of the length?
Because the length integrand hides a square root that makes the Lagrangian reparametrization invariant — you can re-clock the curve without changing its length. That invariance makes the Euler–Lagrange system degenerate: the velocity-Hessian is singular, and the equations fix the shape of the geodesic but not the clock along it, leaving an awkward term proportional to the velocity. The energy functional has no square root, is a clean quadratic, and its equations are non-degenerate; as a bonus it conserves the speed, so its parameter is automatically affine. Same geodesics, far cleaner equations.
What exactly are the Christoffel symbols?
They are the bookkeeping that tells you how the coordinate basis vectors twist from point to point. In a curved space — or even flat space in polar coordinates — the basis vector "along " at one point is not parallel to the one next door, and measures that change. Concretely , built purely from first derivatives of the metric. They are not the components of a tensor — they vanish where the metric is constant and reappear under a change of coordinates — but the combination is a genuine geometric object, the covariant acceleration.
What is a conjugate point, and why does it matter?
A conjugate point is where a family of geodesics leaving one point refocuses at another. On a sphere, every great circle leaving the north pole reconverges at the south pole, so the south pole is conjugate to the north. Conjugate points are exactly where a geodesic stops being a length-minimizer: up to the first one the second variation of the energy is positive and the geodesic is a genuine local minimum, but past it a transverse variation exists that shortens the curve, and the geodesic becomes only a saddle. Curvature drives this — positive curvature focuses neighbouring geodesics and creates conjugate points, whereas negatively curved spaces have none, so their geodesics minimize forever.
How does the geodesic equation relate to Newton's laws?
For a free particle they are literally the same statement. Newton's first law says a force-free particle moves in a straight line at constant speed — in Cartesian coordinates that is , precisely the geodesic equation with . Write the same physics in curved coordinates and the connection terms reappear as the "fictitious" centrifugal and Coriolis accelerations. General relativity finishes the thought: a particle in free fall feels no force, so its worldline is a geodesic of the spacetime metric, and Newton's gravity becomes the connection term . Gravity becomes geometry.
Why are great circles the shortest routes for aircraft?
Because a great circle is the geodesic of a sphere, and the Earth is nearly a sphere. The shortest surface path between two points is the arc of the circle whose plane passes through both points and the Earth's centre. On a Mercator chart this route looks curved — it bows toward the nearer pole — which fools the eye into thinking the straight-looking rhumb line (constant compass bearing) is shorter, when it is in fact longer, dramatically so for high-latitude routes. For New York to London the great circle is about 224 km shorter. Real flight paths also bend for winds and airspace, but the geodesic is the ideal they track.