Jump to content

The Legendre transform

From The Invariance Itself
Revision as of 04:46, 16 September 2026 by BFP Rauch (talk | contribs) (Add DISPLAYTITLE: title the page by its section rather than its path)
Plain-language version: Reading a curve two ways

The Legendre transform exchanges a variable for the slope of a function with respect to that variable. Applied to a Lagrangian in its velocity slot it produces the Hamiltonian, and it converts n second-order equations into 2n first-order ones. This page treats the transform on its own, before it is put to work on Hamilton's principle/Mathematics/The Hamiltonian and Hamilton's equations.

The construction

The Legendre transform as a tangent-line description.

Let f(v) be a real function of one variable, twice differentiable and strictly convex, so f″(v)>0. Define the slope

p=f′(v)(1)

Strict convexity makes f′ strictly increasing and therefore invertible, so (1) can be solved for v=v(p). The Legendre transform of f is

g(p)=pv(p)−f(v(p))(2)

Convexity is the hypothesis that makes the transform well defined. Without it, (1) has no unique solution and (2) is not a function. This is why the Legendre condition of Hamilton's principle/Mathematics/The Legendre condition reappears here: it is the same second-derivative requirement, met again for a different reason.

The geometric reading

For fixed p, consider the vertical gap between the line pv and the curve f(v):

h(v)=pv−f(v)(3)

Then h′(v)=p−f′(v), which vanishes exactly at the v solving (1), and h″=−f″<0, so that stationary point is a maximum. Therefore

g(p)=maxv[pv−f(v)](4)

−g(p) is the intercept of the tangent line of slope p. So the transform re-describes the curve: instead of listing its points, it lists its tangent lines by slope and intercept. Both descriptions carry the same information, which is why the transform is invertible.

It is an involution

Differentiate (2) with respect to p:

dgdp=v+pdvdp−f′(v)dvdp=v+[p−f′(v)]dvdp=v(5)

the bracket vanishing by (1). So dg/dp=v, mirroring df/dv=p. The relation between f and g is symmetric, and transforming twice returns f.

This cancellation — the same one that made y″ drop out of the Beltrami derivation on Hamilton's principle/Mathematics/The Beltrami identity — is why the transform is clean. The chain-rule term is annihilated by the defining relation.

Differentiating (5) again gives

d2gdp2=dvdp=1f″(v)(6)

so g is convex too, and sharply curved where f is flat.

Several variables

For f(v1,…,vn) set pi=∂f/∂vi. Solvability for the vi requires the Hessian ∂2f/∂vi∂vk to be invertible, which is the non-degeneracy condition of Hamilton's principle/Mathematics/Several dependent variables. Then

g(p)=∑i=1npivi−f(v)(7)

and ∂g/∂pi=vi by the same cancellation.

Passive variables

If f=f(u,v) and only v is transformed, then u is a passive variable and

∂g∂u=−∂f∂u(8)

The sign flip in (8) is the source of every sign in Hamilton's equations. Proof: differentiating g=pv−f at fixed p,

∂g∂u=p∂v∂u−∂f∂u−∂f∂v∂v∂u=−∂f∂u(9)

again by p=∂f/∂v.

The transform in mechanics

Apply it to L(x,y,y′) with y′ active and x,y passive. The slope variable is the conjugate momentum of Hamilton's principle/Mathematics/The Euler-Lagrange equation,

p=∂L∂y′(10)

and the transform is

H(x,y,p)=py′−L(x,y,y′)(11)

with y′ expressed through p. Two facts drop out at once.

H is the conserved quantity of the Beltrami identity, so Hamilton's principle/Mathematics/The Beltrami identity is the statement that the Legendre transform of L is constant when L has no explicit x.

And by (8),

∂H∂y=−∂L∂y(12)

which is the minus sign in p˙=−∂H/∂y on the next page. It comes from the transform, not from mechanics.

Where the transform fails

If the Hessian in the velocities is singular, the momenta are not independent functions of the velocities and (10) cannot be inverted. Such Lagrangians are degenerate, and they are not pathological — they are the rule in gauge theories, where the electromagnetic Lagrangian on Hamilton's principle/Applications/The electromagnetic Lagrangian is exactly this case.

Degeneracy is the same phenomenon that Hamilton's principle/Mathematics/Noether's second theorem characterises: invariance under a group depending on arbitrary functions produces identities among the Lagrange expressions, and those identities are why the Hessian is singular. The constrained Hamiltonian formalism that handles such systems is named as further reading on Hamilton's principle/Sources and is not treated in this volume.

Elsewhere in physics

The same transform relates thermodynamic potentials. Internal energy and Helmholtz free energy are Legendre transforms in the entropy-temperature pair, exactly as L and H are in the velocity-momentum pair, and the sign convention differs by a historical accident rather than by any mathematics.

Next

Hamilton's principle/Mathematics/The Hamiltonian and Hamilton's equations applies the transform to the Euler-Lagrange system.

References