The Legendre Transform

David Glickenstein January 31, 2000

1. Introduction. This is an introduction to the Legendre transform as described in [1, 14-16].

2. The Transform. We shall define the Legendre transform. Let f : ℝ^{n} → ℝ be a convex function, i.e. ∇^{2}f > 0 where ∇^{f} is the hessian.

Definition 2.1. The Legendre transform L(f)(p) = max_{x}(p · x − f(x)).

So, if x ∈ ℝ, essentially we are measuring the maximal distance between the line y = px and f(x) and in higher dimensions, this is happening in each coordinate. Notice that the maximum occurs when ∇_{x}(p · x − f(x)) = 0, or when p = ∇f(x). Note that this equation determines x as a function of p, not the other way around. The convexity condition ensures that there is only one of these critical points, and that it is a maximum.

Here are some examples:

Example 1. If f(x) = x^{2}, then we want the maximum px − x^{2}. This occurs for p = 2x. Thus g(p) = L(f)(p) = p^{2}/2 − p^{2}/4 = p^{2}/4.

Example 2. If f(v) = mv^{2}/2 (think kinetic energy), we see that the maximum occurs when p = mv (think momentum) and g(p) = L(f)(p) = p^{2}/m − p^{2}/(2m) = p^{2}/(2m).

It is not too hard to show that the Legendre transform takes convex functions to convex functions. We will use this very useful lemma:

Lemma 2.2. Let g(p) = L(f)(p). Then ∇g(p) = x(p), where x(p) is the solution to p = (∇f)(x).

Proof: We know that g(p) = p · x(p) − f(x(p)), where x(p) is defined by p = (∇f)(x(p)). So

∇g(p) = p · (∇x)(p) + x(p) − (∇f)(x(p)) · (∇x)(p) = x(p)
□

If g(p) = L(f)(p), then

∇^{2}g(p) = ∇(x(p))
= ∇ {x [(∇f)(x(p))]}
= (∇x)(∇f)(x(p)) · (∇^{2}f)(x(p)) · (∇x)(p)
= (∇x)(p) · (∇^{2}f)(x(p)) · (∇x)(p)
> 0

We can now show that the transform is involutive:

Theorem 2.3. The Legendre transform is an involution, i.e. L(L(f))(x) = f(x).

Proof: Arnold gives a geometric proof based on the fact that if g(p) = L(f)(p) then the graph y = xp − g(p) is the tangent of slope p to the graph y = f(x). Since f(x) is convex, all of the tangent lines are below the graph, so if we fix x = x_{0}, the maximal value of x_{0}p − g(p) as a function of p is f(x_{0}) (otherwise we are below the graph, instead of on it). Thus L(g)(x_{0}) = max_{p}(x_{0}p − g(p)) = f(x_{0}).

We can also prove it algebraically using Lemma 2.2. Now, let g(p) = L(f)(p) and we compute L(L(f))(x) = L(g)(x). L(g)(x) = x · p(x) − g(p(x)), where p(x) is defined by x = (∇g)(p(x)).

Now, g is defined by g(p) = p · y(p) − f(y(p)), where y(p) is defined by p = (∇f)(y(p)). So according to the lemma, we have (∇g)(p) = y(p), where p = (∇f)(y(p)).

Therefore, we have

x = (∇g)(p(x)) = y(p(x))

and

L(g)(x) = x · p(x) − g(p(x))
= y(p(x)) · p(x) − [p(x) · y(p(x)) − f(y(p(x)))]
= f(x)

since our inner product (·) is symmetric. □

3. Young’s Inequality. We say that f and g are dual in the sense of Young if g(p) = L(f)(p), and hence, by Theorem 2.3, f(p) = L(g)(p). We now have the following:

Proposition 3.1 (Young’s inequality). If f and g are convex functions dual in the sense of Young, then p · x ≤ f(x) + g(p).

Proof: This is essentially by definition, since

g(p) = L(f)(p) = max_{x}(p · x − f(x)) ≥ p · x − f(x)

for all p and x. Hence

g(p) + f(x) ≥ p · x

. □ This very general result can be used to show some interesting estimates.

Example 3. If f(x) = x^{2}/2 then g(p) = p^{2}/2 (See Example 2 with m = 1. Then we get the estimate

px ≤ x^{2}/2 + p^{2}/2

.

4. Hamilton’s Equations. Recall Lagrange’s equations as derived from the principle of least action:

ṗ = \frac{∂L}{∂q}  (4-1)
p = \frac{∂L}{∂q̇}

where L = L(q, q̇, t).

We can now use the Legendre transform to express them equivalently as Hamilton’s equations.

Theorem 4.1. Lagrange’s equations (4-1) are equivalent to Hamilton’s equations:

ṗ = −\frac{∂H}{∂q}  (4-2)
q̇ = \frac{∂H}{∂p}

where the Hamiltonian H(p, q, t) = L(L_{q,t})(p), i.e. the Legendre transform of L(q, q̇, t) thought of as a function of q̇.

Proof: Let us first go from Lagrange’s equations (4-1) to Hamilton’s equations (4-2). By definition of the Legendre transform, H(p) = p · q̇ − L(q̇) where p = ∂L/∂q̇ tells us how to express q̇ as a function of p. Notice that H also depends on the parameters q and t. Now we compute the partial derivatives:

\frac{∂H}{∂p} = q̇ + p · \frac{dq̇}{dp} − \frac{∂L}{∂q̇} · \frac{dq̇}{dp} = q̇
\frac{∂H}{∂q} = −\frac{∂L}{∂q} = −ṗ

where the last equalities are by Lagrange’s equations and we are done.

Since the Legendre transform is involutive, we should be able to go the other way the exact same way. Suppose Hamilton’s equations (4-2). Then we take L(q̇) = q̇ · p − H(p), where q̇ is a formal parameter and p is defined by q̇ = ∂H/∂p. By Hamilton’s equations, ∂H/∂p = d/dtq, so q̇ really is the time derivative. We now look at the partial derivatives:

\frac{∂L}{∂q} = −\frac{∂H}{∂q} = ṗ
\frac{∂L}{∂q̇} = p + q̇ · \frac{dp}{dq̇} − \frac{∂H}{∂p} \frac{dp}{dq̇} = p

where the last equalities are by Hamilton’s equations and we are done. □ We have a very interesting corollary.

Corollary 4.2. dH/dt = ∂H/∂t. Thus if the system does not depend explicitly on time (∂H/∂t = 0) then it satisfies a conservation law: H(h(p(t), q(t)) = Const.

Proof: We simply compute the total derivative of H(p(t), q(t), t):

\frac{dH}{dt} = \frac{∂H}{∂p} · ṗ + \frac{∂H}{∂q} · q̇ + \frac{∂H}{∂t}
= \frac{∂H}{∂p} · (−\frac{∂H}{∂q} ) + \frac{∂H}{∂q} · \frac{∂H}{∂p} + \frac{∂H}{∂t}
= \frac{∂H}{∂t}

where we used Hamilton’s equations in the second equality. □ Now if we have some symmetry, the equations can be simplified: Corollary 4.3. If q_{1} is a cyclic coordinate, i.e. ∂H/∂q_{1} = 0, then p_{1} is a constant

parameter and q_{1} can be solved for, so the Hamiltonian depends on less coordinates:

H = H(p_{2}, ..., p_{n}, q_{2}, ..., q_{n}, t, p_{1})

.

Proof: If we let p′ = (p_{2}, ..., p_{n}) and q′ = (q_{2}, ..., q_{n}) then Hamilton’s equations become:

\frac{d}{dt}q′ = \frac{∂H}{∂p′}  (4-3)
\frac{d}{dt}p′ = −\frac{∂H}{∂q′}  (4-4)
\frac{d}{dt}q_{1} = \frac{∂H}{∂p_{1}}  (4-5)
\frac{d}{dt}p_{1} = 0  (4-6)

Hence p_{1} is constant and we can solve for (p′, q′) independently of p_{1}, q_{1}. Finally,

\frac{d}{dt}q_{1} = \frac{∂H}{∂p_{1}} (p_{1}, p′(t), q′(t), t) = f(t)

which can be integrated. □

5. The main example. We focus for a minute on the main mechanical example, where L = T − U and the kinetic energy T is a quadratic form with respect to q:

T = \frac{1}{2} ∑ a_{ij}(q, t)q̇^{i}q̇^{j}

and U = U(q) (where q = (q^{1}, ..., q^{n})). We can now express the Hamiltonian:

Proposition 5.1. With the above assumptions, the Hamiltonian is H = T + U, specifically H(p, q, t) = T (˙(q)(p)) + U(q).

Proof: We need the following two lemmas. The first Arnold [1, p. 66] calls a consequence of Euler’s theorem on homogeneous functions.

Lemma 5.2. If f(x) = ∑ a_{ij}x^{i}x^{j} then ∇f · x = 2f. Proof:

∇f · x = ∑_{k} \frac{∂f}{∂x^{k}} x^{k}

= ∑_{k} [∑_{i,j} (a_{ij}δ_{k}^{i}x^{j} + a_{ij}δ_{k}^{j}x^{i})] x^{k}

= ∑_{k} [∑_{j} a_{kj}x^{j} + ∑_{i} a_{ik}x^{i}] x^{k}
= 2f(x)
□

We can now prove an important lemma: Lemma 5.3. For corresponding points, f(x) = L(f)(p), i.e. f(x) = L(f)(p(x)) where

p(x) is defined by p(x) = ∇f(x).

Proof:

L(f)(p(x)) = p(x) · x − f(x)
= ∇f(x) · x − f(x)
= 2f(x) − f(x)
= f(x)
□

We can also use the first lemma to prove the proposition:

H(p, q, t) = p · q̇(p) − L(q, q̇(p), t)
= \frac{∂L}{∂q̇} · q̇(p) − L(q, q̇(p), t)
= 2T (q̇(p)) − (T (q̇(p)) − U(q))
= T (q̇(p)) + U(q)

where the second equality follows from the definition of q̇(p), which is that p = ∂L/∂q̇, and the third follows because ∂L/∂q̇ = ∂T/∂q̇. □

6. Liouville’s Theorem. We consider Hamiltonians which do not depend formally on t, i.e. H = H(p(t), q(t)). Now, Hamilton’s equations can be written in vector form:

\frac{d}{dt}(p(t), q(t)) = (−\frac{∂H}{∂q} , \frac{∂H}{∂p} )

Definition 6.1. The phase flow is the one parameter group g^{t} : (p(0), q(0)) ↦ (p(t), q(t)) where (p(t), q(t)) are solutions to Hamilton’s equations.

Now, given a differential equation

ẋ = f(x)

whose solution can be extended for all time, we consider the phase flow

g^{t}(x) = x + f(x)t + O(t^{2})

The expansion follows from the differential equation, which says that

\frac{∂g^{t}(x)}{∂t}|_{t=0} = f(x)

Now, let D(0) be a bonded region in space and D(t) = g^{t}D(0). Let V (t) = volume of D(t). We now have a theorem:

Theorem 6.2. If div f ≡ 0, then g^{t} preserves volume, i.e. v(t) = v(0). Proof: We will need the following two lemmas: Lemma 6.3. For any matrix A,

det(I + At) = 1 + t tr A + O(t^{2})

Proof: Simply expand the determinant and look at the constant terms and t terms. You can do this with a simple induction. □

Lemma 6.4.

\frac{dv}{dt} |_{t=t_{0}} = ∫_{D(t_{0})} div fdx

Proof: Use the change of variables formula and the previous lemma:

v(t) = ∫_{D(t_{0})} dg^{t−t_{0}}x
= ∫_{D(t_{0})} det \frac{∂g^{t−t_{0}}x}{∂x}dx
= ∫_{D(t_{0})} (I + (t − t_{0}) tr \frac{∂f}{∂x} + O(t^{2})) dx
= ∫_{D(t_{0})} (I + (t − t_{0}) ∑ \frac{∂f_{i}}{∂x^{i}} + O(t^{2})) dx
= ∫_{D(t_{0})} (I + (t − t_{0}) div f + O(t^{2})) dx

We now just differentiate under the integral sign for the result. □ The theorem follows immediately. □ In particular, for Hamilton’s equations we get

div f = \frac{∂}{∂p} (−\frac{∂H}{∂q} ) + \frac{∂}{∂q} (\frac{∂H}{∂p} ) ≡ 0

so the flow preserves volume.

7. Poincare’s Theorem.

Theorem 7.1 (Poincare’s Theorem). Let g : D → D be a continuous, one-to-one, volume preserving map where D is some bounded region (so gD = D). Then in any neighborhood U ⊂ D there is a point x ∈ U such that g^{n}x ∈ U for some n > 0.

Proof: Consider U, gU, g^{2}U, ..., each of which has the same volume. Of course, ⋃ g^{i}U ⊂ D, so if none intersected then D would have infinite volume. Thus g^{t}U ⋂ g^{s}U ≠ Ø and thus g^{t−s}U ⋂ U ≠ Ø and we are done. □

References

[1] V. I. Arnold. Mathematical Methods of Classical Mechanics. Springer-Verlag, New York, NY, 1978.