In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the Legendre transformation (or Legendre transform), first introduced by
Adrien-Marie Legendre
Adrien-Marie Legendre (; ; 18 September 1752 – 9 January 1833) was a French people, French mathematician who made numerous contributions to mathematics. Well-known and important concepts such as the Legendre polynomials and Legendre transforma ...
in 1787 when studying the minimal surface problem,
is an
involutive transformation on
real-valued functions that are
convex
Convex or convexity may refer to:
Science and technology
* Convex lens, in optics
Mathematics
* Convex set, containing the whole line segment that joins points
** Convex polygon, a polygon which encloses a convex set of points
** Convex polytop ...
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
Classical mechanics is a Theoretical physics, physical theory describing the motion of objects such as projectiles, parts of Machine (mechanical), machinery, spacecraft, planets, stars, and galaxies. The development of classical mechanics inv ...
to derive the
Hamiltonian
Hamiltonian may refer to:
* Hamiltonian mechanics, a function that represents the total energy of a system
* Hamiltonian (quantum mechanics), an operator corresponding to the total energy of that system
** Dyall Hamiltonian, a modified Hamiltonian ...
formalism out of the
Lagrangian formalism (or vice versa) and in
thermodynamics
Thermodynamics is a branch of physics that deals with heat, Work (thermodynamics), work, and temperature, and their relation to energy, entropy, and the physical properties of matter and radiation. The behavior of these quantities is governed b ...
to derive the
thermodynamic potentials
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 of ther ...
, as well as in the solution of
differential equations 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
is an operator of differentiation,
represents an argument or input to the associated function,
is an inverse 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
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 transformati ...
(also called the Legendre–Fenchel transformation), which can be used to construct a function's
convex hull
In geometry, the convex hull, convex envelope or convex closure of a shape is the smallest convex set that contains it. The convex hull may be defined either as the intersection of all convex sets containing a given subset of a Euclidean space, ...
.
Definition
Definition in one-dimensional real space
Let
be an
interval, and
a
convex function
In mathematics, a real-valued function is called convex if the line segment between any two distinct points on the graph of a function, graph of the function lies above or on the graph between the two points. Equivalently, a function is conve ...
; then the ''Legendre transform'' ''of''
is the function
defined by
where
denotes the
supremum
In mathematics, the infimum (abbreviated inf; : infima) of a subset S of a partially ordered set P is the greatest element in P that is less than or equal to each element of S, if such an element exists. If the infimum of S exists, it is unique, ...
over
, e.g.,
in
is chosen such that
is maximized at each
, or
is such that
has a bounded value throughout
(e.g., when
is a linear function).
The function
is called the
convex conjugate
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 transformati ...
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
In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non- vertical tangent line at each interior point in ...
, 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, intuitively, the straight line that "just touches" the curve at that point. Leibniz defined it as the line through a pair of infinitely close points o ...
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 discret ...
of
that has slope
.
Definition in n-dimensional real space
The generalization to convex functions
on a
convex set
In geometry, a set of points is convex if it contains every line segment between two points in the set.
For example, a solid cube (geometry), cube is a convex set, but anything that is hollow or has an indent, for example, a crescent shape, is n ...
is straightforward:
has domain
and is defined by
where
denotes the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
of
and
.
The Legendre transformation is an application of the
duality 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 Legendre transform in terms of derivatives
For a differentiable convex function
on the real line with the first derivative
and its inverse
, the Legendre transform of
,
, can be specified, up to an additive constant, by the condition that the functions' first derivatives are inverse functions of each other, i.e.,
and
.
To see this, first note that if
as a convex function on the real line is differentiable and
is a
critical point of the function of
, then the supremum is achieved at
(by convexity, see the first figure in this Wikipedia page). Therefore, the Legendre transform of
is
.
Then, suppose that the first derivative
is invertible and let the inverse be
. Then for each
, the point
is the unique critical point
of the function
(i.e.,
) because
and the function's first derivative with respect to
at
is
. Hence we have
for each
. By differentiating with respect to
, we find
Since
this simplifies to
. In other words, ''
and
are inverses to each other''.
In general, if
as the inverse of
then
so integration gives
with a constant
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'',
Formal definition in physics context
In analytical mechanics and thermodynamics, Legendre transformation is usually defined as follows: suppose
is a function of
; then we have
::
Performing the Legendre transformation on this function means that we take
as the independent variable, so that the above expression can be written as
::
and according to Leibniz's rule
we then have
::
and taking
we have
which means
::
When
is a function of
variables
, then we can perform the Legendre transformation on each one or several variables: we have
::
where
Then if we want to perform the Legendre transformation on, e.g.
, then we take
together with
as independent variables, and with Leibniz's rule we have
::
So for the function
we have
::
We can also do this transformation for variables
. If we do it to all the variables, then we have
::
where
In analytical mechanics, people perform this transformation on variables
of the Lagrangian
to get the Hamiltonian:
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
, we have
::
so we can perform the Legendre transformation on either or both of
to yield
::
::
::
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,
as differentiable functions defined on an open set of
or on a differentiable manifold, and
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
is differentiable and convex for the variables
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
with all positive double derivative values and with a bijective (invertible) derivative. For a fixed
, let
maximize or make the function
bounded over
. Then the Legendre transformation of
is
, thus,
by the maximizing or bounding condition
. Note that
depends on
. (This can be visually shown in the 1st figure of this page above.) Thus
where
, meaning that
is the inverse of
that is the derivative of
(so
). Note that
is also differentiable with the
following derivative (Inverse function rule),
Thus, the Legendre transformation
is the composition of differentiable functions, hence it is differentiable. Applying the
product rule
In calculus, the product rule (or Leibniz rule or Leibniz product rule) is a formula used to find the derivatives of products of two or more functions. For two functions, it may be stated in Lagrange's notation as (u \cdot v)' = u ' \cdot v ...
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 ...
with the found equality
yields
giving
so
is convex with its double derivatives are all positive.
* The Legendre transformation is an
involution
Involution may refer to: Mathematics
* Involution (mathematics), a function that is its own inverse
* Involution algebra, a *-algebra: a type of algebraic structure
* Involute, a construction in the differential geometry of curves
* Exponentiati ...
, i.e.,
. ''Proof.'' By using the above identities as
,
,
and its derivative
,
Note that this derivation does not require the condition to have all positive values in double derivative of the original function
.
Identities
As shown
above, for a convex function
, with
maximizing or making
bounded at each
to define the Legendre transform
and with
, the following identities hold.
*
,
*
,
*
.
Examples
Example 1
Consider the
exponential function which has the domain
. From the definition, the Legendre transform is
where
remains to be determined. To evaluate the
supremum
In mathematics, the infimum (abbreviated inf; : infima) of a subset S of a partially ordered set P is the greatest element in P that is less than or equal to each element of S, if such an element exists. If the infimum of S exists, it is unique, ...
, compute the derivative of
with respect to
and set equal to zero:
The
second derivative
In calculus, the second derivative, or the second-order derivative, of a function is the derivative of the derivative of . Informally, the second derivative can be phrased as "the rate of change of the rate of change"; for example, the secon ...
is negative everywhere, so the maximal value is achieved at
. Thus, the Legendre transform is
and has domain
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
,
where a variable
is intentionally used as the argument of the function
to show the
involution
Involution may refer to: Mathematics
* Involution (mathematics), a function that is its own inverse
* Involution algebra, a *-algebra: a type of algebraic structure
* Involute, a construction in the differential geometry of curves
* Exponentiati ...
property of the Legendre transform as
. we compute
thus the maximum occurs at
because the second derivative
over the domain of
as
As a result,
is found as
thereby confirming that
as expected.
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
Compact as used in politics may refer broadly to a pact or treaty; in more specific cases it may refer to:
* Interstate compact, a type of agreement used by U.S. states
* Blood compact, an ancient ritual of the Philippines
* Compact government, a t ...
, hence it always takes a finite maximum on it; it follows that the domain of the Legendre transform of
is .
The stationary point at (found by setting that the first derivative of with respect to
equal to zero) is in the domain if and only if . Otherwise the maximum is taken either at or because the second derivative of with respect to
is negative as
; for a part of the domain
the maximum that can take with respect to