# Legendre transformation

In mathematics, two differentiable functions *f* and *g* are said to be **Legendre transforms** of each other if their first derivatives are inverse functions of each other:

*f* and *g* are then said to be related by a **Legendre transformation**. Legendre transformations are named after Adrien-Marie Legendre. They are unique up to an additive constant which is usually fixed by the additional requirement that

The Legendre transformation is its own inverse, and is related to integration by parts.

## Contents

## Applications

Legendre transformations are used in thermodynamics to transform between the different thermodynamic potentials, and in classical mechanics to derive Hamiltonian mechanics from Lagrangian mechanics, as well as the other way around.

## Examples

The exponential function e^{x} has *x* ln *x* − *x* as a Legendre transform since the respective first derivatives e^{x} and ln *x* are inverse to each other. This example shows that the respective domains of a function and its Legendre transform need not agree.

Similarly, the quadratic form

with *A* a symmetric invertible *n*-by-*n*-matrix has

as a Legendre transform.

## Legendre transformation in one dimension

In one dimension, a Legendre transform to a function *f* : **R** → **R** with an invertible first derivative may be found using the formula

This can be seen by integrating both sides of the defining condition restricted to one-dimension

from x_{0} to x_{1}, making use of the fundamental theorem of calculus on the left hand side and substituting

on the right hand side to find

with *g*′(*y*_{0}) = *x*_{0}, *g*′(*y*_{1}) = *x*_{1}. Using integration by parts the last integral simplifies to

Therefore,

Since the left hand side of this equation does only depend on x_{1} and the right hand side only on x_{0}, they have to evaluate to the same constant.

Solving for *g* and choosing *C* to be zero results in the above-mentioned formula.

## Geometric interpretation

For a strictly convex function the Legendre-transformation can be interpreted as a mapping between the graph of the function and the family of tangents of the graph. (The tangents are well-defined at all but at most countably many points since a convex function is differentiable at all but at most countably many points.)

The equation of a line with slope *m* and y-intercept *b* is given by

For this line to be tangent to the graph of a function *f* at the point (*x*_{0}, *f*(*x*_{0})) requires

and

*f*′ is strictly monotone as the derivative of a strictly convex function, and the second equation can be solved for *x*_{0}, allowing to eliminate *x*_{0} from the first giving the *y*-intercept *b* of the tangent as a function of its slope *m*:

## Legendre transformation in more than one dimension

For a differentiable real-valued function on an open subset *U* of **R**^{n} the Legendre conjugate of the pair (*U*, *f*) is defined to be the pair (*V*, *g*), where *V* is the image of *U* under the gradient mapping D*f*, and *g* is the function on *V* given by the formula

where

is the scalar product on **R**^{n}.

Alternatively, if *X* is a real vector space and *Y* is its dual vector space, then for each point *x* of *X* and *y* of *Y*, there is a natural identification of the cotangent spaces T^{*}*X*_{x} with *Y* and T^{*}*Y*_{y} with *X*. If *f* is a real differentiable function over *X*, then ∇*f* is a section of the cotangent bundle T^{*}*X* and as such, we can construct a map from *X* to *Y*. Similarly, if *g* is a real differentiable function over *Y*, ∇*g* defines a map from *Y* to *X*. If both maps happen to be inverses of each other, we say we have a Legendre transform.

## Convex conjugates

### Definition

For a function

taking values on the extended real number line the Legendre transformation can be generalized to the **Legendre-Fenchel transformation** or **convex conjugate** of *f* by

### Examples of convex conjugates

The convex conjugate of an affine function

is

The convex conjugate of the absolute value function

is

The convex conjugate of the exponential function is

### Properties of convex conjugation

Convex-conjugation is order-reversing: if *f* ≤ *g* then *f*^{*} ≥ *g*^{*}. The convex conjugate of a closed convex function is again a closed convex function. The convex conjugate of a polyhedral convex function (a convex function with polyhedral epigraph) is again a polyhedral convex function. For any proper convex function *f* and its convex conjugate *f*^{*} Fenchel's inequality (also known as the **Fenchel-Young inequality**) holds:

The convex conjugate of a function is always lower semi-continuous. The **biconjugate** *f*^{**} (the convex conjugate of the convex conjugate) is also the closed convex hull, i.e. the largest lower semi-continuous convex function smaller than *f*. Therefore, *f* = *f*^{**} iff *f* is convex and lower semi-continuous.

## Further properties

### Scaling properties

The Legendre transformation has the following scaling properties:

It follows that if a function is homogeneous of degree *r* then its image under the Legendre transformation is a homogeneous function of degree *s*, where 1/*r* + 1/*s* = 1.

### Behavior under translation

### Behavior under inversion

### Behavior under linear transformations

Let *A* be a linear transformation from **R**^{n} to **R**^{m}. For any convex function *f* on **R**^{n}, one has

where *A*^{*} is the adjoint operator of *A* defined by

A closed convex function *f* is symmetric with respect to a given set *G* of orthogonal linear transformations,

if and only if *f*^{*} is symmetric with respect to *G*.

### Infimal convolution

The **infimal convolution** of two functions *f* and *g* is defined as

Let *f*_{1}, …, *f*_{m} be proper convex functions on **R**^{n}. Then

## References

- Template:Journal reference issue
- Arnol'd, Vladimir Igorevich (1989).
*Mathematical Methods of Classical Mechanics (second edition)*, Springer. ISBN 0387968903. - Rockafellar, Ralph Tyrell (1996).
*Convex Analysis*, Princeton University Press. ISBN 0691015864.de:Legendre-Transformation

ko:르장드르 변환 it:Trasformata di Legendre sl:Legendrova transformacija