You are on page 1of 9

Legendre transformation

1
Legendre transformation
Diagram illustrating the Legendre transformation of the function
, shown in red. is the value of the Legendre transform ,
where , and is found by the intersection of the tangent line
at point (shown in blue) with the vertical axis at
. Note that for any other point on the red curve, a line
drawn through that point with the same slope as the blue line will have
a y-intercept above the point , showing that is indeed a
maximum. Alternatively, is the vertical distance at between the
red line and the blue line shifted up to pass through the origin, i.e. the
maximum value of .
In mathematics, the Legendre transformation or
Legendre transform, named after Adrien-Marie
Legendre, is an operation that transforms one
real-valued function of a real variable into another.
Specifically, the Legendre transform of a convex
function is the function

defined by
where "sup" represents the supremum. If is
differentiable, then

(p) can be interpreted as the


negative of the y-intercept of the tangent line to the
graph of that has slope p. In particular, the value of x
that attains the maximum has the property that
That is, the derivative of the function becomes the
argument to the function

. In particular, if is
convex (or concave up), then

satisfies the
functional equation
The Legendre transform is its own inverse. Like the
familiar Fourier transform, the Legendre transform
takes a function (x) and produces a function of a
different variable p. However, while the Fourier
transform consists of an integration with a kernel, the
Legendre transform uses maximization as the
transformation procedure. The transform is especially
well behaved if (x) is a convex function.
The Legendre transformation is an application of the duality relationship between points and lines. The functional
relationship specified by f(x) 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.
The Legendre transformation can be generalized to the Legendre-Fenchel transformation. It is commonly used in
thermodynamics and in the Hamiltonian formulation of classical mechanics.
Definitions
The definition of the Legendre transform can be made more explicit. To extremise with respect to ,
we set its derivative equal to zero:
Thus, the expression is extremised when
When is convex, this is a maximum because the second derivative is negative:
Legendre transformation
2
Next we invert (2) to obtain as a function of and plug this into (1), which gives the more useful form,
This definition gives the conventional procedure for calculating the Legendre transform of : find ,
solve for in terms of and substitute into the expression . This definition makes clear the following
interpretation: the Legendre transform produces a new function, in which the independent variable is replaced by
, which is the derivative of the original function with respect to .
Another definition
There is a third definition of the Legendre transform: and are said to be Legendre transforms of each other if
their first derivatives are inverse functions of each other:
We can see this first by taking derivative of :
Then this equation taken together with the previous equation resulting from the maximization condition results in the
following pair of reciprocal equations:
From these we see that and are inverses, as promised. They are unique up to an additive constant which
is fixed by the additional requirement that
Although in some cases (e.g. thermodynamic potentials) a non-standard requirement is used:
The standard constraint will be considered in this article unless otherwise noted. The Legendre transformation is its
own inverse, and is related to integration by parts.
Functions of multiple variables
Let be a function of two independent variables and with the differential
. If we want to change the differentials and to and (i.e.
we want to build another function with its differential expressed in terms of and ), we simply consider the
function and calculate:
Legendre transformation
3
The function is the result of Legendre transformation of in which only the independent variable
has been replaced by .
Applications
Thermodynamics
The strategy behind the use of Legendre transforms is to shift, from a function with one of its parameters an
independent variable, to a new function with its dependence on a new variable (the partial derivative of the original
function with respect to the independent variable). The new function is the difference between the original function
and the product of the old and new variables. For example, while the internal energy is an explicit function of the
extensive variables entropy, volume (and chemical composition)
with the differential
the Helmholtz free energy is obtained in the following way using the Legendre transform:
It is seen that the independent variable (entropy) has been replaced with its thermodynamic conjugate
(temperature).
Also, the enthalpy, the (non standard) Legendre transform of U with respect toPV
becomes a function of the entropy and the intensive quantity, pressure, as natural variables, and is useful when the
(external) P is constant. The free energies (Helmholtz and Gibbs), are obtained through further Legendre transforms,
by subtracting TS (from U and H respectively), shift dependence from the entropy S to its conjugate intensive
variable temperature T, and are useful when it is constant.
Hamilton-Lagrange mechanics
A Legendre transform is used in classical mechanics to derive the Hamiltonian formulation from the Lagrangian one,
and conversely. While the Lagrangian is an explicit function of the positional coordinates q
j
and generalized
velocities dq
j
/dt (and time), the Hamiltonian shifts the functional dependence to the positions and momenta, defined
as . Whenever (in that case the Lagrangian is said to be regular) one can express the
as functions and define
Each of the two formulations has its own applicability, both in the theoretical foundations of the subject, and in
practice, depending on the ease of calculation for a particular problem. The coordinates are not necessarily Cartesian,
but can also be angles, etc. An optimum choice takes advantage of the actual physical symmetries.
Legendre transformation
4
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 us to transfer the electric energy which is stored in the capacitor into external
mechanical work done by the forces acting on the plates. You can think of the electric charge as analogous to the
"charge" of a gas in a cylinder, and the resulting mechanical force being exerted on a piston.
Suppose we wanted to compute the force on the plates as a function of x, the distance which separates them. To find
the force we will compute the potential energy and then use 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
where we have abstracted away the dependence on the area of the plates, the dielectric constant of the material
between the plates, and the separation x as the capacitance C(x).
The force F between the plates due to the electric field is
If the capacitor is not connected to any circuit, then the charges on the plates remain constant as they move, the force
is the negative gradient of the electrostatic energy
However, suppose the voltage between the plates V is maintained constant by connection to a battery, which is a
reservoir for charge at constant potential difference. To find the force we first compute the non-standard Legendre
transform
The force now becomes the negative gradient of the Legendre transform
The two functions happen to be negatives only because of the linearity of the capacitance except now Q is no longer
a constant.
Legendre transformation
5
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.
Examples
e
x
is plotted in red and its Legendre transform in
dashed blue.
The exponential function e
x
has xlnxx as a Legendre
transform since their respective first derivatives e
x
and lnx are
inverse to each other. This example shows that the respective
domains of a function and its Legendre transform need not agree.
As another easy example, for the Legendre
transform is
Similarly, the quadratic form
with A a symmetric invertible n-by-n-matrix has
as a Legendre transform.
Legendre transformation in one dimension
In one dimension, a Legendre transform to a function with an invertible first derivative may be found
using the formula
This can be seen by integrating both sides of the defining condition restricted to one-dimension
from to , making use of the fundamental theorem of calculus on the left hand side and substituting
on the right hand side to find
with . Using integration by parts the last integral simplifies to
Therefore,
Since the left hand side of this equation does only depend on and the right hand side only on , they have to
evaluate to the same constant.
Solving for and choosing to be zero results in the above-mentioned formula.
Legendre transformation
6
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 m and y-intercept b is given by
For this line to be tangent to the graph of a function f at the point (x
0
, f(x
0
)) requires
and
f' is strictly monotone as the derivative of a strictly convex function, and the second equation can be solved for x
0
,
allowing to eliminate x
0
from the first giving the y-intercept b of the tangent as a function of its slope m:
Here f* denotes the Legendre transform of f.
The family of tangents of the graph of f parameterized by m is therefore given by
or, written implicitly, by the solutions of the equation
The graph of the original function can be reconstructed from this family of lines as the envelope of this family by
demanding
Eliminating m from these two equations gives
Identifying y with f(x) and recognizing the right side of the preceding equation as the Legendre transform of f* we
find
Legendre transformation in more than one dimension
For a differentiable real-valued function on an open subset U of R
n
the Legendre conjugate of the pair (U, f) is
defined to be the pair (V, g), where V is the image of U under the gradient mapping Df, and g is the function on V
given by the formula
where
is the scalar product on R
n
. 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 real vector space and Y is its dual vector space, then for each point x of X and y of Y, there is a
natural identification of the cotangent spaces T*X
x
with Y and T*Y
y
with X. If f is a real differentiable function over
X, then f is a section of the cotangent bundle T*X and as such, we can construct a map from X to Y. Similarly, if g
Legendre transformation
7
is a real differentiable function over Y, g defines a map from Y to X. If both maps happen to be inverses of each
other, we say we have a Legendre transform.
Further properties
In the following the Legendre transform of a function f is denoted as f*.
Scaling properties
The Legendre transformation has the following scaling properties: For a>0,
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. Thus, the only monomial whose degree is invariant under
Legendre transform is the quadratic.
Behavior under translation
Behavior under inversion
Behavior under linear transformations
Let A be a linear transformation from R
n
to R
m
. For any convex function f on R
n
, one has
where A* is the adjoint operator of A defined by
A closed convex function f is symmetric with respect to a given set G of orthogonal linear transformations,
if and only if f* is symmetric with respect to G.
Infimal convolution
The infimal convolution of two functions f and g is defined as
Let f
1
, , f
m
be proper convex functions on R
n
. Then
References
Arnol'd, Vladimir Igorevich (1989). Mathematical Methods of Classical Mechanics (second edition). Springer.
ISBN0-387-96890-3.
Legendre transformation
8
Rockafellar, R. Tyrrell (1996). Convex Analysis (paperback republication of 1970 ed.). Princeton University
Press. ISBN0-691-01586-4.
Zia, R. K. P. et al. (2009). Making Sense of the Legendre Transform. arXiv:0806.1147.
External links
Touchette, Hugo (2005-07-27). "Legendre-Fenchel transforms in a nutshell"
[2]
(PDF). Retrieved 2007-07-24.
Touchette, Hugo (2006-11-21). "Elements of convex analysis"
[3]
(PDF). Retrieved 2008-03-26.
"Legendre transform with figures"
[1]
. Retrieved 2012-09-26.
References
[1] http:/ / maze5. net/ ?page_id=733
[2] http:/ / www. maths. qmw.ac. uk/ ~ht/ archive/ lfth2. pdf
[3] http:/ / www. maths. qmul. ac. uk/ ~ht/ archive/ convex1.pdf
Article Sources and Contributors
9
Article Sources and Contributors
Legendre transformation Source: http://en.wikipedia.org/w/index.php?oldid=515601356 Contributors: A. Pichler, AmitAronovitch, Amitushtush, Blotwell, Charles Matthews, Chuunen Baka,
Complexica, Count Truthstein, Cuzkatzimhut, Cyberjoac, Darklilac, David Shear, Drorata, Dylan Thurston, Freiddie, Georgelulu, Giftlite, GuidoGer, Headbomb, Ingle.atul, Iyerkri, JabberWok,
Jenks24, Jim.belk, John of Reading, JordiGH, Kiefer.Wolfowitz, Larsobrien, Lauro Chieza de Carvalho, Linas, LokiClock, LorCC, Manoguru, MarkHudson, MathMartin, Michael Hardy, Nbarth,
Netrapt, NuclearPhysicist87, Octahedron80, Oleg Alexandrov, PAR, Paolo.dL, Paul White, Peterlin, Phys, Quantling, Quietbritishjim, Reddevyl, Ricky81682, Rjwilmsi, Sagi Harel, Sunny house,
That Guy, From That Show!, Thielum, Thurth, Tobias Bergemann, TobinFricke, TomyDuby, Tourigny, Tovrstra, Unara, Xxanthippe, YouRang?, , 73 anonymous edits
Image Sources, Licenses and Contributors
Image:LegendreTransform1.png Source: http://en.wikipedia.org/w/index.php?title=File:LegendreTransform1.png License: Public Domain Contributors: User:PAR
Image:LegendreExample.svg Source: http://en.wikipedia.org/w/index.php?title=File:LegendreExample.svg License: Creative Commons Attribution-Sharealike 3.0 Contributors: Drorata
License
Creative Commons Attribution-Share Alike 3.0 Unported
//creativecommons.org/licenses/by-sa/3.0/

You might also like