In
mathematics, the Legendre transformation (or Legendre transform), named after
Adrien-Marie Legendre
Adrien-Marie Legendre (; ; 18 September 1752 – 9 January 1833) was a French mathematician who made numerous contributions to mathematics. Well-known and important concepts such as the Legendre polynomials and Legendre transformation are nam ...
, is an
involutive transformation on
real-valued
convex functions of one real variable. In physical problems, it is used to convert functions of one quantity (such as velocity, pressure, or temperature) into functions of the
conjugate quantity (momentum, volume, and entropy, respectively). In this way, it is commonly used in
classical mechanics
Classical mechanics is a physical theory describing the motion of macroscopic objects, from projectiles to parts of machinery, and astronomical objects, such as spacecraft, planets, stars, and galaxies. For objects governed by classical ...
to derive the
Hamiltonian formalism out of the
Lagrangian
Lagrangian may refer to:
Mathematics
* Lagrangian function, used to solve constrained minimization problems in optimization theory; see Lagrange multiplier
** Lagrangian relaxation, the method of approximating a difficult constrained problem with ...
formalism (or vice versa) and in
thermodynamics
Thermodynamics is a branch of physics that deals with heat, work, and temperature, and their relation to energy, entropy, and the physical properties of matter and radiation. The behavior of these quantities is governed by the four laws o ...
to derive the
thermodynamic potentials, as well as in the solution of
differential equations
In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, a ...
of several variables.
For sufficiently smooth functions on the real line, the Legendre transform
of a function
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
where
means a function such that
or, equivalently, as
and
in
Lagrange's notation.
The generalization of the Legendre transformation to affine spaces and non-convex functions is known as the
convex conjugate (also called the Legendre–Fenchel transformation), which can be used to construct a function's
convex hull.
Definition
Let
be an
interval, and
a
convex function; then its ''Legendre transform'' is the function
defined by
where
denotes the
supremum
In mathematics, the infimum (abbreviated inf; plural infima) of a subset S of a partially ordered set P is a greatest element in P that is less than or equal to each element of S, if such an element exists. Consequently, the term ''greatest l ...
, and the
domain is
The transform is always well-defined when
is
convex.
The generalization to convex functions
on a convex set
is straightforward:
has domain
and is defined by
where
denotes the
dot product of
and
.
The function
is called the
convex conjugate function of
. For historical reasons (rooted in analytic mechanics), the conjugate variable is often denoted
, instead of
. If the convex function
is defined on the whole line and is everywhere
differentiable, then
can be interpreted as the negative of the
-intercept of the
tangent line
In geometry, the tangent line (or simply tangent) to a plane curve at a given point is the straight line that "just touches" the curve at that point. Leibniz defined it as the line through a pair of infinitely close points on the curve. More ...
to the
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...
of
that has slope
.
The Legendre transformation is an application of the
duality
Duality may refer to:
Mathematics
* Duality (mathematics), a mathematical concept
** Dual (category theory), a formalization of mathematical duality
** Duality (optimization)
** Duality (order theory), a concept regarding binary relations
** Dual ...
relationship between points and lines. The functional relationship specified by
can be represented equally well as a set of
points, or as a set of tangent lines specified by their slope and intercept values.
Understanding the transform in terms of derivatives
For a differentiable convex function
on the real line with an invertible first derivative, the Legendre transform
can be specified, up to an additive constant, by the condition that the functions' first derivatives are inverse functions of each other. Explicitly, for a differentiable convex function
on the real line with a first derivative
with inverse
, the Legendre transform
(with derivative
with inverse
) can be specified, up to an additive constant, by the condition that
and
are inverse functions of each other, i.e.,
and
.
To see this, first note that if
is differentiable and
is a
critical point of the function of
, then the supremum is achieved at
(by convexity).
Therefore,
.
Suppose that
is invertible and let
denote its inverse.
Then for each
, the point
is the unique critical point of
. Indeed,
and so
. Hence we have
for each
.
By differentiating with respect to
we find
Since
this simplifies to
.
In other words,
and
are inverses.
In general, if
is an inverse of
, then
and so integration provides a constant
so that
.
In practical terms, given
, the parametric plot of
versus
amounts to the graph of
versus
.
In some cases (e.g. thermodynamic potentials, below), a non-standard requirement is used, amounting to an alternative definition of with a ''minus sign'',
Properties
*The Legendre transform of a convex function is convex.Let us show this for the case of a doubly differentiable
with a non zero (and hence positive, due to convexity) double derivative and with a bijective derivative. For a fixed
, let
maximize
. Then
, noting that
depends on
. Thus,
The derivative of
is itself differentiable with a positive derivative and hence strictly monotonic and invertible. Thus
where
, meaning that
is defined so that
. Note that
is also differentiable with the
following derivative,
Thus
is the composition of differentiable functions, hence differentiable. Applying the
product rule and the
chain rule
In calculus, the chain rule is a formula that expresses the derivative of the Function composition, composition of two differentiable functions and in terms of the derivatives of and . More precisely, if h=f\circ g is the function such that h(x) ...
yields
giving
so
is convex.
*It follows that the Legendre transformation is an
involution, i.e.,
: By using the above equalities for
,
and its derivative,
Examples
Example 1
The
exponential function
The exponential function is a mathematical function denoted by f(x)=\exp(x) or e^x (where the argument is written as an exponent). Unless otherwise specified, the term generally refers to the positive-valued function of a real variable, ...
has
as a Legendre transform, since their respective first derivatives and are inverse functions of each other.
This example illustrates that the respective
domains of a function and its Legendre transform need not agree.
Example 2
Let defined on , where is a fixed constant.
For fixed, the function of , has the first derivative and second derivative ; there is one stationary point at , which is always a maximum.
Thus, and
The first derivatives of , 2, and of , , are inverse functions to each other. Clearly, furthermore,
namely .
Example 3
Let for .
For fixed, is continuous on
compact, hence it always takes a finite maximum on it; it follows that .
The stationary point at is in the domain if and only if , otherwise the maximum is taken either at , or . It follows that
Example 4
The function is convex, for every (strict convexity is not required for the Legendre transformation to be well defined). Clearly is never bounded from above as a function of , unless . Hence is defined on and .
One may check involutivity: of course is always bounded as a function of , hence . Then, for all one has
and hence .
Example 5: several variables
Let
be defined on , where is a real, positive definite matrix.
Then is convex, and
has gradient and
Hessian , which is negative; hence the stationary point is a maximum.
We have , and
Behavior of differentials under Legendre transforms
The Legendre transform is linked to
integration by parts
In calculus, and more generally in mathematical analysis, integration by parts or partial integration is a process that finds the integral of a product of functions in terms of the integral of the product of their derivative and antiderivative. ...
, .
Let be a function of two independent variables and , with the differential
Assume that it is convex in for all , so that one may perform the Legendre transform in , with the variable conjugate to . Since the new independent variable is , the differentials and devolve to and , i.e., we build another function with its differential expressed in terms of the new basis and .
We thus consider the function so that
The function is the Legendre transform of , where only the independent variable has been supplanted by . This is widely used in thermodynamics, as illustrated below.
Applications
Analytical mechanics
A Legendre transform is used in
classical mechanics
Classical mechanics is a physical theory describing the motion of macroscopic objects, from projectiles to parts of machinery, and astronomical objects, such as spacecraft, planets, stars, and galaxies. For objects governed by classical ...
to derive the
Hamiltonian formulation from the
Lagrangian formulation, and conversely. A typical Lagrangian has the form
where
are coordinates on , is a positive real matrix, and
For every fixed,
is a convex function of
, while
plays the role of a constant.
Hence the Legendre transform of
as a function of
is the Hamiltonian function,
In a more general setting,
are local coordinates on the
tangent bundle
In differential geometry, the tangent bundle of a differentiable manifold M is a manifold TM which assembles all the tangent vectors in M . As a set, it is given by the disjoint unionThe disjoint union ensures that for any two points and ...
of a manifold
. For each ,
is a convex function of the tangent space . The Legendre transform gives the Hamiltonian
as a function of the coordinates of the
cotangent bundle ; the inner product used to define the Legendre transform is inherited from the pertinent canonical
symplectic structure. In this abstract setting, the Legendre transformation corresponds to the
tautological one-form.
Thermodynamics
The strategy behind the use of Legendre transforms in thermodynamics is to shift from a function that depends on a variable to a new (conjugate) function that depends on a new variable, the conjugate of the original one. The new variable is the partial derivative of the original function with respect to the original variable. The new function is the difference between the original function and the product of the old and new variables. Typically, this transformation is useful because it shifts the dependence of, e.g., the energy from an
extensive variable to its conjugate intensive variable, which can usually be controlled more easily in a physical experiment.
For example, the
internal energy is an explicit function of the ''
extensive variables''
entropy
Entropy is a scientific concept, as well as a measurable physical property, that is most commonly associated with a state of disorder, randomness, or uncertainty. The term and the concept are used in diverse fields, from classical thermodyna ...
,
volume
Volume is a measure of occupied three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch). Th ...
, and
chemical composition
which has a total differential
Stipulating some common reference state, by using the (non-standard) Legendre transform of the internal energy, , with respect to volume, , the
enthalpy may be defined by writing
which is now explicitly function of the pressure , since
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, , to the (often more convenient) intensive variable , resulting in the
Helmholtz and
Gibbs
Gibbs or GIBBS is a surname and acronym. It may refer to:
People
* Gibbs (surname)
Places
* Gibbs (crater), on the Moon
* Gibbs, Missouri, US
* Gibbs, Tennessee, US
* Gibbs Island (South Shetland Islands), Antarctica
* 2937 Gibbs, an asteroid
...
free energies. The Helmholtz free energy, , and Gibbs energy, , are obtained by performing Legendre transforms of the internal energy and enthalpy, respectively,
The Helmholtz free energy is often the most useful thermodynamic potential when temperature and volume are controlled from the surroundings, while the Gibbs energy is often the most useful when temperature and pressure are controlled from the surroundings.
An example – variable capacitor
As another example from
physics
Physics is the natural science that studies matter, its fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge which rel ...
, consider a parallel-plate
capacitor
A capacitor is a device that stores electrical energy in an electric field by virtue of accumulating electric charges on two close surfaces insulated from each other. It is a passive electronic component with two terminals.
The effect of a ...
, 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
In physics, a force is an influence that can change the motion of an object. A force can cause an object with mass to change its velocity (e.g. moving from a state of rest), i.e., to accelerate. Force can also be described intuitively as a ...
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
In physics, a force is an influence that can change the motion of an object. A force can cause an object with mass to change its velocity (e.g. moving from a state of rest), i.e., to accelerate. Force can also be described intuitively as a ...
exerted on a
piston
A piston is a component of reciprocating engines, reciprocating pumps, gas compressors, hydraulic cylinders and pneumatic cylinders, among other similar mechanisms. It is the moving component that is contained by a cylinder and is made gas- ...
.
Compute the force on the plates as a function of , the distance which separates them. To find the force, compute the potential energy, and then apply the definition of force as the gradient of the potential energy function.
The energy stored in a capacitor of
capacitance
Capacitance is the capability of a material object or device to store electric charge. It is measured by the change in charge in response to a difference in electric potential, expressed as the ratio of those quantities. Commonly recognized a ...
and charge is
where the dependence on the area of the plates, the dielectric constant of the material between the plates, and the separation are abstracted away as the
capacitance
Capacitance is the capability of a material object or device to store electric charge. It is measured by the change in charge in response to a difference in electric potential, expressed as the ratio of those quantities. Commonly recognized a ...
. (For a parallel plate capacitor, this is proportional to the area of the plates and inversely proportional to the separation.)
The force between the plates due to the electric field is then
If the capacitor is not connected to any circuit, then the ''
charges
Charge or charged may refer to:
Arts, entertainment, and media Films
* '' Charge, Zero Emissions/Maximum Speed'', a 2011 documentary
Music
* ''Charge'' (David Ford album)
* ''Charge'' (Machel Montano album)
* ''Charge!!'', an album by The Aqu ...
'' on the plates remain constant as they move, and the force is the negative
gradient
In vector calculus, the gradient of a scalar-valued differentiable function of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p is the "direction and rate of fastest increase". If the gr ...
of the
electrostatic energy
However, suppose, instead, that the ''
volt
The volt (symbol: V) is the unit of electric potential, electric potential difference ( voltage), and electromotive force in the International System of Units (SI). It is named after the Italian physicist Alessandro Volta (1745–1827).
D ...
age'' between the plates is maintained constant by connection to a
battery, which is a reservoir for charge at constant potential difference; now the ''charge is variable'' instead of the voltage, its Legendre conjugate. To find the force, first compute the non-standard Legendre transform,
The force now becomes the negative gradient of this Legendre transform, still pointing in the same direction,
The two conjugate energies happen to stand opposite to each other, only because of the
linear
Linearity is the property of a mathematical relationship ('' function'') that can be graphically represented as a straight line. Linearity is closely related to '' proportionality''. Examples in physics include rectilinear motion, the linear ...
ity of the
capacitance
Capacitance is the capability of a material object or device to store electric charge. It is measured by the change in charge in response to a difference in electric potential, expressed as the ratio of those quantities. Commonly recognized a ...
—except now is no longer a constant. They reflect the two different pathways of storing energy into the capacitor, resulting in, for instance, the same "pull" between a capacitor's plates.
Probability theory
In
large deviations theory, the ''rate function'' is defined as the Legendre transformation of the logarithm of the
moment generating function of a random variable. An important application of the rate function is in the calculation of tail probabilities of sums of i.i.d. random variables.
Microeconomics
Legendre transformation arises naturally in
microeconomics in the process of finding the ''
supply'' of some product given a fixed price on the market knowing the
cost function , i.e. the cost for the producer to make/mine/etc. 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 . For a company selling this good, the best strategy is to adjust the production so that its profit is maximized. We can maximize the profit
by differentiating with respect to and solving
represents the optimal quantity of goods that the producer is willing to supply, which is indeed the supply itself:
If we consider the maximal profit as a function of price,
, we see that it is the Legendre transform of the cost function
.
Geometric interpretation
For a
strictly convex function, the Legendre transformation can be interpreted as a mapping between the
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...
of the function and the family of
tangent
In geometry, the tangent line (or simply tangent) to a plane curve at a given point is the straight line that "just touches" the curve at that point. Leibniz defined it as the line through a pair of infinitely close points on the curve. Mo ...
s of the graph. (For a function of one variable, the tangents are well-defined at all but at most
countably many
In mathematics, a set is countable if either it is finite or it can be made in one to one correspondence with the set of natural numbers. Equivalently, a set is ''countable'' if there exists an injective function from it into the natural numbe ...
points, since a convex function is
differentiable at all but at most countably many points.)
The equation of a line with
slope
In mathematics, the slope or gradient of a line is a number that describes both the ''direction'' and the ''steepness'' of the line. Slope is often denoted by the letter ''m''; there is no clear answer to the question why the letter ''m'' is used ...
and
-intercept is given by
For this line to be tangent to the graph of a function
at the point
requires
and
Being the derivative of a strictly convex function, the function
is strictly monotone and thus
injective. The second equation can be solved for
allowing elimination of
from the first, and solving for the
-intercept
of the tangent as a function of its slope
where
denotes the Legendre transform of
The
family
Family (from la, familia) is a group of people related either by consanguinity (by recognized birth) or affinity (by marriage or other relationship). The purpose of the family is to maintain the well-being of its members and of society. Idea ...
of tangent lines of the graph of
parameterized by the slope
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
An envelope is a common packaging item, usually made of thin, flat material. It is designed to contain a flat object, such as a letter or card.
Traditional envelopes are made from sheets of paper cut to one of three shapes: a rhombus, a ...
of this family by demanding
Eliminating
from these two equations gives
Identifying
with
and recognizing the right side of the preceding equation as the Legendre transform of
yields
Legendre transformation in more than one dimension
For a differentiable real-valued function on an
open convex subset of the Legendre conjugate of the pair is defined to be the pair , where is the image of under the
gradient
In vector calculus, the gradient of a scalar-valued differentiable function of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p is the "direction and rate of fastest increase". If the gr ...
mapping , and is the function on given by the formula
where
is the
scalar product on . The multidimensional transform can be interpreted as an encoding of the
convex hull of the function's
epigraph in terms of its
supporting hyperplanes.
Alternatively, if is a
vector space
In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called '' vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but ...
and is its
dual vector space
In mathematics, any vector space ''V'' has a corresponding dual vector space (or just dual space for short) consisting of all linear forms on ''V'', together with the vector space structure of pointwise addition and scalar multiplication by con ...
, then for each point of and of , there is a natural identification of the
cotangent spaces with and with . If is a real differentiable function over , then its
exterior derivative, , is a section of the
cotangent bundle and as such, we can construct a map from to . Similarly, if is a real differentiable function over , then defines a map from to . 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 mathematics and mathematical optimization, the convex conjugate of a function is a generalization of the Legendre transformation which applies to non-convex functions. It is also known as Legendre–Fenchel transformation, 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
be a
smooth manifold
In mathematics, a differentiable manifold (also differential manifold) is a type of manifold that is locally similar enough to a vector space to allow one to apply calculus. Any manifold can be described by a collection of charts (atlas). One m ...
, let
and
respectively be a
vector bundle
In mathematics, a vector bundle is a topological construction that makes precise the idea of a family of vector spaces parameterized by another space X (for example X could be a topological space, a manifold, or an algebraic variety): to ev ...
on
and its associated
bundle projection
In mathematics, a vector bundle is a topological construction that makes precise the idea of a family of vector spaces parameterized by another space X (for example X could be a topological space, a manifold, or an algebraic variety): to every po ...
, and let
be a smooth function. We think of
as a
Lagrangian
Lagrangian may refer to:
Mathematics
* Lagrangian function, used to solve constrained minimization problems in optimization theory; see Lagrange multiplier
** Lagrangian relaxation, the method of approximating a difficult constrained problem with ...
by analogy with the classical case where
,
and
for some positive number
and function
.
As usual, we denote by
the
dual
Dual or Duals may refer to:
Paired/two things
* Dual (mathematics), a notion of paired concepts that mirror one another
** Dual (category theory), a formalization of mathematical duality
*** see more cases in :Duality theories
* Dual (grammatical ...
of
, by
the fiber of
over
, and by
the restriction of
to
.
The ''Legendre transformation'' of
is the smooth morphism
defined by
, where
.
In other words,
is the covector that sends
to the directional derivative
.
To describe the Legendre transformation locally, let
be a coordinate chart over which
is trivial. Picking a trivialization of
over
, we obtain charts
and
. In terms of these charts, we have
, where
for all
.
If, as in the classical case, the restriction of
to each fiber
is strictly convex and bounded below by a positive definite quadratic form minus a constant, then the Legendre transform
is a diffeomorphism.
[Ana Cannas da Silva. ''Lectures on Symplectic Geometry'', Corrected 2nd printing. Springer-Verlag, 2008. pp. 147-148. .] Suppose that
is a diffeomorphism and let
be the “
Hamiltonian” function defined by
where
. Using the natural isomorphism
, we may view the Legendre transformation of
as a map
. Then we have
Further properties
Scaling properties
The Legendre transformation has the following scaling properties: For ,
It follows that if a function is
homogeneous of degree then its image under the Legendre transformation is a homogeneous function of degree , where . (Since , with , implies .) 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 be a
linear transformation. For any convex function on , one has
where is the
adjoint operator of defined by
and is the ''push-forward'' of along
A closed convex function is symmetric with respect to a given set of
orthogonal linear transformations,
if and only if
In logic and related fields such as mathematics and philosophy, "if and only if" (shortened as "iff") is a biconditional logical connective between statements, where either both statements are true or both are false.
The connective is bi ...
is symmetric with respect to .
Infimal convolution
The infimal convolution of two functions and is defined as
Let be proper convex functions on . Then
Fenchel's inequality
For any function and its convex conjugate ''Fenchel's inequality'' (also known as the ''Fenchel–Young inequality'') holds for every and , i.e., ''independent'' pairs,
See also
*
Dual curve
*
Projective duality
*
Young's inequality for products In mathematics, Young's inequality for products is a mathematical inequality about the product of two numbers. The inequality is named after William Henry Young and should not be confused with Young's convolution inequality.
Young's inequality f ...
*
Convex conjugate
*
Moreau's theorem
*
Integration by parts
In calculus, and more generally in mathematical analysis, integration by parts or partial integration is a process that finds the integral of a product of functions in terms of the integral of the product of their derivative and antiderivative. ...
*
Fenchel's duality theorem
References
*
*
* Fenchel, W. (1949). "On conjugate convex functions", ''Can. J. Math'' 1: 73-77.
*
*
Further reading
*
*
*
External links
{{Commons category, Legendre transformation
Legendre transform with figuresat maze5.net
Legendre and Legendre-Fenchel transforms in a step-by-step explanationat onmyphd.com
Transforms
Duality theories
Concepts in physics
Convex analysis
Mathematical physics