Legendre transformation

Short description: Mathematical transformation

The function f(x) is defined on the interval [a,b]. For a given p, the difference px−f(x) takes the maximum at x′. Thus, the Legendre transformation of f(x) is 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,[1] 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* of a function 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 Df(⋅)=(Df*)−1(⋅), where D is an operator of differentiation, ⋅ represents an argument or input to the associated function, (ϕ)−1(⋅) is an inverse function such that (ϕ)−1(ϕ(x))=x, or equivalently, as f′(f*′(x*))=x* and f*′(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.

## Contents

* 1 Definition
* 1.1 Definition in one-dimensional real space
* 1.2 Definition in n-dimensional real space
* 1.3 Understanding the Legendre transform in terms of derivatives
* 1.4 Definition in physical contexts
* 2 Properties
* 3 Identities
* 4 Examples
* 4.1 Example 1
* 4.2 Example 2
* 4.3 Example 3
* 4.4 Example 4
* 4.5 Example 5
* 4.6 Example 6: several variables
* 5 Behavior of differentials under Legendre transforms
* 6 Applications
* 6.1 Analytical mechanics
* 6.2 Thermodynamics
* 6.3 Variable capacitor
* 6.4 Probability theory
* 6.5 Microeconomics
* 7 Geometric interpretation
* 8 Legendre transformation in more than one dimension
* 9 Legendre transformation on manifolds
* 10 Further properties
* 10.1 Scaling properties
* 10.2 Behavior under translation
* 10.3 Behavior under inversion
* 10.4 Behavior under linear transformations
* 10.5 Infimal convolution
* 10.6 Fenchel's inequality
* 11 See also
* 12 References
* 13 Further reading
* 14 External links

## Definition

### Definition in one-dimensional real space

Let I⊂ℝ be an interval, and f:I->ℝ a convex function; then the Legendre transform of f is the function f*:I*->ℝ defined by f*(x*)=supx∈I(x*x−f(x)), I*={x*∈ℝ:supx∈I(x*x−f(x))<∞} where sup denotes the supremum over I, e.g., x in I is chosen such that x*x−f(x) is maximized at each x*, or x* is such that x*x−f(x) has a bounded value throughout I (e.g., when f(x) is a linear function).

The function f* is called the convex conjugate function of f. For historical reasons (rooted in analytic mechanics), the conjugate variable is often denoted p, instead of x*. If the convex function f is defined on the whole line and is everywhere differentiable, then f*(p)=supx∈I(px−f(x))=(px−f(x))|x=(f′)−1(p) can be interpreted as the negative of the y-intercept of the tangent line to the graph of f that has slope p.

### Definition in n-dimensional real space

The generalization to convex functions f:X->ℝ on a convex set X⊂ℝn is straightforward: f*:X*->ℝ has domain X*={x*∈ℝn:supx∈X(⟨x*,x⟩−f(x))<∞} and is defined by f*(x*)=supx∈X(⟨x*,x⟩−f(x)),x*∈X*, where ⟨x*,x⟩ denotes the dot product of x* and x.

The Legendre transformation is an application of the duality relationship between points and lines. The functional relationship specified by f can be represented equally well as a set of (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 on the real line with the first derivative f′ and its inverse (f′)−1, the Legendre transform of f, 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 and (f*)′=(f′)−1.

To see this, first note that if f as a convex function on the real line is differentiable and x‾ is a critical point of the function of x↦p⋅x−f(x), then the supremum is achieved at x‾ (by convexity, see the first figure in this Wikipedia page). Therefore, the Legendre transform of f is f*(p)=p⋅x‾−f(x‾).

Then, suppose that the first derivative f′ is invertible and let the inverse be g=(f′)−1. Then for each p, the point g(p) is the unique critical point x‾ of the function x↦px−f(x) (i.e., x‾=g(p)) because f′(g(p))=p and the function's first derivative with respect to x at g(p) is p−f′(g(p))=0. Hence we have f*(p)=p⋅g(p)−f(g(p)) for each p. By differentiating with respect to p, we find (f*)′(p)=g(p)+p⋅g′(p)−f′(g(p))⋅g′(p). Since f′(g(p))=p this simplifies to (f*)′(p)=g(p)=(f′)−1(p). In other words, (f*)′ and f′ are inverses to each other.

In general, if h′=(f′)−1 as the inverse of f′, then h′=(f*)′ so integration gives f*=h+c, where c is a constant.

In practical terms, given f(x), the parametric plot of xf′(x)−f(x) versus f′(x) amounts to the graph of f*(p) versus 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)=xp.

### Definition in physical contexts

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

df=dfdxdx.

Performing the Legendre transformation on this function means that we take p=dfdx as the independent variable, so that the above expression can be written as

df=pdx,

and according to the product rule d(uv)=udv+vdu, we then have

d(xp−f)=xdp+pdx−df=xdp,

and taking f*=xp−f, we have df*=xdp, which means

df*dp=x.

When f is a function of n variables x1,x2,⋯,xn, then we can perform the Legendre transformation on each one or several variables: we have

df=p1dx1+p2dx2+⋯+pndxn,

where pi=∂f∂xi. Then if we want to perform the Legendre transformation on, e.g. x1, then we take p1 together with x2,⋯,xn as independent variables, and with Leibniz's rule we have

d(f−x1p1)=−x1dp1+p2dx2+⋯+pndxn.

So for the function φ(p1,x2,⋯,xn)=f(x1,x2,⋯,xn)−x1p1, we have

∂φ∂p1=−x1,∂φ∂x2=p2,⋯,∂φ∂xn=pn.

We can also do this transformation for variables x2,⋯,xn. If we do it to all the variables, then we have

dφ=−x1dp1−x2dp2−⋯−xndpn where φ=f−x1p1−x2p2−⋯−xnpn.

In analytical mechanics, people perform this transformation on variables q˙1,q˙2,⋯,q˙n of the Lagrangian L(q1,⋯,qn,q˙1,⋯,q˙n) to get the Hamiltonian:

H(q1,⋯,qn,p1,⋯,pn)=∑i=1npiq˙i−L(q1,⋯,qn,q˙1⋯,q˙n).

In thermodynamics, this transformation is applied to variables according to the type of thermodynamic system desired; for example, starting from the energy representation cardinal function of state, the internal energy U(S,V), we have

dU=TdS−pdV,

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

dH=d(U+pV) = TdS+Vdp

dF=d(U−TS) =−SdT−pdV

dG=d(U−TS+pV)=−SdT+Vdp,

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,[1] and is still applied by physicists nowadays. Indeed, this definition is mathematically rigorous if we treat all the variables and functions defined above (for example, f,x1,⋯,xn,p1,⋯,pn,) as differentiable functions defined on an open set of ℝn or on a differentiable manifold, and df,dxi,dpi their differentials (which are treated as cotangent vectors in the context of differentiable manifolds). This definition is equivalent to the modern mathematicians' definition as long as f is differentiable and convex for the variables x1,x2,⋯,xn.

## 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) with all positive double derivative values and with a bijective (invertible) derivative.

For a fixed p, let x¯ maximize or make the function px−f(x) bounded over x. Then the Legendre transformation of f is f*(p)=px¯−f(x¯), thus,f′(x¯)=pby the maximizing or bounding condition ddx(px−f(x))=p−f′(x)=0. Note that x¯ depends on p. (This can be visually shown in the 1st figure of this page above.)

Thus x¯=g(p) where g≡(f′)−1, meaning that g is the inverse of f′ that is the derivative of f (so f′(g(p))=p).

Note that g is also differentiable with the following derivative (Inverse function rule),dg(p)dp=1f″(g(p)).Thus, the Legendre transformation 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) yieldsd(f*)dp=g(p)+(p−f′(g(p)))⋅dg(p)dp=g(p),giving d2(f*)dp2=dg(p)dp=1f″(g(p))>0,so f* is convex with its double derivatives are all positive.
* The Legendre transformation is an involution, i.e., f**=f.

Proof. By using the above identities as f′(x¯)=p, x¯=g(p), f*(p)=px¯−f(x¯) and its derivative (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).Note that this derivation does not require the condition to have all positive values in double derivative of the original function f.

## Identities

As shown above, for a convex function f(x), with x=x¯ maximizing or making px−f(x) bounded at each p to define the Legendre transform f*(p)=px¯−f(x¯) and with g≡(f′)−1, the following identities hold.

* f′(x¯)=p,
* x¯=g(p),
* (f*)′(p)=g(p).

## Examples

### Example 1

f(x)=ex over the domain I=ℝ is plotted in red and its Legendre transform f*(x*)=x*(ln⁡(x*)−1) over the domain I*=(0,∞) in dashed blue. Note that the Legendre transform appears convex.

Consider the exponential function f(x)=ex, which has the domain I=ℝ. From the definition, the Legendre transform is f*(x*)=supx∈ℝ(x*x−ex),x*∈I* where I* remains to be determined. To evaluate the supremum, compute the derivative of x*x−ex with respect to x and set equal to zero: ddx(x*x−ex)=x*−ex=0. The second derivative −ex is negative everywhere, so the maximal value is achieved at x=ln⁡(x*). Thus, the Legendre transform is f*(x*)=x*ln⁡(x*)−eln⁡(x*)=x*(ln⁡(x*)−1) and has domain I*=(0,∞). 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, f**(x)=supx*∈ℝ(xx*−x*(ln⁡(x*)−1)),x∈I, where a variable x is intentionally used as the argument of the function f** to show the involution property of the Legendre transform as f**=f. we compute 0=ddx*(xx*−x*(ln⁡(x*)−1))=x−ln⁡(x*) thus the maximum occurs at x*=ex because the second derivative d2dx*2f**(x)=−1x*<0 over the domain of f** as I*=(0,∞). As a result, f** is found as f**(x)=xex−ex(ln⁡(ex)−1)=ex, thereby confirming that f=f**, as expected.

### Example 2

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

For x* fixed, the function of x, x*x − f(x) = x*x − cx2 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*24c.

The first derivatives of f, 2cx, and of f *, x*/(2c), are inverse functions to each other. Clearly, furthermore, f**(x)=14(1/4c)x2=cx2, namely f ** = f.

### Example 3

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

For x* fixed, x*x − f(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 is I* = R.

The stationary point at x = x*/2 (found by setting that the first derivative of x*x − f(x) with respect to x equal to zero) 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 because the second derivative of x*x − f(x) with respect to x is negative as −2; for a part of the domain x*<4 the maximum that x*x − f(x) can take with respect to x∈[2,3] is obtained at x=2 while for x*>6 it becomes the maximum at x=3. Thus, it follows that f*(x*)={2x*−4,x*<4x*24,4≤x*≤6,3x*−9,x*>6.

### 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*x − f(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*x − f*(x*) is always bounded as a function of x*∈{c}, hence I** = R. Then, for all x one has supx*∈{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|. This givesf*(x*)=supx(xx*−|x|)=max⁡(supx≥0x(x*−1),supx≤0x(x*+1)),and thus f*(x*)=0 on its domain I*=[−1,1].

### Example 6: several variables

Let f(x)=⟨x,Ax⟩+c be defined on X = Rn, where A is a real, positive definite matrix.

Then f is convex, and ⟨p,x⟩−f(x)=⟨p,x⟩−⟨x,Ax⟩−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 f*(p)=14⟨p,A−1p⟩−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 df=∂f∂xdx+∂f∂ydy=pdx+vdy.

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 where x¯ is a point in x maximizing or making 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) = f − px so that dg=df−pdx−xdp=−xdp+vdy x=−∂g∂p v=∂g∂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)=12⟨v,Mv⟩−V(q), where (v,q) are coordinates on Rn × Rn, M is a positive definite real matrix, and ⟨x,y⟩=∑jxjyj.

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

Hence the Legendre transform of L(v,q) as a function of v is the Hamiltonian function, H(p,q)=12⟨p,M−1p⟩+V(q).

In a more general setting, (v,q) are local coordinates on the tangent bundle Tℳ of a manifold ℳ. For each q, L(v,q) is a convex function of the tangent space Vq. The Legendre transform gives the Hamiltonian H(p,q) as a function of the coordinates (p, q) of the cotangent bundle T*ℳ; 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

See also: Conjugate variables (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,…) U=U(S,V,{Ni}), which has a total differential dU=TdS−PdV+∑μidNi

where T=∂U∂S|V,Ni for all i values,P=−∂U∂V|S,Ni for all i values,μi=∂U∂Ni|S,V,Nj for all j≠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* of the internal energy U with respect to volume V, the function u(p,S,V,{Ni})=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 needs to be satisfied, so U*=∂U∂VV−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∂VV=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,{Ni}), so its differential is an exact differential. Because of dH=TdS+VdP+∑μidNi and the fact that it must be an exact differential, H=H(S,P,{Ni}).

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 free energy G, are obtained by performing Legendre transforms of the internal energy and enthalpy, respectively: A=U−TS,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 free 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=QV),

U(Q,𝐱)=12QV(Q,𝐱)=12Q2C(𝐱),

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 𝐅(𝐱)=−dUd𝐱.

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 𝐅(𝐱)=12dC(𝐱)d𝐱Q2C(𝐱)2=12dC(𝐱)d𝐱V(𝐱)2

where V(Q,𝐱)=V(𝐱) 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 is a variable instead of the voltage; Q and V are the Legendre conjugate to each other. To find the force, first compute the non-standard Legendre transform U* with respect to Q (also with using C=QV),

U*=U−∂U∂Q|𝐱⋅Q=U−12C(𝐱)∂Q2∂Q|𝐱⋅Q=U−QV=12QV−QV=−12QV=−12V2C(𝐱).

This transformation is possible because U is now a linear function of 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, 𝐅(𝐱)=−dU*d𝐱=12dC(𝐱)d𝐱V2.

The two conjugate energies U and 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 Xn are i.i.d. random variables, let Sn=X1+⋯+Xn be the associated random walk and M(ξ) the moment generating function of X1. For ξ∈ℝ, E[eξSn]=M(ξ)n. Hence, by Markov's inequality, one has for ξ≥0 and a∈ℝ P(Sn/n>a)≤e−nξaM(ξ)n=exp⁡[−n(ξa−Λ(ξ))] where Λ(ξ)=log⁡M(ξ). Since the left-hand side is independent of ξ, we may take the infimum of the right-hand side, which leads one to consider the supremum of ξa−Λ(ξ), i.e., the Legendre transform of Λ, evaluated at 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=PQ−C(Q) by differentiating with respect to Q and solving P−C′(Qopt)=0.

Qopt represents the optimal quantity Q of goods that the producer is willing to supply, which is indeed the supply itself: S(P)=Qopt(P)=(C′)−1(P).

If we consider the maximal profit as a function of price, profitmax(P), we see that it is the Legendre transform of the cost function 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 and y-intercept b is given by y=px+b. For this line to be tangent to the graph of a function f at the point (x0,f(x0)) requires f(x0)=px0+b and p=f′(x0).

Being the derivative of a strictly convex function, the function f′ is strictly monotone and thus injective. The second equation can be solved for x0=f′−1(p), allowing elimination of x0 from the first, and solving for the y-intercept b of the tangent as a function of its slope p, b=f(x0)−px0=f(f′−1(p))−p⋅f′−1(p)=−f⋆(p) where f⋆ denotes the Legendre transform of f.

The family of tangent lines of the graph of f parameterized by the slope p is therefore given by y=px−f⋆(p), or, written implicitly, by the solutions of the equation F(x,y,p)=y+f⋆(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.

Eliminating p from these two equations gives y=x⋅f⋆′−1(x)−f⋆(f⋆′−1(x)).

Identifying y with f(x) and recognizing the right side of the preceding equation as the Legendre transform of f⋆, yield f(x)=f⋆⋆(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 g(y)=⟨y,x⟩−f(x),x=(Df)−1(y) where ⟨u,v⟩=∑k=1nuk⋅vk

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.[2] This can be seen as consequence of the following two observations. On the one hand, the hyperplane tangent to the epigraph of f at some point (𝐱,f(𝐱))∈U×ℝ has normal vector (∇f(𝐱),−1)∈ℝn+1. On the other hand, any closed convex set C∈ℝm can be characterized via the set of its supporting hyperplanes by the equations 𝐱⋅𝐧=hC(𝐧), where hC(𝐧) is the support function of C. But the definition of Legendre transform via the maximization matches precisely that of the support function, that is, f*(𝐱)=hepi⁡(f)(𝐱,−1). We thus conclude that the Legendre transform characterizes the epigraph in the sense that the tangent plane to the epigraph at any point (𝐱,f(𝐱)) is given explicitly by{𝐳∈ℝn+1:𝐳⋅𝐱=f*(𝐱)}.

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 be a smooth manifold, let E and π:E->M be a vector bundle on M and its associated bundle projection, respectively. Let L:E->ℝ be a smooth function. We think of L as a Lagrangian by analogy with the classical case where M=ℝ, E=TM=ℝ×ℝ and L(x,v)=12mv2−V(x) for some positive number m∈ℝ and function V:M->ℝ.

As usual, the dual of E is denoted by E*. The fiber of π over x∈M is denoted Ex, and the restriction of L to Ex is denoted by L|Ex:Ex->ℝ. The Legendre transformation of L is the smooth morphism𝐅L:E->E* defined by 𝐅L(v)=d(L|Ex)v∈Ex*, where x=π(v). Here we use the fact that since Ex is a vector space, Tv(Ex) can be identified with Ex. In other words, 𝐅L(v)∈Ex* is the covector that sends w∈Ex to the directional derivative ddt|t=0L(v+tw)∈ℝ.

To describe the Legendre transformation locally, let U⊆M be a coordinate chart over which E is trivial. Picking a trivialization of E over U, we obtain charts EU≅U×ℝr and EU*≅U×ℝr. In terms of these charts, we have 𝐅L(x;v1,…,vr)=(x;p1,…,pr), where pi=∂L∂vi(x;v1,…,vr) for all i=1,…,r. If, as in the classical case, the restriction of L:E->ℝ to each fiber Ex is strictly convex and bounded below by a positive definite quadratic form minus a constant, then the Legendre transform 𝐅L:E->E* is a diffeomorphism.[3] Suppose that 𝐅L is a diffeomorphism and let H:E*->ℝ be the "Hamiltonian" function defined by H(p)=p⋅v−L(v), where v=(𝐅L)−1(p). Using the natural isomorphism E≅E**, we may view the Legendre transformation of H as a map 𝐅H:E*->E. Then we have[3] (𝐅L)−1=𝐅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⋆(pa) f(x)=g(a⋅x)⇒f⋆(p)=g⋆(pa).

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

f(x)=g(x)+b⇒f⋆(p)=g⋆(p)−b f(x)=g(x+y)⇒f⋆(p)=g⋆(p)−p⋅y

### Behavior under inversion

f(x)=g−1(x)⇒f⋆(p)=−p⋅g⋆(1p)

### Behavior under linear transformations

Let A : Rn → Rm be a linear transformation. For any convex function f on Rn, one has (Af)⋆=f⋆A⋆ where A* is the adjoint operator of A defined by ⟨Ax,y⋆⟩=⟨x,A⋆y⋆⟩, and Af is the push-forward of f along A (Af)(y)=inf⁡{f(x):x∈X,Ax=y}.

A closed convex function f is symmetric with respect to a given set G of orthogonal linear transformations, f(Ax)=f(x),∀x,∀A∈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⋆infg)(x)=inf⁡{f(x−y)+g(y)|y∈𝐑n}.

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

(f1⋆inf⋯⋆inffm)⋆=f1⋆+⋯+fm⋆.

### 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 x ∈ X and p ∈ X*, i.e., independent x, p pairs, ⟨p,x⟩≤f(x)+f⋆(p).

## See also

* Dual curve
* Projective duality
* Young's inequality for products
* Convex conjugate
* Moreau's theorem
* Integration by parts
* Fenchel's duality theorem

## References

1. ↑ 1.0 1.1 Legendre, Adrien-Marie (1789) (in French). 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. 1787. Paris: Imprimerie royale. pp. 309–351. https://www.biodiversitylibrary.org/page/28011033.
2. ↑ "Legendre Transform | Nick Alger // Maps, art, etc". http://maze5.net/?page_id=733.
3. ↑ 3.0 3.1 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. 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. https://archive.org/details/mathematicalmeth0000arno.
* Fenchel, W. (1949). "On conjugate convex functions", Can. J. Math 1: 73-77.
* Rockafellar, R. Tyrrell (1996). 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. doi:10.1119/1.3119512. Bibcode: 2009AmJPh..77..614Z.

## Further reading

* Nielsen, Frank (2010-09-01). "Legendre transformation and information geometry". https://www.lix.polytechnique.fr/~nielsen/Note-LegendreTransformation.pdf.
* Touchette, Hugo (2005-07-27). "Legendre-Fenchel transforms in a nutshell". http://appliedmaths.sun.ac.za/~htouchette/archive/notes/lfth2.pdf.
* Touchette, Hugo (2006-11-21). "Elements of convex analysis". http://www.physics.sun.ac.za/~htouchette/archive/pnotes/convex1.pdf.

## External links

* Legendre transform with figures at maze5.net
* Legendre and Legendre-Fenchel transforms in a step-by-step explanation at onmyphd.com

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Legendre transformation. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Legendre_transformation&oldid=4225986"