# Geodesics as Hamiltonian flows

In mathematics, the geodesic equations are second-order non-linear differential equations, and are commonly presented in the form of Euler–Lagrange equations of motion. However, they can also be presented as a set of coupled first-order equations, in the form of Hamilton's equations. This latter formulation is developed in this article.

## Overview

It is frequently said that geodesics are "straight lines in curved space". By using the Hamilton-Jacobi approach to the geodesic equation, this statement can be given a very intuitive meaning: geodesics describe the motions of particles that are not experiencing any forces. In flat space, it is well known that a particle moving in a straight line will continue to move in a straight line if it experiences no external forces; this is Newton's first law. The Hamiltonian describing such motion is well known to be $H=mv^2/2=p^2/2m$ with p being the momentum. It is the conservation of momentum that leads to the straight motion of a particle. On a curved surface, exactly the same ideas are at play, except that, in order to measure distances correctly, one must use the metric. To measure momenta correctly, one must use the inverse of the metric. The motion of a free particle on a curved surface still has exactly the same form as above, i.e. consisting entirely of a kinetic term. The resulting motion is still, in a sense, a "straight line", which is why it is sometimes said that geodesics are "straight lines in curved space". This idea is developed in greater detail below.

## Geodesics as an application of the principle of least action

Given a (pseudo-)Riemannian manifold M, a geodesic may be defined as the curve that results from the application of the principle of least action. A differential equation describing their shape may be derived, using variational principles, by minimizing (or finding the extremum) of the energy of a curve. Given a smooth curve

$\gamma:I\to M$

that maps an interval I of the real number line to the manifold M, one writes the energy

$E(\gamma)=\frac{1}{2}\int_I g(\dot\gamma(t),\dot\gamma(t))\,dt,$

where $\dot\gamma(t)$ is the tangent vector to the curve $\gamma$ at point $t \in I$. Here, $g(\cdot,\cdot)$ is the metric tensor on the manifold M.

Using the energy given above as the action, one may choose to solve either the Euler–Lagrange equations, or the Hamilton-Jacobi equations. Both methods give the geodesic equation as the solution; however, the Hamilton–Jacobi equations provide greater insight into the structure of the manifold, as shown below. In terms of the local coordinates on M, the (Euler–Lagrange) geodesic equation is

$\frac{d^2x^a}{dt^2} + \Gamma^{a} {}_{bc}\frac{dx^b}{dt}\frac{dx^c}{dt} = 0$

Here, the xa(t) are the coordinates of the curve γ(t) and $\Gamma^{a} {}_{bc}$ are the Christoffel symbols. Repeated indices imply the use of the summation convention.

## Hamiltonian approach to the geodesic equations

Geodesics can be understood to be the Hamiltonian flows of a special Hamiltonian vector field defined on the cotangent space of the manifold. The Hamiltonian is constructed from the metric on the manifold, and is thus a quadratic form consisting entirely of the kinetic term.

The geodesic equations are second-order differential equations; they can be re-expressed as first-order ordinary differential equations taking the form of the Hamiltonian–Jacobi equations by introducing additional independent variables, as shown below. Start by finding a chart that trivializes the cotangent bundle TM (i.e. a local trivialization):

$T^*M|_{U}\simeq U \times \mathbb{R}^n$

where U is an open subset of the manifold M, and the tangent space is of rank n. Label the coordinates of the chart as (x1, x2, …, xn, p1, p2, …, pn). Then introduce the Hamiltonian as

$H(x,p)=\frac{1}{2}g^{ab}(x)p_a p_b.$

Here, gab(x) is the inverse of the metric tensor: gab(x)gbc(x) = $\delta^a_c$. The behavior of the metric tensor under coordinate transformations implies that H is invariant under a change of variable. The geodesic equations can then be written as

$\dot{x}^a = \frac{\partial H}{\partial p_a} = g^{ab}(x) p_b$

and

$\dot{p}_a = - \frac {\partial H}{\partial x^a} = -\frac{1}{2} \frac {\partial g^{bc}(x)}{\partial x^a} p_b p_c.$

The second order geodesic equations are easily obtained by substitution of one into the other. The flow determined by these equations is called the cogeodesic flow. The first of the two equations gives the flow on the tangent bundle TM, the geodesic flow. Thus, the geodesic lines are the projections of integral curves of the geodesic flow onto the manifold M. This is a Hamiltonian flow, and that the Hamiltonian is constant along the geodesics:

$\frac{dH}{dt} = \frac {\partial H}{\partial x^a} \dot{x}^a + \frac{\partial H}{\partial p_a} \dot{p}_a = - \dot{p}_a \dot{x}^a + \dot{x}^a \dot{p}_a = 0.$

Thus, the geodesic flow splits the cotangent bundle into level sets of constant energy

$M_E = \{ (x,p) \in T^*M : H(x,p)=E \}$

for each energy E ≥ 0, so that

$T^*M=\bigcup_{E \ge 0} M_E$.