TL;DR
A geodesic is a curve that is locally the shortest path: between two points that are close together on a curved space, no nearby curve with the same ends is shorter. Geodesics are the paths that free objects follow when no force acts on them, so they are the straight lines of a curved space. You find them by writing the length of a curve as an integral, minimising it, and reading off the geodesic equation.
Builds on: Riemannian Geometry, Calculus of Variations · Leads to: General Relativity, Equivalence Principle
Where it's used
Air and sea routes. The Earth is close to a sphere, and the shortest route between two cities on a sphere is an arc of a great circle, a circle whose centre is the centre of the Earth. Navigators use this to save fuel on long flights. On a flat map a great circle looks curved, which is why long-haul northern routes often bend toward the pole. The rule that picks the route is a geodesic rule on the sphere, and it needs the sphere's metric.
Gravity in general relativity. Einstein's theory says that a planet, a satellite or a falling apple moves along a geodesic of spacetime, and that mass and energy curve spacetime. Light also follows geodesics of spacetime, which is why starlight passing the Sun bends. The 1919 solar eclipse expedition measured this bending, and the result agreed with Einstein's prediction rather than the older Newtonian estimate. This is the setting of general relativity.
Shape analysis in computer graphics. Engineers who work with 3D models need the distance between two points on a surface, measured along the surface rather than through the air. Such distances are geodesic distances. They are used to match shapes, to find smooth paths across a model, and to compare parts of a surface that are far apart along it.
How it works
Take one tiny instance: a flat sheet whose coordinates are , but whose metric stretches the direction. A metric is a rule for measuring how long a small move is. Here it is the table with 4 and 0 in the top row and 0 and 1 in the bottom row, the same at every point. A move with components has squared length .
-
Pick two points. Let and . We want the shortest path from to on this sheet.
-
Take the straight candidate. Walk the segment , for from 0 to 1. Its velocity is at every moment. Check: after time 1 we are at , which is .
-
Measure the speed of that candidate. Put the velocity into the metric: . So the speed is , about 2.24, and it is the same at every moment. Check: the move alone has speed 2. Adding the part raises the squared speed from 4 to 5, so the speed rises from 2 to , as it should.
-
Multiply speed by time to get the length. The length is . Check: the straight candidate has length about 2.24.
-
Try a rival. Walk first from to , then up to . The first leg has velocity , speed 2, and length 2. The second leg has velocity , speed 1, and length 1. Total length: 3. Check: 3 is larger than 2.24.
-
Compare and conclude. The straight candidate beats this rival. Both candidates have the same ends, so the straight segment is the shorter of the two, and on this sheet, whose metric is the same everywhere, it is a geodesic. Check: no part of the straight segment is better than any other part, because the metric does not change from place to place.
flowchart LR A["Two points A and B"] --> B["Choose a candidate curve"] B --> C["Measure its length with the metric"] C --> D["Compare with nearby curves"] D --> E["Does any nearby curve beat it?"] E -->|no| F["It is a geodesic"] E -->|yes| B
Step 6 shows only that one rival loses. A full answer must rule out every nearby curve, and that needs calculus, which is the next section.
The math
A geodesic is a curve that is locally length-minimising: for any two of its points that are close enough, no other curve joining them and staying nearby is shorter. Let the coordinates be (in the walkthrough , ), and let the metric have components at each point. A curve is given by functions , and its velocity vector has components .
Step 3 in symbols: speed and length
The squared speed of a curve at time is , where means add over all pairs of coordinate labels. The length of the curve from to is
For the walkthrough, , , and . The square root of is , and since it does not depend on , the integral is just times 1. This gives step 4.
Step 5 in symbols: the energy trick
Minimising directly is awkward because of the square root. Instead minimise the energy, the same kind of action that Lagrangian mechanics minimises,
Among curves with fixed ends on , the minimisers of are the same curves as the minimisers of , and they have constant speed. So we can work with . This is a standard fact that follows from the Cauchy–Schwarz inequality, which gives with equality exactly at constant speed.
Apply the Euler–Lagrange equation from Calculus of Variations to the integrand . The result is the geodesic equation,
where is the acceleration in coordinates, and are the Christoffel symbols. In words: the coordinate acceleration of a free curve equals a correction term that depends on how the metric changes from place to place.
The Christoffel symbols
The Christoffel symbols come from the derivatives of the metric. Write for the partial derivative of with respect to . Then
where is the inverse matrix of . If the metric is the same everywhere, every is zero, so every is zero. Then the geodesic equation says , which means the coordinates move in straight lines. This is why step 6 works for the stretched sheet.
Worked examples
Use the stretched sheet with , .
- Take the segment from to , parametrised as , for from 0 to 3.
- The velocity is , so and .
- The squared speed is , so the speed is 1.
- The length is the speed times the duration, .
Interpretation: a move straight along the direction is measured at face value, because . Answer: length 3.
The ordinary flat plane in polar coordinates has metric , so , and . Here the metric changes with , so some Christoffel symbols are nonzero. The two that matter are
- Compute from the formula. The only relevant derivative is , and . So .
- Compute . Here and . So .
- Write the geodesic equations. The equation is , and the equation is . The factor 2 appears because the pairs and both contribute.
- Test the straight line through the origin, and . Then , , . Both equations hold: and .
- Test the circle of radius 1, and . Then and , so the equation gives . That is not zero, so the circle is not a geodesic.
Interpretation: the straight line is a geodesic and the circle is not, even though both are curves on the same flat plane. Answer: the line through the origin is a geodesic; the unit circle is not.
Use the unit sphere with polar angle measured from the north pole and azimuth , so the metric is . Its Christoffel symbols give the geodesic equations
- Test the equator, and . Then , and . The first equation gives .
- Check the second equation: , so the equation gives , which holds for constant speed .
- The equator is therefore a geodesic. It is a great circle, the largest kind of circle on a sphere, and it is locally the shortest path.
- Length of the equator arc from longitude 0 to longitude 90 degrees: the arc is radians of a circle of radius , so its length is . With km, this is about 10,000 km.
Try it: test the latitude circle on the unit sphere with and . Is it a geodesic?
Answer: No. Here , so the first equation gives . One failing equation is enough. The latitude circle is not a great circle, so it is not locally shortest.
Common mistakes and tradeoffs
It is tempting to think a geodesic is always the shortest path between two points. In fact it is only locally shortest. On a sphere, the great circle that goes the long way round between two points is a geodesic, but it is not the shortest path between them. The short arc of the same great circle is the shortest path, and it is also a geodesic.
It is tempting to think a geodesic is a straight line. In fact on a curved surface it is the straightest path in the sense that it never turns relative to the surface. On a flat map of the sphere, a great circle looks curved, and the flat-map straight line is not a geodesic. The word "straight" only has meaning in the surface's own geometry.
It is tempting to think that gravity pulls an object off its geodesic. In fact, in general relativity, a freely falling object follows a geodesic and feels no force. The feeling of weight comes from the floor, which stops you following your geodesic into the ground.
Use the geodesic equation when the space is curved and the object is free, or when you want the shortest route on a surface. Do not use it when a non-gravitational force acts on the object, since that force must be added to the equation. The Christoffel symbols depend on the coordinates chosen, so the individual numbers in the equation change with coordinates, but the geodesics themselves do not. Alternatives exist for special cases. On a flat plane in Cartesian coordinates the answer is just the straight line, and when a surface is given only as a mesh of data, numerical shortest-path methods such as Dijkstra's algorithm are used instead.
History
Geometry on surfaces was studied for centuries, but the modern idea began with Carl Friedrich Gauss in 1827, who showed that a surface can be studied by measuring distances on it, without reference to the space around it. Bernhard Riemann extended this to spaces of any dimension in 1854, and the length of a curve, measured by a metric, became the central object. Elwin Bruno Christoffel introduced the symbols that bear his name in 1869 to write the geodesic equations in any coordinates. Albert Einstein's general relativity, published in 1915 and 1916, made free fall motion along geodesics of spacetime. The idea caught on because it turned gravity from a force into geometry, and the geodesic equation became the working tool of general relativity.
Recap
- A curve is a geodesic when no nearby curve with the same ends is shorter. You find it by minimising the energy integral .
- The energy trick gives the Euler–Lagrange equation for the metric, which is the geodesic equation with Christoffel symbols.
- The Christoffel symbols come from the derivatives of the metric; if the metric is constant, geodesics are straight coordinate lines.
- Free objects in general relativity follow geodesics of spacetime, which is how gravity becomes geometry.
Read next: General Relativity, which uses geodesics for planets and light, and Equivalence Principle, which explains why free fall is the same for every object.