BREAKING NEWS
Legendre transformation

## Summary

In mathematics, the Legendre transformation (or Legendre transform), named after Adrien-Marie Legendre, is an involutive transformation on real-valued convex functions of one real variable. In physical problems, it is used to convert functions of one quantity (such as velocity, pressure, or temperature) into functions of the conjugate quantity (momentum, volume, and entropy, respectively). In this way, it is commonly used in classical mechanics to derive the Hamiltonian formalism out of the Lagrangian formalism (or vice versa) and in thermodynamics to derive the thermodynamic potentials, as well as in the solution of differential equations of several variables.

The function ${\displaystyle f(x)}$ is defined on the interval ${\displaystyle [a,b]}$. The difference ${\displaystyle px-f(x)}$ takes a maximum at ${\displaystyle x'}$. Thus, ${\displaystyle f^{*}(p)=px'-f(x')}$.

For sufficiently smooth functions on the real line, the Legendre transform ${\displaystyle f^{*}}$ of a function ${\displaystyle f}$ can be specified, up to an additive constant, by the condition that the functions' first derivatives are inverse functions of each other. This can be expressed in Euler's derivative notation as

${\displaystyle Df(\cdot )=\left(Df^{*}\right)^{-1}(\cdot )~,}$
where ${\displaystyle (\phi )^{-1}(\cdot )}$ means a function such that ${\displaystyle (\phi )^{-1}(\phi (x))=x~,}$

or, equivalently, as ${\displaystyle f'(f^{*\prime }(x^{*}))=x^{*}}$ and ${\displaystyle f^{*\prime }(f'(x))=x}$ in Lagrange's notation.

The generalization of the Legendre transformation to affine spaces and non-convex functions is known as the convex conjugate (also called the Legendre–Fenchel transformation), which can be used to construct a function's convex hull.

## Definition

Let ${\displaystyle I\subset \mathbb {R} }$  be an interval, and ${\displaystyle f:I\to \mathbb {R} }$  a convex function; then its Legendre transform is the function ${\displaystyle f^{*}:I^{*}\to \mathbb {R} }$  defined by

${\displaystyle f^{*}(x^{*})=\sup _{x\in I}(x^{*}x-f(x)),\ \ \ \ x^{*}\in I^{*}}$

where ${\displaystyle \sup }$  denotes the supremum, and the domain ${\displaystyle I^{*}}$  is
${\displaystyle I^{*}=\left\{x^{*}\in \mathbb {R} :\sup _{x\in I}(x^{*}x-f(x))<\infty \right\}~.}$

The transform is always well-defined when ${\displaystyle f(x)}$  is convex.

The generalization to convex functions ${\displaystyle f:X\to \mathbb {R} }$  on a convex set ${\displaystyle X\subset \mathbb {R} ^{n}}$  is straightforward: ${\displaystyle f^{*}:X^{*}\to \mathbb {R} }$  has domain

${\displaystyle X^{*}=\left\{x^{*}\in \mathbb {R} ^{n}:\sup _{x\in X}(\langle x^{*},x\rangle -f(x))<\infty \right\}}$

and is defined by
${\displaystyle f^{*}(x^{*})=\sup _{x\in X}(\langle x^{*},x\rangle -f(x)),\quad x^{*}\in X^{*}~,}$

where ${\displaystyle \langle x^{*},x\rangle }$  denotes the dot product of ${\displaystyle x^{*}}$  and ${\displaystyle x}$ .

The function ${\displaystyle f^{*}}$  is called the convex conjugate function of ${\displaystyle f}$ . For historical reasons (rooted in analytic mechanics), the conjugate variable is often denoted ${\displaystyle p}$ , instead of ${\displaystyle x^{*}}$ . If the convex function ${\displaystyle f}$  is defined on the whole line and is everywhere differentiable, then

${\displaystyle f^{*}(p)=\sup _{x\in I}(px-f(x))=\left(px-f(x)\right)|_{x=(f')^{-1}(p)}}$

can be interpreted as the negative of the ${\displaystyle y}$ -intercept of the tangent line to the graph of ${\displaystyle f}$  that has slope ${\displaystyle p}$ .

The Legendre transformation is an application of the duality relationship between points and lines. The functional relationship specified by ${\displaystyle f}$  can be represented equally well as a set of ${\displaystyle (x,y)}$  points, or as a set of tangent lines specified by their slope and intercept values.

### Understanding the transform in terms of derivatives

For a differentiable convex function ${\displaystyle f}$  on the real line with an invertible first derivative, the Legendre transform ${\displaystyle f^{*}}$  can be specified, up to an additive constant, by the condition that the functions' first derivatives are inverse functions of each other. Explicitly, for a differentiable convex function ${\displaystyle f}$  on the real line with a first derivative ${\displaystyle f'}$  with inverse ${\displaystyle (f')^{-1}}$ , the Legendre transform ${\displaystyle f^{*}}$  (with derivative ${\displaystyle (f^{*})'}$  with inverse ${\displaystyle ((f^{*})')^{-1}}$ ) can be specified, up to an additive constant, by the condition that ${\displaystyle f'}$  and ${\displaystyle (f^{*})'}$  are inverse functions of each other, i.e., ${\displaystyle f'=((f^{*})')^{-1}}$  and ${\displaystyle (f^{*})'=(f')^{-1}}$ .

To see this, first note that if ${\displaystyle f}$  is differentiable and ${\displaystyle {\overline {x}}}$  is a critical point of the function of ${\displaystyle x\mapsto p\cdot x-f(x)}$ , then the supremum is achieved at ${\displaystyle {\overline {x}}}$  (by convexity). Therefore, ${\displaystyle f^{*}(p)=p\cdot {\overline {x}}-f({\overline {x}})}$ .

Suppose that ${\displaystyle f'}$  is invertible and let ${\displaystyle g}$  denote its inverse. Then for each ${\displaystyle p}$ , the point ${\displaystyle g(p)}$  is the unique critical point of ${\displaystyle x\mapsto px-f(x)}$ . Indeed, ${\displaystyle f'(g(p))=p}$  and so ${\displaystyle p-f'(g(p))=0}$ . Hence we have ${\displaystyle f^{*}(p)=p\cdot g(p)-f(g(p))}$  for each ${\displaystyle p}$ . By differentiating with respect to ${\displaystyle p}$  we find

${\displaystyle (f^{*})'(p)=g(p)+p\cdot g'(p)-f'(g(p))\cdot g'(p).}$

Since ${\displaystyle f'(g(p))=p}$  this simplifies to ${\displaystyle (f^{*})'(p)=g(p)}$ . In other words, ${\displaystyle (f^{*})'}$  and ${\displaystyle f'}$  are inverses.

In general, if ${\displaystyle h'}$  is an inverse of ${\displaystyle f'}$ , then ${\displaystyle h'=(f^{*})'}$  and so integration provides a constant ${\displaystyle c}$  so that ${\displaystyle f^{*}=h+c}$ .

In practical terms, given ${\displaystyle f(x)}$ , the parametric plot of ${\displaystyle xf'(x)-f(x)}$  versus ${\displaystyle f'(x)}$  amounts to the graph of ${\displaystyle g(p)}$  versus ${\displaystyle p}$ .

In some cases (e.g. thermodynamic potentials, below), a non-standard requirement is used, amounting to an alternative definition of f * with a minus sign,

${\displaystyle f(x)-f^{*}(p)=xp.}$

## Properties

• The Legendre transform of a convex function is convex.
Let us show this for the case of a doubly differentiable ${\displaystyle f}$  with a non zero (and hence positive, due to convexity) double derivative and with a bijective derivative.
For a fixed ${\displaystyle p}$ , let ${\displaystyle x}$  maximize ${\displaystyle px-f(x)}$ . Then ${\displaystyle f^{*}(p)=px-f(x)}$ , noting that ${\displaystyle x}$  depends on ${\displaystyle p}$ . Thus,
${\displaystyle f'(x)=p~.}$

The derivative of ${\displaystyle f}$  is itself differentiable with a positive derivative and hence strictly monotonic and invertible.
Thus ${\displaystyle x=g(p)}$  where ${\displaystyle g\equiv (f')^{-1}}$ , meaning that ${\displaystyle g}$  is defined so that ${\displaystyle f'(g(p))=p}$ .
Note that ${\displaystyle g}$  is also differentiable with the following derivative,
${\displaystyle {\frac {dg(p)}{dp}}={\frac {1}{f''(g(p))}}~.}$

Thus ${\displaystyle f^{*}(p)=pg(p)-f(g(p))}$  is the composition of differentiable functions, hence differentiable.
Applying the product rule and the chain rule yields
${\displaystyle {\frac {d(f^{*})}{dp}}=g(p)+\left(p-f'(g(p))\right)\cdot {\frac {dg(p)}{dp}}=g(p),}$

giving
${\displaystyle {\frac {d^{2}(f^{*})}{dp^{2}}}={\frac {dg(p)}{dp}}={\frac {1}{f''(g(p))}}>0,}$

so ${\displaystyle f^{*}}$  is convex.
• It follows that the Legendre transformation is an involution, i.e., ${\displaystyle f^{**}=f~}$ :
By using the above equalities for ${\displaystyle g(p)}$ , ${\displaystyle f^{*}(p)}$  and its derivative,
{\displaystyle {\begin{aligned}f^{**}(x)&{}=\left(x\cdot p_{s}-f^{*}(p_{s})\right)|_{{\frac {d}{dp}}f^{*}(p=p_{s})=x}\\[5pt]&{}=g(p_{s})\cdot p_{s}-f^{*}(p_{s})\\[5pt]&{}=g(p_{s})\cdot p_{s}-(p_{s}g(p_{s})-f(g(p_{s})))\\[5pt]&{}=f(g(p_{s}))\\[5pt]&{}=f(x)~.\end{aligned}}}

## Examples

### Example 1

ex is plotted in red and its Legendre transform in dashed blue.

The exponential function ${\displaystyle f(x)=e^{x}}$  has ${\displaystyle f^{*}(p)=p(\ln p-1)}$  as a Legendre transform, since their respective first derivatives ex and ln p are inverse functions of each other.

This example illustrates that the respective domains of a function and its Legendre transform need not agree.

### Example 2

Let f(x) = cx2 defined on R, where c > 0 is a fixed constant.

For x* fixed, the function of x, x*xf(x) = x*xcx2 has the first derivative x* − 2cx and second derivative −2c; there is one stationary point at x = x*/2c, which is always a maximum.

Thus, I* = R and

${\displaystyle f^{*}(x^{*})={\frac {{x^{*}}^{2}}{4c}}~.}$

The first derivatives of f, 2cx, and of f *, x*/(2c), are inverse functions to each other. Clearly, furthermore,

${\displaystyle f^{**}(x)={\frac {1}{4(1/4c)}}x^{2}=cx^{2}~,}$

namely f ** = f.

### Example 3

Let f(x) = x2 for xI = [2, 3].

For x* fixed, x*xf(x) is continuous on I compact, hence it always takes a finite maximum on it; it follows that I* = R.

The stationary point at x = x*/2 is in the domain [2, 3] if and only if 4 ≤ x* ≤ 6, otherwise the maximum is taken either at x = 2, or x = 3. It follows that

${\displaystyle f^{*}(x^{*})={\begin{cases}2x^{*}-4,&x^{*}<4\\{\frac {{x^{*}}^{2}}{4}},&4\leq x^{*}\leq 6,\\3x^{*}-9,&x^{*}>6.\end{cases}}}$

### Example 4

The function f(x) = cx is convex, for every x (strict convexity is not required for the Legendre transformation to be well defined). Clearly x*xf(x) = (x* − c)x is never bounded from above as a function of x, unless x* − c = 0. Hence f* is defined on I* = {c} and f*(c) = 0.

One may check involutivity: of course x*xf*(x*) is always bounded as a function of x* ∈ {c}, hence I ** = R. Then, for all x one has

${\displaystyle \sup _{x^{*}\in \{c\}}(xx^{*}-f^{*}(x^{*}))=xc,}$

and hence f **(x) = cx = f(x).

### Example 5: several variables

Let

${\displaystyle f(x)=\langle x,Ax\rangle +c}$

be defined on X = Rn, where A is a real, positive definite matrix.

Then f is convex, and

${\displaystyle \langle p,x\rangle -f(x)=\langle p,x\rangle -\langle x,Ax\rangle -c,}$

has gradient p − 2Ax and Hessian −2A, which is negative; hence the stationary point x = A−1p/2 is a maximum.

We have X* = Rn, and

${\displaystyle f^{*}(p)={\frac {1}{4}}\langle p,A^{-1}p\rangle -c.}$

## Behavior of differentials under Legendre transforms

The Legendre transform is linked to integration by parts, p dx = d(px) − x dp.

Let f be a function of two independent variables x and y, with the differential

${\displaystyle df={\frac {\partial f}{\partial x}}\,dx+{\frac {\partial f}{\partial y}}\,dy=p\,dx+v\,dy.}$

Assume that it is convex in x for all y, so that one may perform the Legendre transform in x, with p the variable conjugate to x. Since the new independent variable is p, the differentials dx and dy devolve to dp and dy, i.e., we build another function with its differential expressed in terms of the new basis dp and dy.

We thus consider the function g(p, y) = fpx so that

${\displaystyle dg=df-p\,dx-x\,dp=-x\,dp+v\,dy}$

${\displaystyle x=-{\frac {\partial g}{\partial p}}}$

${\displaystyle v={\frac {\partial g}{\partial y}}.}$

The function g(p, y) is the Legendre transform of f(x, y), where only the independent variable x has been supplanted by p. This is widely used in thermodynamics, as illustrated below.

## Applications

### Analytical mechanics

A Legendre transform is used in classical mechanics to derive the Hamiltonian formulation from the Lagrangian formulation, and conversely. A typical Lagrangian has the form

${\displaystyle L(v,q)={\tfrac {1}{2}}\langle v,Mv\rangle -V(q),}$

where ${\displaystyle (v,q)}$  are coordinates on Rn × Rn, M is a positive real matrix, and
${\displaystyle \langle x,y\rangle =\sum _{j}x_{j}y_{j}.}$

For every q fixed, ${\displaystyle L(v,q)}$  is a convex function of ${\displaystyle v}$ , while ${\displaystyle V(q)}$  plays the role of a constant.

Hence the Legendre transform of ${\displaystyle L(v,q)}$  as a function of ${\displaystyle v}$  is the Hamiltonian function,

${\displaystyle H(p,q)={\tfrac {1}{2}}\langle p,M^{-1}p\rangle +V(q).}$

In a more general setting, ${\displaystyle (v,q)}$  are local coordinates on the tangent bundle ${\displaystyle T{\mathcal {M}}}$  of a manifold ${\displaystyle {\mathcal {M}}}$ . For each q, ${\displaystyle L(v,q)}$  is a convex function of the tangent space Vq. The Legendre transform gives the Hamiltonian ${\displaystyle H(p,q)}$  as a function of the coordinates (p, q) of the cotangent bundle ${\displaystyle T^{*}{\mathcal {M}}}$ ; the inner product used to define the Legendre transform is inherited from the pertinent canonical symplectic structure. In this abstract setting, the Legendre transformation corresponds to the tautological one-form.

### Thermodynamics

The strategy behind the use of Legendre transforms in thermodynamics is to shift from a function that depends on a variable to a new (conjugate) function that depends on a new variable, the conjugate of the original one. The new variable is the partial derivative of the original function with respect to the original variable. The new function is the difference between the original function and the product of the old and new variables. Typically, this transformation is useful because it shifts the dependence of, e.g., the energy from an extensive variable to its conjugate intensive variable, which can usually be controlled more easily in a physical experiment.

For example, the internal energy is an explicit function of the extensive variables entropy, volume, and chemical composition

${\displaystyle U=U\left(S,V,\{N_{i}\}\right),}$

which has a total differential
${\displaystyle dU=T\,dS-P\,dV+\sum \mu _{i}\,dN_{i}.}$

Stipulating some common reference state, by using the (non-standard) Legendre transform of the internal energy, U, with respect to volume, V, the enthalpy may be defined by writing

${\displaystyle H=U+PV=H(S,P,\{N_{i}\}),}$

which is now explicitly function of the pressure P, since
${\displaystyle dH(S,P,\{N_{i}\})=T\,dS+V\,dP+\sum \mu _{i}\,dN_{i}.}$

The enthalpy is suitable for description of processes in which the pressure is controlled from the surroundings.

It is likewise possible to shift the dependence of the energy from the extensive variable of entropy, S, to the (often more convenient) intensive variable T, resulting in the Helmholtz and Gibbs free energies. The Helmholtz free energy, A, and Gibbs energy, G, are obtained by performing Legendre transforms of the internal energy and enthalpy, respectively,

${\displaystyle A=U-TS~,}$

${\displaystyle G=H-TS=U+PV-TS~.}$

The Helmholtz free energy is often the most useful thermodynamic potential when temperature and volume are controlled from the surroundings, while the Gibbs energy is often the most useful when temperature and pressure are controlled from the surroundings.

### An example – variable capacitor

As another example from physics, consider a parallel-plate capacitor, in which the plates can move relative to one another. Such a capacitor would allow transfer of the electric energy which is stored in the capacitor into external mechanical work, done by the force acting on the plates. One may think of the electric charge as analogous to the "charge" of a gas in a cylinder, with the resulting mechanical force exerted on a piston.

Compute the force on the plates as a function of x, the distance which separates them. To find the force, compute the potential energy, and then apply the definition of force as the gradient of the potential energy function.

The energy stored in a capacitor of capacitance C(x) and charge Q is

${\displaystyle U(Q,\mathbf {x} )={\frac {1}{2}}QV={\frac {1}{2}}{\frac {Q^{2}}{C(\mathbf {x} )}},~}$

where the dependence on the area of the plates, the dielectric constant of the material between the plates, and the separation x are abstracted away as the capacitance C(x). (For a parallel plate capacitor, this is proportional to the area of the plates and inversely proportional to the separation.)

The force F between the plates due to the electric field is then

${\displaystyle \mathbf {F} (\mathbf {x} )=-{\frac {dU}{d\mathbf {x} }}~.}$

If the capacitor is not connected to any circuit, then the charges on the plates remain constant as they move, and the force is the negative gradient of the electrostatic energy

${\displaystyle \mathbf {F} (\mathbf {x} )={\frac {1}{2}}{\frac {dC}{d\mathbf {x} }}{\frac {Q^{2}}{C^{2}}}.}$

However, suppose, instead, that the voltage between the plates V is maintained constant by connection to a battery, which is a reservoir for charge at constant potential difference; now the charge is variable instead of the voltage, its Legendre conjugate. To find the force, first compute the non-standard Legendre transform,

${\displaystyle U^{*}=U-\left.{\frac {\partial U}{\partial Q}}\right|_{\mathbf {x} }\cdot Q=U-{\frac {1}{2C(\mathbf {x} )}}\left.{\frac {\partial Q^{2}}{\partial Q}}\right|_{\mathbf {x} }\cdot Q=U-QV={\frac {1}{2}}QV-QV=-{\frac {1}{2}}QV=-{\frac {1}{2}}V^{2}C(\mathbf {x} ).}$

The force now becomes the negative gradient of this Legendre transform, still pointing in the same direction,

${\displaystyle \mathbf {F} (\mathbf {x} )=-{\frac {dU^{*}}{d\mathbf {x} }}~.}$

The two conjugate energies happen to stand opposite to each other, only because of the linearity of the capacitance—except now Q is no longer a constant. They reflect the two different pathways of storing energy into the capacitor, resulting in, for instance, the same "pull" between a capacitor's plates.

### Probability theory

In large deviations theory, the rate function is defined as the Legendre transformation of the logarithm of the moment generating function of a random variable. An important application of the rate function is in the calculation of tail probabilities of sums of i.i.d. random variables.

### Microeconomics

Legendre transformation arises naturally in microeconomics in the process of finding the supply S(P) of some product given a fixed price P on the market knowing the cost function C(Q), i.e. the cost for the producer to make/mine/etc. Q units of the given product.

A simple theory explains the shape of the supply curve based solely on the cost function. Let us suppose the market price for a one unit of our product is P. For a company selling this good, the best strategy is to adjust the production Q so that its profit is maximized. We can maximize the profit

${\displaystyle {\text{profit}}={\text{revenue}}-{\text{costs}}=PQ-C(Q)}$

by differentiating with respect to Q and solving
${\displaystyle P-C'(Q_{\text{opt}})=0.}$

Qopt represents the optimal quantity Q of goods that the producer is willing to supply, which is indeed the supply itself:

${\displaystyle S(P)=Q_{\text{opt}}(P)=(C')^{-1}(P).}$

If we consider the maximal profit as a function of price, ${\displaystyle {\text{profit}}_{\text{max}}(P)}$ , we see that it is the Legendre transform of the cost function ${\displaystyle C(Q)}$ .

## 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. (For a function of one variable, 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 ${\displaystyle p}$  and ${\displaystyle y}$ -intercept ${\displaystyle b}$  is given by ${\displaystyle y=px+b.}$  For this line to be tangent to the graph of a function ${\displaystyle f}$  at the point ${\displaystyle \left(x_{0},f(x_{0})\right)}$  requires

${\displaystyle f(x_{0})=px_{0}+b}$

and
${\displaystyle p=f'(x_{0}).}$

Being the derivative of a strictly convex function, the function ${\displaystyle f'}$  is strictly monotone and thus injective. The second equation can be solved for ${\displaystyle x_{0}=f^{\prime -1}(p),}$  allowing elimination of ${\displaystyle x_{0}}$  from the first, and solving for the ${\displaystyle y}$ -intercept ${\displaystyle b}$  of the tangent as a function of its slope ${\displaystyle p,}$

${\displaystyle b=f(x_{0})-px_{0}=f\left(f^{\prime -1}(p)\right)-p\cdot f^{\prime -1}(p)=-f^{\star }(p)}$

where ${\displaystyle f^{\star }}$  denotes the Legendre transform of ${\displaystyle f.}$

The family of tangent lines of the graph of ${\displaystyle f}$  parameterized by the slope ${\displaystyle p}$  is therefore given by

${\displaystyle y=px-f^{\star }(p),}$

or, written implicitly, by the solutions of the equation
${\displaystyle F(x,y,p)=y+f^{\star }(p)-px=0~.}$

The graph of the original function can be reconstructed from this family of lines as the envelope of this family by demanding

${\displaystyle {\frac {\partial F(x,y,p)}{\partial p}}=f^{\star \prime }(p)-x=0.}$

Eliminating ${\displaystyle p}$  from these two equations gives

${\displaystyle y=x\cdot f^{\star \prime -1}(x)-f^{\star }\left(f^{\star \prime -1}(x)\right).}$

Identifying ${\displaystyle y}$  with ${\displaystyle f(x)}$  and recognizing the right side of the preceding equation as the Legendre transform of ${\displaystyle f^{\star },}$  yields

${\displaystyle f(x)=f^{\star \star }(x)~.}$

## Legendre transformation in more than one dimension

For a differentiable real-valued function on an open convex subset U of Rn 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 Df, and g is the function on V given by the formula

${\displaystyle g(y)=\left\langle y,x\right\rangle -f(x),\qquad x=\left(Df\right)^{-1}(y)}$

where
${\displaystyle \left\langle u,v\right\rangle =\sum _{k=1}^{n}u_{k}\cdot v_{k}}$

is the scalar product on Rn. The multidimensional transform can be interpreted as an encoding of the convex hull of the function's epigraph in terms of its supporting hyperplanes.[1]

Alternatively, if X is a 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*Xx with Y and T*Yy with X. If f is a real differentiable function over X, then its exterior derivative, df, 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, then dg defines a map from Y to X. If both maps happen to be inverses of each other, we say we have a Legendre transform. The notion of the tautological one-form is commonly used in this setting.

When the function is not differentiable, the Legendre transform can still be extended, and is known as the Legendre-Fenchel transformation. In this more general setting, a few properties are lost: for example, the Legendre transform is no longer its own inverse (unless there are extra assumptions, like convexity).

## Legendre transformation on manifolds

Let ${\textstyle M}$  be a smooth manifold, let ${\displaystyle E}$  and ${\textstyle \pi :E\to M}$  respectively be a vector bundle on ${\displaystyle M}$  and its associated bundle projection, and let ${\textstyle L:E\to \mathbb {R} }$  be a smooth function. We think of ${\textstyle L}$  as a Lagrangian by analogy with the classical case where ${\textstyle M=\mathbb {R} }$ , ${\textstyle E=TM=\mathbb {R} \times \mathbb {R} }$  and ${\textstyle L(x,v)={\frac {1}{2}}mv^{2}-V(x)}$  for some positive number ${\textstyle m\in \mathbb {R} }$  and function ${\textstyle V:M\to \mathbb {R} }$ . As usual, we denote by ${\textstyle E^{*}}$  the dual of ${\textstyle E}$ , by ${\textstyle E_{x}}$  the fiber of ${\textstyle \pi }$  over ${\textstyle x\in M}$ , and by ${\textstyle L|_{E_{x}}:E_{x}\to \mathbb {R} }$  the restriction of ${\textstyle L}$  to ${\textstyle E_{x}}$ . The Legendre transformation of ${\textstyle L}$  is the smooth morphism

${\displaystyle \mathbf {F} L:E\to E^{*}}$

defined by ${\textstyle \mathbf {F} L(v)=d(L|_{E_{x}})(v)\in E_{x}^{*}}$ , where ${\textstyle x=\pi (v)}$ . In other words, ${\textstyle \mathbf {F} L(v)\in E_{x}^{*}}$  is the covector that sends ${\textstyle w\in E_{x}}$  to the directional derivative ${\textstyle \left.{\frac {d}{dt}}\right|_{t=0}L(v+tw)\in \mathbb {R} }$ .

To describe the Legendre transformation locally, let ${\textstyle U\subseteq M}$  be a coordinate chart over which ${\textstyle E}$  is trivial. Picking a trivialization of ${\textstyle E}$  over ${\textstyle U}$ , we obtain charts ${\textstyle E_{U}\cong U\times \mathbb {R} ^{r}}$  and ${\textstyle E_{U}^{*}\cong U\times \mathbb {R} ^{r}}$ . In terms of these charts, we have ${\textstyle \mathbf {F} L(x;v_{1},\dotsc ,v_{r})=(x;p_{1},\dotsc ,p_{r})}$ , where

${\displaystyle p_{i}={\frac {\partial L}{\partial v_{i}}}(x;v_{1},\dotsc ,v_{r})}$

for all ${\textstyle i=1,\dots ,r}$ .

If, as in the classical case, the restriction of ${\textstyle L:E\to \mathbb {R} }$  to each fiber ${\textstyle E_{x}}$  is strictly convex and bounded below by a positive definite quadratic form minus a constant, then the Legendre transform ${\textstyle \mathbf {F} L:E\to E^{*}}$  is a diffeomorphism.[2] Suppose that ${\textstyle \mathbf {F} L}$  is a diffeomorphism and let ${\textstyle H:E^{*}\to \mathbb {R} }$  be the “Hamiltonian” function defined by

${\displaystyle H(p)=p\cdot v-L(v),}$

where ${\textstyle v=(\mathbf {F} L)^{-1}(p)}$ . Using the natural isomorphism ${\textstyle E\cong E^{**}}$ , we may view the Legendre transformation of ${\textstyle H}$  as a map ${\textstyle \mathbf {F} H:E^{*}\to E}$ . Then we have[2]
${\displaystyle (\mathbf {F} L)^{-1}=\mathbf {F} H.}$

## Further properties

### Scaling properties

The Legendre transformation has the following scaling properties: For a > 0,

${\displaystyle f(x)=a\cdot g(x)\Rightarrow f^{\star }(p)=a\cdot g^{\star }\left({\frac {p}{a}}\right)}$

${\displaystyle f(x)=g(a\cdot x)\Rightarrow f^{\star }(p)=g^{\star }\left({\frac {p}{a}}\right).}$

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. (Since f(x) = xr/r, with r > 1, implies f*(p) = ps/s.) Thus, the only monomial whose degree is invariant under Legendre transform is the quadratic.

### Behavior under translation

${\displaystyle f(x)=g(x)+b\Rightarrow f^{\star }(p)=g^{\star }(p)-b}$

${\displaystyle f(x)=g(x+y)\Rightarrow f^{\star }(p)=g^{\star }(p)-p\cdot y}$

### Behavior under inversion

${\displaystyle f(x)=g^{-1}(x)\Rightarrow f^{\star }(p)=-p\cdot g^{\star }\left({\frac {1}{p}}\right)}$

### Behavior under linear transformations

Let A : RnRm be a linear transformation. For any convex function f on Rn, one has

${\displaystyle (Af)^{\star }=f^{\star }A^{\star }}$

where A* is the adjoint operator of A defined by
${\displaystyle \left\langle Ax,y^{\star }\right\rangle =\left\langle x,A^{\star }y^{\star }\right\rangle ,}$

and Af is the push-forward of f along A
${\displaystyle (Af)(y)=\inf\{f(x):x\in X,Ax=y\}.}$

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

${\displaystyle f(Ax)=f(x),\;\forall x,\;\forall A\in G}$

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

${\displaystyle \left(f\star _{\inf }g\right)(x)=\inf \left\{f(x-y)+g(y)\,|\,y\in \mathbf {R} ^{n}\right\}.}$

Let f1, ..., fm be proper convex functions on Rn. Then

${\displaystyle \left(f_{1}\star _{\inf }\cdots \star _{\inf }f_{m}\right)^{\star }=f_{1}^{\star }+\cdots +f_{m}^{\star }.}$

### Fenchel's inequality

For any function f and its convex conjugate f * Fenchel's inequality (also known as the Fenchel–Young inequality) holds for every xX and pX*, i.e., independent x, p pairs,

${\displaystyle \left\langle p,x\right\rangle \leq f(x)+f^{\star }(p).}$

## References

1. ^ "Archived copy". Archived from the original on 2015-03-12. Retrieved 2011-01-26.{{cite web}}: CS1 maint: archived copy as title (link)
2. ^ a b Ana Cannas da Silva. Lectures on Symplectic Geometry, Corrected 2nd printing. Springer-Verlag, 2008. pp. 147-148. ISBN 978-3-540-42195-5.
• Courant, Richard; Hilbert, David (2008). Methods of Mathematical Physics. Vol. 2. John Wiley & Sons. ISBN 978-0471504399.
• Arnol'd, Vladimir Igorevich (1989). Mathematical Methods of Classical Mechanics (2nd ed.). Springer. ISBN 0-387-96890-3.
• Fenchel, W. (1949). "On conjugate convex functions", Can. J. Math 1: 73-77.
• Rockafellar, R. Tyrrell (1996) [1970]. Convex Analysis. Princeton University Press. ISBN 0-691-01586-4.
• Zia, R. K. P.; Redish, E. F.; McKay, S. R. (2009). "Making sense of the Legendre transform". American Journal of Physics. 77 (7): 614. arXiv:0806.1147. Bibcode:2009AmJPh..77..614Z. doi:10.1119/1.3119512.