Misplaced Pages

Legendre transformation

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from Legendre transform) Mathematical transformation This article is about an involution transform commonly used in classical mechanics and thermodynamics. For the integral transform using Legendre polynomials as kernels, see Legendre transform (integral transform).
The function f ( x ) {\displaystyle f(x)} is defined on the interval [ a , b ] {\textstyle } . For a given p {\displaystyle p} , the difference p x f ( x ) {\displaystyle px-f(x)} takes the maximum at x {\displaystyle x'} . Thus, the Legendre transformation of f ( x ) {\displaystyle f(x)} is f ( p ) = p x f ( x ) {\displaystyle f^{*}(p)=px'-f(x')} .

In mathematics, the Legendre transformation (or Legendre transform), first introduced by Adrien-Marie Legendre in 1787 when studying the minimal surface problem, is an involutive transformation on real-valued functions that are convex on a real variable. Specifically, if a real-valued multivariable function is convex on one of its independent real variables, then the Legendre transform with respect to this variable is applicable to the function.

In physical problems, the Legendre transform is used to convert functions of one quantity (such as position, 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.

For sufficiently smooth functions on the real line, the Legendre transform f {\displaystyle f^{*}} of a function f {\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 D f ( ) = ( D f ) 1 ( )   , {\displaystyle Df(\cdot )=\left(Df^{*}\right)^{-1}(\cdot )~,} where D {\displaystyle D} is an operator of differentiation, {\displaystyle \cdot } represents an argument or input to the associated function, ( ϕ ) 1 ( ) {\displaystyle (\phi )^{-1}(\cdot )} is an inverse function such that ( ϕ ) 1 ( ϕ ( x ) ) = x {\displaystyle (\phi )^{-1}(\phi (x))=x} , or equivalently, as f ( f ( x ) ) = x {\displaystyle f'(f^{*\prime }(x^{*}))=x^{*}} and f ( f ( x ) ) = x {\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

Definition in one-dimensional real space

Let I R {\displaystyle I\subset \mathbb {R} } be an interval, and f : I R {\displaystyle f:I\to \mathbb {R} } a convex function; then the Legendre transform of f {\displaystyle f} is the function f : I R {\displaystyle f^{*}:I^{*}\to \mathbb {R} } defined by f ( x ) = sup x I ( x x f ( x ) ) ,         I = { x R : f ( x ) < }   {\displaystyle f^{*}(x^{*})=\sup _{x\in I}(x^{*}x-f(x)),\ \ \ \ I^{*}=\left\{x^{*}\in \mathbb {R} :f^{*}(x^{*})<\infty \right\}~} where sup {\textstyle \sup } denotes the supremum over I {\displaystyle I} , e.g., x {\textstyle x} in I {\textstyle I} is chosen such that x x f ( x ) {\textstyle x^{*}x-f(x)} is maximized at each x {\textstyle x^{*}} , or x {\textstyle x^{*}} is such that x x f ( x ) {\displaystyle x^{*}x-f(x)} has a bounded value throughout I {\textstyle I} (e.g., when f ( x ) {\displaystyle f(x)} is a linear function).

The function f {\displaystyle f^{*}} is called the convex conjugate function of f {\displaystyle f} . For historical reasons (rooted in analytic mechanics), the conjugate variable is often denoted p {\displaystyle p} , instead of x {\displaystyle x^{*}} . If the convex function f {\displaystyle f} is defined on the whole line and is everywhere differentiable, then f ( p ) = sup x I ( p x f ( x ) ) = ( p x f ( x ) ) | x = ( f ) 1 ( p ) {\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 y {\displaystyle y} -intercept of the tangent line to the graph of f {\displaystyle f} that has slope p {\displaystyle p} .

Definition in n-dimensional real space

The generalization to convex functions f : X R {\displaystyle f:X\to \mathbb {R} } on a convex set X R n {\displaystyle X\subset \mathbb {R} ^{n}} is straightforward: f : X R {\displaystyle f^{*}:X^{*}\to \mathbb {R} } has domain X = { x R n : sup x X ( x , x f ( x ) ) < } {\displaystyle X^{*}=\left\{x^{*}\in \mathbb {R} ^{n}:\sup _{x\in X}(\langle x^{*},x\rangle -f(x))<\infty \right\}} and is defined by f ( x ) = sup x X ( x , x f ( x ) ) , x X   , {\displaystyle f^{*}(x^{*})=\sup _{x\in X}(\langle x^{*},x\rangle -f(x)),\quad x^{*}\in X^{*}~,} where x , x {\displaystyle \langle x^{*},x\rangle } denotes the dot product of x {\displaystyle x^{*}} and x {\displaystyle x} .

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

Understanding the Legendre transform in terms of derivatives

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

To see this, first note that if f {\displaystyle f} as a convex function on the real line is differentiable and x ¯ {\displaystyle {\overline {x}}} is a critical point of the function of x p x f ( x ) {\displaystyle x\mapsto p\cdot x-f(x)} , then the supremum is achieved at x ¯ {\textstyle {\overline {x}}} (by convexity, see the first figure in this Misplaced Pages page). Therefore, the Legendre transform of f {\displaystyle f} is f ( p ) = p x ¯ f ( x ¯ ) {\displaystyle f^{*}(p)=p\cdot {\overline {x}}-f({\overline {x}})} .

Then, suppose that the first derivative f {\displaystyle f'} is invertible and let the inverse be g = ( f ) 1 {\displaystyle g=(f')^{-1}} . Then for each p {\textstyle p} , the point g ( p ) {\displaystyle g(p)} is the unique critical point x ¯ {\textstyle {\overline {x}}} of the function x p x f ( x ) {\displaystyle x\mapsto px-f(x)} (i.e., x ¯ = g ( p ) {\displaystyle {\overline {x}}=g(p)} ) because f ( g ( p ) ) = p {\displaystyle f'(g(p))=p} and the function's first derivative with respect to x {\displaystyle x} at g ( p ) {\displaystyle g(p)} is p f ( g ( p ) ) = 0 {\displaystyle p-f'(g(p))=0} . Hence we have f ( p ) = p g ( p ) f ( g ( p ) ) {\displaystyle f^{*}(p)=p\cdot g(p)-f(g(p))} for each p {\textstyle p} . By differentiating with respect to p {\textstyle p} , we find ( f ) ( p ) = g ( p ) + p g ( p ) f ( g ( p ) ) g ( p ) . {\displaystyle (f^{*})'(p)=g(p)+p\cdot g'(p)-f'(g(p))\cdot g'(p).} Since f ( g ( p ) ) = p {\displaystyle f'(g(p))=p} this simplifies to ( f ) ( p ) = g ( p ) = ( f ) 1 ( p ) {\displaystyle (f^{*})'(p)=g(p)=(f')^{-1}(p)} . In other words, ( f ) {\displaystyle (f^{*})'} and f {\displaystyle f'} are inverses to each other.

In general, if h = ( f ) 1 {\displaystyle h'=(f')^{-1}} as the inverse of f , {\displaystyle f',} then h = ( f ) {\displaystyle h'=(f^{*})'} so integration gives f = h + c . {\displaystyle f^{*}=h+c.} with a constant c . {\displaystyle c.}

In practical terms, given f ( x ) , {\displaystyle f(x),} the parametric plot of x f ( x ) f ( x ) {\displaystyle xf'(x)-f(x)} versus f ( x ) {\displaystyle f'(x)} amounts to the graph of f ( p ) {\displaystyle f^{*}(p)} versus p . {\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, f ( x ) f ( p ) = x p . {\displaystyle f(x)-f^{*}(p)=xp.}

Formal definition in physics context

In analytical mechanics and thermodynamics, Legendre transformation is usually defined as follows: suppose f {\displaystyle f} is a function of x {\displaystyle x} ; then we have

d f = d f d x d x . {\displaystyle \mathrm {d} f={\frac {\mathrm {d} f}{\mathrm {d} x}}\mathrm {d} x.}

Performing the Legendre transformation on this function means that we take p = d f d x {\displaystyle p={\frac {\mathrm {d} f}{\mathrm {d} x}}} as the independent variable, so that the above expression can be written as

d f = p d x , {\displaystyle \mathrm {d} f=p\mathrm {d} x,}

and according to Leibniz's rule d ( u v ) = u d v + v d u , {\displaystyle \mathrm {d} (uv)=u\mathrm {d} v+v\mathrm {d} u,} we then have

d ( x p f ) = x d p , {\displaystyle \mathrm {d} \left(xp-f\right)=x\mathrm {d} p,}

and taking f = x p f , {\displaystyle f^{*}=xp-f,} we have d f = x d p , {\displaystyle \mathrm {d} f^{*}=x\mathrm {d} p,} which means

d f d p = x . {\displaystyle {\frac {\mathrm {d} f^{*}}{\mathrm {d} p}}=x.}

When f {\displaystyle f} is a function of n {\displaystyle n} variables x 1 , x 2 , , x n {\displaystyle x_{1},x_{2},\cdots ,x_{n}} , then we can perform the Legendre transformation on each one or several variables: we have

d f = p 1 d x 1 + p 2 d x 2 + + p n d x n , {\displaystyle \mathrm {d} f=p_{1}\mathrm {d} x_{1}+p_{2}\mathrm {d} x_{2}+\cdots +p_{n}\mathrm {d} x_{n},}

where p i = f x i . {\displaystyle p_{i}={\frac {\partial f}{\partial x_{i}}}.} Then if we want to perform the Legendre transformation on, e.g. x 1 {\displaystyle x_{1}} , then we take p 1 {\displaystyle p_{1}} together with x 2 , , x n {\displaystyle x_{2},\cdots ,x_{n}} as independent variables, and with Leibniz's rule we have

d ( f x 1 p 1 ) = x 1 d p 1 + p 2 d x 2 + + p n d x n . {\displaystyle \mathrm {d} (f-x_{1}p_{1})=-x_{1}\mathrm {d} p_{1}+p_{2}\mathrm {d} x_{2}+\cdots +p_{n}\mathrm {d} x_{n}.}

So for the function φ ( p 1 , x 2 , , x n ) = f ( x 1 , x 2 , , x n ) x 1 p 1 , {\displaystyle \varphi (p_{1},x_{2},\cdots ,x_{n})=f(x_{1},x_{2},\cdots ,x_{n})-x_{1}p_{1},} we have

φ p 1 = x 1 , φ x 2 = p 2 , , φ x n = p n . {\displaystyle {\frac {\partial \varphi }{\partial p_{1}}}=-x_{1},\quad {\frac {\partial \varphi }{\partial x_{2}}}=p_{2},\quad \cdots ,\quad {\frac {\partial \varphi }{\partial x_{n}}}=p_{n}.}

We can also do this transformation for variables x 2 , , x n {\displaystyle x_{2},\cdots ,x_{n}} . If we do it to all the variables, then we have

d φ = x 1 d p 1 x 2 d p 2 x n d p n {\displaystyle \mathrm {d} \varphi =-x_{1}\mathrm {d} p_{1}-x_{2}\mathrm {d} p_{2}-\cdots -x_{n}\mathrm {d} p_{n}} where φ = f x 1 p 1 x 2 p 2 x n p n . {\displaystyle \varphi =f-x_{1}p_{1}-x_{2}p_{2}-\cdots -x_{n}p_{n}.}

In analytical mechanics, people perform this transformation on variables q ˙ 1 , q ˙ 2 , , q ˙ n {\displaystyle {\dot {q}}_{1},{\dot {q}}_{2},\cdots ,{\dot {q}}_{n}} of the Lagrangian L ( q 1 , , q n , q ˙ 1 , , q ˙ n ) {\displaystyle L(q_{1},\cdots ,q_{n},{\dot {q}}_{1},\cdots ,{\dot {q}}_{n})} to get the Hamiltonian:

H ( q 1 , , q n , p 1 , , p n ) = i = 1 n p i q ˙ i L ( q 1 , , q n , q ˙ 1 , q ˙ n ) . {\displaystyle H(q_{1},\cdots ,q_{n},p_{1},\cdots ,p_{n})=\sum _{i=1}^{n}p_{i}{\dot {q}}_{i}-L(q_{1},\cdots ,q_{n},{\dot {q}}_{1}\cdots ,{\dot {q}}_{n}).}

In thermodynamics, people perform this transformation on variables according to the type of thermodynamic system they want; for example, starting from the cardinal function of state, the internal energy U ( S , V ) {\displaystyle U(S,V)} , we have

d U = T d S p d V , {\displaystyle \mathrm {d} U=T\mathrm {d} S-p\mathrm {d} V,}

so we can perform the Legendre transformation on either or both of S , V {\displaystyle S,V} to yield

d H = d ( U + p V )                     =         T d S + V d p {\displaystyle \mathrm {d} H=\mathrm {d} (U+pV)\ \ \ \ \ \ \ \ \ \ =\ \ \ \ T\mathrm {d} S+V\mathrm {d} p}
d F = d ( U T S )                     = S d T p d V {\displaystyle \mathrm {d} F=\mathrm {d} (U-TS)\ \ \ \ \ \ \ \ \ \ =-S\mathrm {d} T-p\mathrm {d} V}
d G = d ( U T S + p V ) = S d T + V d p , {\displaystyle \mathrm {d} G=\mathrm {d} (U-TS+pV)=-S\mathrm {d} T+V\mathrm {d} p,}

and each of these three expressions has a physical meaning.

This definition of the Legendre transformation is the one originally introduced by Legendre in his work in 1787, and is still applied by physicists nowadays. Indeed, this definition can be mathematically rigorous if we treat all the variables and functions defined above: for example, f , x 1 , , x n , p 1 , , p n , {\displaystyle f,x_{1},\cdots ,x_{n},p_{1},\cdots ,p_{n},} as differentiable functions defined on an open set of R n {\displaystyle \mathbb {R} ^{n}} or on a differentiable manifold, and d f , d x i , d p i {\displaystyle \mathrm {d} f,\mathrm {d} x_{i},\mathrm {d} p_{i}} their differentials (which are treated as cotangent vector field in the context of differentiable manifold). This definition is equivalent to the modern mathematicians' definition as long as f {\displaystyle f} is differentiable and convex for the variables x 1 , x 2 , , x n . {\displaystyle x_{1},x_{2},\cdots ,x_{n}.}

Properties

  • The Legendre transform of a convex function, of which double derivative values are all positive, is also a convex function of which double derivative values are all positive.Proof. Let us show this with a doubly differentiable function f ( x ) {\displaystyle f(x)} with all positive double derivative values and with a bijective (invertible) derivative. For a fixed p {\displaystyle p} , let x ¯ {\displaystyle {\bar {x}}} maximize or make the function p x f ( x ) {\displaystyle px-f(x)} bounded over x {\displaystyle x} . Then the Legendre transformation of f {\displaystyle f} is f ( p ) = p x ¯ f ( x ¯ ) {\displaystyle f^{*}(p)=p{\bar {x}}-f({\bar {x}})} , thus, f ( x ¯ ) = p {\displaystyle f'({\bar {x}})=p} by the maximizing or bounding condition d d x ( p x f ( x ) ) = p f ( x ) = 0 {\displaystyle {\frac {d}{dx}}(px-f(x))=p-f'(x)=0} . Note that x ¯ {\displaystyle {\bar {x}}} depends on p {\displaystyle p} . (This can be visually shown in the 1st figure of this page above.) Thus x ¯ = g ( p ) {\displaystyle {\bar {x}}=g(p)} where g ( f ) 1 {\displaystyle g\equiv (f')^{-1}} , meaning that g {\displaystyle g} is the inverse of f {\displaystyle f'} that is the derivative of f {\displaystyle f} (so f ( g ( p ) ) = p {\displaystyle f'(g(p))=p} ). Note that g {\displaystyle g} is also differentiable with the following derivative (Inverse function rule), d g ( p ) d p = 1 f ( g ( p ) )   . {\displaystyle {\frac {dg(p)}{dp}}={\frac {1}{f''(g(p))}}~.} Thus, the Legendre transformation f ( p ) = p g ( p ) f ( g ( p ) ) {\displaystyle f^{*}(p)=pg(p)-f(g(p))} is the composition of differentiable functions, hence it is differentiable. Applying the product rule and the chain rule with the found equality x ¯ = g ( p ) {\displaystyle {\bar {x}}=g(p)} yields d ( f ) d p = g ( p ) + ( p f ( g ( p ) ) ) d g ( p ) d p = g ( p ) , {\displaystyle {\frac {d(f^{*})}{dp}}=g(p)+\left(p-f'(g(p))\right)\cdot {\frac {dg(p)}{dp}}=g(p),} giving d 2 ( f ) d p 2 = d g ( p ) d p = 1 f ( g ( p ) ) > 0 , {\displaystyle {\frac {d^{2}(f^{*})}{dp^{2}}}={\frac {dg(p)}{dp}}={\frac {1}{f''(g(p))}}>0,} so f {\displaystyle f^{*}} is convex with its double derivatives are all positive.
  • The Legendre transformation is an involution, i.e., f = f   {\displaystyle f^{**}=f~} . Proof. By using the above identities as f ( x ¯ ) = p {\displaystyle f'({\bar {x}})=p} , x ¯ = g ( p ) {\displaystyle {\bar {x}}=g(p)} , f ( p ) = p x ¯ f ( x ¯ ) {\displaystyle f^{*}(p)=p{\bar {x}}-f({\bar {x}})} and its derivative ( f ) ( p ) = g ( p ) {\displaystyle (f^{*})'(p)=g(p)} , f ( y ) = ( y p ¯ f ( p ¯ ) ) | ( f ) ( p ¯ ) = y = g ( p ¯ ) p ¯ f ( p ¯ ) = g ( p ¯ ) p ¯ ( p ¯ g ( p ¯ ) f ( g ( p ¯ ) ) ) = f ( g ( p ¯ ) ) = f ( y )   . {\displaystyle {\begin{aligned}f^{**}(y)&{}=\left(y\cdot {\bar {p}}-f^{*}({\bar {p}})\right)|_{(f^{*})'({\bar {p}})=y}\\&{}=g({\bar {p}})\cdot {\bar {p}}-f^{*}({\bar {p}})\\&{}=g({\bar {p}})\cdot {\bar {p}}-({\bar {p}}g({\bar {p}})-f(g({\bar {p}})))\\&{}=f(g({\bar {p}}))\\&{}=f(y)~.\end{aligned}}} Note that this derivation does not require the condition to have all positive values in double derivative of the original function f {\displaystyle f} .

Identities

As shown above, for a convex function f ( x ) {\displaystyle f(x)} , with x = x ¯ {\displaystyle x={\bar {x}}} maximizing or making p x f ( x ) {\displaystyle px-f(x)} bounded at each p {\displaystyle p} to define the Legendre transform f ( p ) = p x ¯ f ( x ¯ ) {\displaystyle f^{*}(p)=p{\bar {x}}-f({\bar {x}})} and with g ( f ) 1 {\displaystyle g\equiv (f')^{-1}} , the following identities hold.

  • f ( x ¯ ) = p {\displaystyle f'({\bar {x}})=p} ,
  • x ¯ = g ( p ) {\displaystyle {\bar {x}}=g(p)} ,
  • ( f ) ( p ) = g ( p ) {\displaystyle (f^{*})'(p)=g(p)} .

Examples

Example 1

f ( x ) = e x {\displaystyle f(x)=e^{x}} over the domain I = R {\displaystyle I=\mathbb {R} } is plotted in red and its Legendre transform f ( x ) = x ( ln ( x ) 1 ) {\displaystyle f^{*}(x^{*})=x^{*}(\ln(x^{*})-1)} over the domain I = ( 0 , ) {\displaystyle I^{*}=(0,\infty )} in dashed blue. Note that the Legendre transform appears convex.

Consider the exponential function f ( x ) = e x , {\displaystyle f(x)=e^{x},} which has the domain I = R {\displaystyle I=\mathbb {R} } . From the definition, the Legendre transform is f ( x ) = sup x R ( x x e x ) , x I {\displaystyle f^{*}(x^{*})=\sup _{x\in \mathbb {R} }(x^{*}x-e^{x}),\quad x^{*}\in I^{*}} where I {\displaystyle I^{*}} remains to be determined. To evaluate the supremum, compute the derivative of x x e x {\displaystyle x^{*}x-e^{x}} with respect to x {\displaystyle x} and set equal to zero: d d x ( x x e x ) = x e x = 0. {\displaystyle {\frac {d}{dx}}(x^{*}x-e^{x})=x^{*}-e^{x}=0.} The second derivative e x {\displaystyle -e^{x}} is negative everywhere, so the maximal value is achieved at x = ln ( x ) {\displaystyle x=\ln(x^{*})} . Thus, the Legendre transform is f ( x ) = x ln ( x ) e ln ( x ) = x ( ln ( x ) 1 ) {\displaystyle f^{*}(x^{*})=x^{*}\ln(x^{*})-e^{\ln(x^{*})}=x^{*}(\ln(x^{*})-1)} and has domain I = ( 0 , ) . {\displaystyle I^{*}=(0,\infty ).} This illustrates that the domains of a function and its Legendre transform can be different.

To find the Legendre transformation of the Legendre transformation of f {\displaystyle f} , f ( x ) = sup x R ( x x x ( ln ( x ) 1 ) ) , x I , {\displaystyle f^{**}(x)=\sup _{x^{*}\in \mathbb {R} }(xx^{*}-x^{*}(\ln(x^{*})-1)),\quad x\in I,} where a variable x {\displaystyle x} is intentionally used as the argument of the function f {\displaystyle f^{**}} to show the involution property of the Legendre transform as f = f {\displaystyle f^{**}=f} . we compute 0 = d d x ( x x x ( ln ( x ) 1 ) ) = x ln ( x ) {\displaystyle {\begin{aligned}0&={\frac {d}{dx^{*}}}{\big (}xx^{*}-x^{*}(\ln(x^{*})-1){\big )}=x-\ln(x^{*})\end{aligned}}} thus the maximum occurs at x = e x {\displaystyle x^{*}=e^{x}} because the second derivative d 2 d x 2 f ( x ) = 1 x < 0 {\displaystyle {\frac {d^{2}}{{dx^{*}}^{2}}}f^{**}(x)=-{\frac {1}{x^{*}}}<0} over the domain of f {\displaystyle f^{**}} as I = ( 0 , ) . {\displaystyle I^{*}=(0,\infty ).} As a result, f {\displaystyle f^{**}} is found as f ( x ) = x e x e x ( ln ( e x ) 1 ) = e x , {\displaystyle {\begin{aligned}f^{**}(x)&=xe^{x}-e^{x}(\ln(e^{x})-1)=e^{x},\end{aligned}}} thereby confirming that f = f , {\displaystyle f=f^{**},} as expected.

Example 2

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

For x* fixed, the function of x, x*xf(x) = x*xcx 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 f ( x ) = x 2 4 c   . {\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, f ( x ) = 1 4 ( 1 / 4 c ) x 2 = c x 2   , {\displaystyle f^{**}(x)={\frac {1}{4(1/4c)}}x^{2}=cx^{2}~,} namely f ** = f.

Example 3

Let f(x) = x for x ∈ (I = ).

For x* fixed, x*xf(x) is continuous on I compact, hence it always takes a finite maximum on it; it follows that the domain of the Legendre transform of f {\displaystyle f} is I* = R.

The stationary point at x = x*/2 (found by setting that the first derivative of x*xf(x) with respect to x {\displaystyle x} equal to zero) is in the domain if and only if 4 ≤ x* ≤ 6. Otherwise the maximum is taken either at x = 2 or x = 3 because the second derivative of x*xf(x) with respect to x {\displaystyle x} is negative as 2 {\displaystyle -2} ; for a part of the domain x < 4 {\displaystyle x^{*}<4} the maximum that x*xf(x) can take with respect to x [ 2 , 3 ] {\displaystyle x\in } is obtained at x = 2 {\displaystyle x=2} while for x > 6 {\displaystyle x^{*}>6} it becomes the maximum at x = 3 {\displaystyle x=3} . Thus, it follows that f ( x ) = { 2 x 4 , x < 4 x 2 4 , 4 x 6 , 3 x 9 , x > 6. {\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. (The definition of the Legendre transform requires the existence of the supremum, that requires upper bounds.)

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 sup x { c } ( x x f ( x ) ) = x c , {\displaystyle \sup _{x^{*}\in \{c\}}(xx^{*}-f^{*}(x^{*}))=xc,} and hence f **(x) = cx = f(x).

Example 5

As an example of a convex continuous function that is not everywhere differentiable, consider f ( x ) = | x | {\displaystyle f(x)=|x|} . This gives f ( x ) = sup x ( x x | x | ) = max ( sup x 0 x ( x 1 ) , sup x 0 x ( x + 1 ) ) , {\displaystyle f^{*}(x^{*})=\sup _{x}(xx^{*}-|x|)=\max \left(\sup _{x\geq 0}x(x^{*}-1),\,\sup _{x\leq 0}x(x^{*}+1)\right),} and thus f ( x ) = 0 {\displaystyle f^{*}(x^{*})=0} on its domain I = [ 1 , 1 ] {\displaystyle I^{*}=} .

Example 6: several variables

Let f ( x ) = x , A x + c {\displaystyle f(x)=\langle x,Ax\rangle +c} be defined on X = R, where A is a real, positive definite matrix.

Then f is convex, and p , x f ( x ) = p , x x , A x c , {\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 = Ap/2 is a maximum.

We have X* = R, and f ( p ) = 1 4 p , A 1 p c . {\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(x,y) be a function of two independent variables x and y, with the differential d f = f x d x + f y d y = p d x + v d y . {\displaystyle df={\frac {\partial f}{\partial x}}\,dx+{\frac {\partial f}{\partial y}}\,dy=p\,dx+v\,dy.}

Assume that the function f is convex in x for all y, so that one may perform the Legendre transform on f in x, with p the variable conjugate to x (for information, there is a relation f x | x ¯ = p {\displaystyle {\frac {\partial f}{\partial x}}|_{\bar {x}}=p} where x ¯ {\displaystyle {\bar {x}}} is a point in x maximizing or making p x f ( x , y ) {\displaystyle px-f(x,y)} bounded for given p and y). Since the new independent variable of the transform with respect to f is p, the differentials dx and dy in df devolve to dp and dy in the differential of the transform, 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 d g = d f p d x x d p = x d p + v d y {\displaystyle dg=df-p\,dx-x\,dp=-x\,dp+v\,dy} x = g p {\displaystyle x=-{\frac {\partial g}{\partial p}}} v = g y . {\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

L ( v , q ) = 1 2 v , M v V ( q ) , {\displaystyle L(v,q)={\tfrac {1}{2}}\langle v,Mv\rangle -V(q),} where ( v , q ) {\displaystyle (v,q)} are coordinates on R × R, M is a positive definite real matrix, and x , y = j x j y j . {\displaystyle \langle x,y\rangle =\sum _{j}x_{j}y_{j}.}

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

Hence the Legendre transform of L ( v , q ) {\displaystyle L(v,q)} as a function of v {\displaystyle v} is the Hamiltonian function, H ( p , q ) = 1 2 p , M 1 p + V ( q ) . {\displaystyle H(p,q)={\tfrac {1}{2}}\langle p,M^{-1}p\rangle +V(q).}

In a more general setting, ( v , q ) {\displaystyle (v,q)} are local coordinates on the tangent bundle T M {\displaystyle T{\mathcal {M}}} of a manifold M {\displaystyle {\mathcal {M}}} . For each q, L ( v , q ) {\displaystyle L(v,q)} is a convex function of the tangent space Vq. The Legendre transform gives the Hamiltonian H ( p , q ) {\displaystyle H(p,q)} as a function of the coordinates (p, q) of the cotangent bundle T M {\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 often be controlled more easily in a physical experiment.

For example, the internal energy U is an explicit function of the extensive variables entropy S, volume V, and chemical composition Ni (e.g., i = 1 , 2 , 3 , {\displaystyle i=1,2,3,\ldots } ) U = U ( S , V , { N i } ) , {\displaystyle U=U\left(S,V,\{N_{i}\}\right),} which has a total differential d U = T d S P d V + μ i d N i {\displaystyle dU=T\,dS-P\,dV+\sum \mu _{i}\,dN_{i}}

where T = U S | V , N i   f o r   a l l   i   v a l u e s , P = U V | S , N i   f o r   a l l   i   v a l u e s , μ i = U N i | S , V , N j   f o r   a l l   j i {\displaystyle T=\left.{\frac {\partial U}{\partial S}}\right\vert _{V,N_{i\ for\ all\ i\ values}},P=\left.-{\frac {\partial U}{\partial V}}\right\vert _{S,N_{i\ for\ all\ i\ values}},\mu _{i}=\left.{\frac {\partial U}{\partial N_{i}}}\right\vert _{S,V,N_{j\ for\ all\ j\neq i}}} .

(Subscripts are not necessary by the definition of partial derivatives but left here for clarifying variables.) Stipulating some common reference state, by using the (non-standard) Legendre transform of the internal energy U with respect to volume V, the enthalpy H may be obtained as the following.

To get the (standard) Legendre transform U {\textstyle U^{*}} of the internal energy U with respect to volume V, the function u ( p , S , V , { N i } ) = p V U {\textstyle u\left(p,S,V,\{{{N}_{i}}\}\right)=pV-U} is defined first, then it shall be maximized or bounded by V. To do this, the condition u V = p U V = 0 p = U V {\textstyle {\frac {\partial u}{\partial V}}=p-{\frac {\partial U}{\partial V}}=0\to p={\frac {\partial U}{\partial V}}} needs to be satisfied, so U = U V V U {\textstyle U^{*}={\frac {\partial U}{\partial V}}V-U} is obtained. This approach is justified because U is a linear function with respect to V (so a convex function on V) by the definition of extensive variables. The non-standard Legendre transform here is obtained by negating the standard version, so U = H = U U V V = U + P V {\textstyle -U^{*}=H=U-{\frac {\partial U}{\partial V}}V=U+PV} .

H is definitely a state function as it is obtained by adding PV (P and V as state variables) to a state function U = U ( S , V , { N i } ) {\textstyle U=U\left(S,V,\{N_{i}\}\right)} , so its differential is an exact differential. Because of d H = T d S + V d P + μ i d N i {\textstyle dH=T\,dS+V\,dP+\sum \mu _{i}\,dN_{i}} and the fact that it must be an exact differential, H = H ( S , P , { N i } ) {\displaystyle H=H(S,P,\{N_{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, A = U T S   , {\displaystyle A=U-TS~,} G = H T S = U + P V T S   . {\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.

Variable capacitor

As another example from physics, consider a parallel conductive 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 electrostatic potential energy stored in a capacitor of the capacitance C(x) and a positive electric charge +Q or negative charge -Q on each conductive plate is (with using the definition of the capacitance as C = Q V {\textstyle C={\frac {Q}{V}}} ),

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

where the dependence on the area of the plates, the dielectric constant of the insulation 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 created by the charge separation is then F ( x ) = d U d x   . {\displaystyle \mathbf {F} (\mathbf {x} )=-{\frac {dU}{d\mathbf {x} }}~.}

If the capacitor is not connected to any electric circuit, then the electric charges on the plates remain constant and the voltage varies when the plates move with respect to each other, and the force is the negative gradient of the electrostatic potential energy as F ( x ) = 1 2 d C ( x ) d x Q 2 C ( x ) 2 = 1 2 d C ( x ) d x V ( x ) 2 {\displaystyle \mathbf {F} (\mathbf {x} )={\frac {1}{2}}{\frac {dC(\mathbf {x} )}{d\mathbf {x} }}{\frac {Q^{2}}{{C(\mathbf {x} )}^{2}}}={\frac {1}{2}}{\frac {dC(\mathbf {x} )}{d\mathbf {x} }}V(\mathbf {x} )^{2}}

where V ( Q , x ) = V ( x ) {\textstyle V(Q,\mathbf {x} )=V(\mathbf {x} )} as the charge is fixed in this configuration.

However, instead, suppose that the voltage between the plates V is maintained constant as the plate moves by connection to a battery, which is a reservoir for electric charges at a constant potential difference. Then the amount of charges Q {\textstyle Q} is a variable instead of the voltage; Q {\textstyle Q} and V {\textstyle V} are the Legendre conjugate to each other. To find the force, first compute the non-standard Legendre transform U {\textstyle U^{*}} with respect to Q {\textstyle Q} (also with using C = Q V {\textstyle C={\frac {Q}{V}}} ),

U = U U Q | x Q = U 1 2 C ( x ) Q 2 Q | x Q = U Q V = 1 2 Q V Q V = 1 2 Q V = 1 2 V 2 C ( x ) . {\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} ).}

This transformation is possible because U {\textstyle U} is now a linear function of Q {\textstyle Q} so is convex on it. The force now becomes the negative gradient of this Legendre transform, resulting in the same force obtained from the original function U {\textstyle U} , F ( x ) = d U d x = 1 2 d C ( x ) d x V 2 . {\displaystyle \mathbf {F} (\mathbf {x} )=-{\frac {dU^{*}}{d\mathbf {x} }}={\frac {1}{2}}{\frac {dC(\mathbf {x} )}{d\mathbf {x} }}V^{2}.}

The two conjugate energies U {\textstyle U} and U {\textstyle U^{*}} happen to stand opposite to each other (their signs are opposite), 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, in particular in Cramér's theorem.

If X n {\displaystyle X_{n}} are i.i.d. random variables, let S n = X 1 + + X n {\displaystyle S_{n}=X_{1}+\cdots +X_{n}} be the associated random walk and M ( ξ ) {\displaystyle M(\xi )} the moment generating function of X 1 {\displaystyle X_{1}} . For ξ R {\displaystyle \xi \in \mathbb {R} } , E [ e ξ S n ] = M ( ξ ) n {\displaystyle E=M(\xi )^{n}} . Hence, by Markov's inequality, one has for ξ 0 {\displaystyle \xi \geq 0} and a R {\displaystyle a\in \mathbb {R} } P ( S n / n > a ) e n ξ a M ( ξ ) n = exp [ n ( ξ a Λ ( ξ ) ) ] {\displaystyle P(S_{n}/n>a)\leq e^{-n\xi a}M(\xi )^{n}=\exp} where Λ ( ξ ) = log M ( ξ ) {\displaystyle \Lambda (\xi )=\log M(\xi )} . Since the left-hand side is independent of ξ {\displaystyle \xi } , we may take the infimum of the right-hand side, which leads one to consider the supremum of ξ a Λ ( ξ ) {\displaystyle \xi a-\Lambda (\xi )} , i.e., the Legendre transform of Λ {\displaystyle \Lambda } , evaluated at x = a {\displaystyle x=a} .

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 profit = revenue costs = P Q C ( Q ) {\displaystyle {\text{profit}}={\text{revenue}}-{\text{costs}}=PQ-C(Q)} by differentiating with respect to Q and solving P C ( Q opt ) = 0. {\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: S ( P ) = Q opt ( P ) = ( C ) 1 ( P ) . {\displaystyle S(P)=Q_{\text{opt}}(P)=(C')^{-1}(P).}

If we consider the maximal profit as a function of price, profit max ( P ) {\displaystyle {\text{profit}}_{\text{max}}(P)} , we see that it is the Legendre transform of the cost function C ( Q ) {\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 p {\displaystyle p} and y {\displaystyle y} -intercept b {\displaystyle b} is given by y = p x + b {\displaystyle y=px+b} . For this line to be tangent to the graph of a function f {\displaystyle f} at the point ( x 0 , f ( x 0 ) ) {\displaystyle \left(x_{0},f(x_{0})\right)} requires f ( x 0 ) = p x 0 + b {\displaystyle f(x_{0})=px_{0}+b} and p = f ( x 0 ) . {\displaystyle p=f'(x_{0}).}

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

The family of tangent lines of the graph of f {\displaystyle f} parameterized by the slope p {\displaystyle p} is therefore given by y = p x f ( p ) , {\textstyle y=px-f^{\star }(p),} or, written implicitly, by the solutions of the equation F ( x , y , p ) = y + f ( p ) p x = 0   . {\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 F ( x , y , p ) p = f ( p ) x = 0. {\displaystyle {\frac {\partial F(x,y,p)}{\partial p}}=f^{\star \prime }(p)-x=0.}

Eliminating p {\displaystyle p} from these two equations gives y = x f 1 ( x ) f ( f 1 ( x ) ) . {\displaystyle y=x\cdot f^{\star \prime -1}(x)-f^{\star }\left(f^{\star \prime -1}(x)\right).}

Identifying y {\displaystyle y} with f ( x ) {\displaystyle f(x)} and recognizing the right side of the preceding equation as the Legendre transform of f , {\displaystyle f^{\star },} yield f ( x ) = f ( x )   . {\textstyle 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 R 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 g ( y ) = y , x f ( x ) , x = ( D f ) 1 ( y ) {\displaystyle g(y)=\left\langle y,x\right\rangle -f(x),\qquad x=\left(Df\right)^{-1}(y)} where u , v = k = 1 n u k v k {\displaystyle \left\langle u,v\right\rangle =\sum _{k=1}^{n}u_{k}\cdot v_{k}}

is the scalar product on R. The multidimensional transform can be interpreted as an encoding of the convex hull of the function's epigraph in terms of its supporting hyperplanes. This can be seen as consequence of the following two observations. On the one hand, the hyperplane tangent to the epigraph of f {\displaystyle f} at some point ( x , f ( x ) ) U × R {\displaystyle (\mathbf {x} ,f(\mathbf {x} ))\in U\times \mathbb {R} } has normal vector ( f ( x ) , 1 ) R n + 1 {\displaystyle (\nabla f(\mathbf {x} ),-1)\in \mathbb {R} ^{n+1}} . On the other hand, any closed convex set C R m {\displaystyle C\in \mathbb {R} ^{m}} can be characterized via the set of its supporting hyperplanes by the equations x n = h C ( n ) {\displaystyle \mathbf {x} \cdot \mathbf {n} =h_{C}(\mathbf {n} )} , where h C ( n ) {\displaystyle h_{C}(\mathbf {n} )} is the support function of C {\displaystyle C} . But the definition of Legendre transform via the maximization matches precisely that of the support function, that is, f ( x ) = h epi ( f ) ( x , 1 ) {\displaystyle f^{*}(\mathbf {x} )=h_{\operatorname {epi} (f)}(\mathbf {x} ,-1)} . We thus conclude that the Legendre transform characterizes the epigraph in the sense that the tangent plane to the epigraph at any point ( x , f ( x ) ) {\displaystyle (\mathbf {x} ,f(\mathbf {x} ))} is given explicitly by { z R n + 1 : z x = f ( x ) } . {\displaystyle \{\mathbf {z} \in \mathbb {R} ^{n+1}:\,\,\mathbf {z} \cdot \mathbf {x} =f^{*}(\mathbf {x} )\}.}

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 M {\textstyle M} be a smooth manifold, let E {\displaystyle E} and π : E M {\textstyle \pi :E\to M} be a vector bundle on M {\displaystyle M} and its associated bundle projection, respectively. Let L : E R {\textstyle L:E\to \mathbb {R} } be a smooth function. We think of L {\textstyle L} as a Lagrangian by analogy with the classical case where M = R {\textstyle M=\mathbb {R} } , E = T M = R × R {\textstyle E=TM=\mathbb {R} \times \mathbb {R} } and L ( x , v ) = 1 2 m v 2 V ( x ) {\textstyle L(x,v)={\frac {1}{2}}mv^{2}-V(x)} for some positive number m R {\textstyle m\in \mathbb {R} } and function V : M R {\textstyle V:M\to \mathbb {R} } .

As usual, the dual of E {\textstyle E} is denote by E {\textstyle E^{*}} . The fiber of π {\textstyle \pi } over x M {\textstyle x\in M} is denoted E x {\textstyle E_{x}} , and the restriction of L {\textstyle L} to E x {\textstyle E_{x}} is denoted by L | E x : E x R {\textstyle L|_{E_{x}}:E_{x}\to \mathbb {R} } . The Legendre transformation of L {\textstyle L} is the smooth morphism F L : E E {\displaystyle \mathbf {F} L:E\to E^{*}} defined by F L ( v ) = d ( L | E x ) v E x {\textstyle \mathbf {F} L(v)=d(L|_{E_{x}})_{v}\in E_{x}^{*}} , where x = π ( v ) {\textstyle x=\pi (v)} . Here we use the fact that since E x {\textstyle E_{x}} is a vector space, T v ( E x ) {\textstyle T_{v}(E_{x})} can be identified with E x {\textstyle E_{x}} . In other words, F L ( v ) E x {\textstyle \mathbf {F} L(v)\in E_{x}^{*}} is the covector that sends w E x {\textstyle w\in E_{x}} to the directional derivative d d t | t = 0 L ( v + t w ) R {\textstyle \left.{\frac {d}{dt}}\right|_{t=0}L(v+tw)\in \mathbb {R} } .

To describe the Legendre transformation locally, let U M {\textstyle U\subseteq M} be a coordinate chart over which E {\textstyle E} is trivial. Picking a trivialization of E {\textstyle E} over U {\textstyle U} , we obtain charts E U U × R r {\textstyle E_{U}\cong U\times \mathbb {R} ^{r}} and E U U × R r {\textstyle E_{U}^{*}\cong U\times \mathbb {R} ^{r}} . In terms of these charts, we have F L ( x ; v 1 , , v r ) = ( x ; p 1 , , p r ) {\textstyle \mathbf {F} L(x;v_{1},\dotsc ,v_{r})=(x;p_{1},\dotsc ,p_{r})} , where p i = L v i ( x ; v 1 , , v r ) {\displaystyle p_{i}={\frac {\partial L}{\partial v_{i}}}(x;v_{1},\dotsc ,v_{r})} for all i = 1 , , r {\textstyle i=1,\dots ,r} . If, as in the classical case, the restriction of L : E R {\textstyle L:E\to \mathbb {R} } to each fiber E x {\textstyle E_{x}} is strictly convex and bounded below by a positive definite quadratic form minus a constant, then the Legendre transform F L : E E {\textstyle \mathbf {F} L:E\to E^{*}} is a diffeomorphism. Suppose that F L {\textstyle \mathbf {F} L} is a diffeomorphism and let H : E R {\textstyle H:E^{*}\to \mathbb {R} } be the "Hamiltonian" function defined by H ( p ) = p v L ( v ) , {\displaystyle H(p)=p\cdot v-L(v),} where v = ( F L ) 1 ( p ) {\textstyle v=(\mathbf {F} L)^{-1}(p)} . Using the natural isomorphism E E {\textstyle E\cong E^{**}} , we may view the Legendre transformation of H {\textstyle H} as a map F H : E E {\textstyle \mathbf {F} H:E^{*}\to E} . Then we have ( F L ) 1 = F H . {\displaystyle (\mathbf {F} L)^{-1}=\mathbf {F} H.}

Further properties

Scaling properties

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

f ( x ) = a g ( x ) f ( p ) = a g ( p a ) {\displaystyle f(x)=a\cdot g(x)\Rightarrow f^{\star }(p)=a\cdot g^{\star }\left({\frac {p}{a}}\right)} f ( x ) = g ( a x ) f ( p ) = g ( p a ) . {\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) = x/r, with r > 1, implies f*(p) = p/s.) Thus, the only monomial whose degree is invariant under Legendre transform is the quadratic.

Behavior under translation

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

Behavior under inversion

f ( x ) = g 1 ( x ) f ( p ) = p g ( 1 p ) {\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 : RR be a linear transformation. For any convex function f on R, one has ( A f ) = f A {\displaystyle (Af)^{\star }=f^{\star }A^{\star }} where A* is the adjoint operator of A defined by A x , y = x , A y , {\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 ( A f ) ( y ) = inf { f ( x ) : x X , A x = y } . {\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, f ( A x ) = f ( x ) , x , A G {\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

( f inf g ) ( x ) = inf { f ( x y ) + g ( y ) | y R n } . {\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 R. Then

( f 1 inf inf f m ) = f 1 + + f m . {\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, p , x f ( x ) + f ( p ) . {\displaystyle \left\langle p,x\right\rangle \leq f(x)+f^{\star }(p).}

See also

References

  1. ^ Legendre, Adrien-Marie (1789). Mémoire sur l'intégration de quelques équations aux différences partielles. In Histoire de l'Académie royale des sciences, avec les mémoires de mathématique et de physique (in French). Vol. 1787. Paris: Imprimerie royale. pp. 309–351.
  2. "Legendre Transform | Nick Alger // Maps, art, etc". Archived from the original on 2015-03-12. Retrieved 2011-01-26.
  3. ^ Ana Cannas da Silva. Lectures on Symplectic Geometry, Corrected 2nd printing. Springer-Verlag, 2008. pp. 147-148. ISBN 978-3-540-42195-5.

Further reading

External links

Categories: