Skip to main content

Rebuilding curves (and physical laws) from their tangents: a gentle introduction to the the Legendre dual

In this post, we will explore an elegant mathematical idea that links geometry, calculus, and physics: the Legendre transform (sometimes called the Legendre dual). The basic concept is that a smooth curve or function can be re-described entirely in terms of the slopes of its tangent lines. Even more remarkably, this process can be reversed to recover the original function. The same idea appears in classical mechanics and thermodynamics as a tool for switching between different physical variables, such as velocity and momentum or entropy and temperature.

1. Geometric Intuition with Tangent Lines

Suppose we have a smooth, upward-curving function f(x). At any point x = a, we can draw a tangent line. The tangent line can be written in slope-intercept form:

y = p·x + b

Here, p = f′(a) is the slope of the tangent line, and b is its y-intercept, which can be found by substituting x = 0:

b = f(a) − a·f′(a)

So, every point a on the curve corresponds to a line with slope p and intercept b. This gives a one-to-one correspondence between points on the curve and tangent lines. We can even plot the collection of all such intercepts as a separate curve if we wish.

2. Defining the Legendre Dual

Now, instead of describing the function in terms of x, we describe it in terms of the slope p. This leads to the Legendre transform of f, usually written as f* or f*. Formally, it is defined by:

f*(p) = sup_x [ p·x − f(x) ]

The notation “sup” stands for “supremum,” which is the maximum value if it exists. To compute it, we vary x over all real numbers and find the point where the expression p·x − f(x) is largest. For a differentiable convex function, this happens when p = f′(x). Substituting that back gives:

f*(p) = p·x − f(x)

This new function f*(p) encodes the same information as f(x), but now the independent variable is the slope p of the tangent line, not the coordinate x.

3. Recovering the Original Function

The most remarkable part is that this transformation can be reversed. If f is convex and smooth, we can recover it from its dual using:

f(x) = sup_p [ p·x − f*(p) ]

This formula says that the original function is the “upper envelope” of all tangent lines. Each tangent line has slope p and intercept −f*(p), and together, their maximum forms the original curve.

4. Applications in Physics

The Legendre transform is not just a mathematical curiosity—it plays a central role in physics. Here are two major examples.

Classical Mechanics: From Velocities to Momenta

In mechanics, we often start with a function called the Lagrangian, denoted L(q, v), which depends on generalized position q and velocity v. The conjugate variable to velocity is momentum, defined as:

p = ∂L / ∂v

We then define another function called the Hamiltonian, H(q, p), by taking the Legendre transform of L with respect to the velocity variable:

H(q, p) = p·v − L(q, v)

where v is chosen so that p = ∂L/∂v. The Hamiltonian provides an equivalent description of motion, but in terms of position and momentum instead of position and velocity. This transformation makes certain physical laws (like energy conservation) more apparent and simplifies equations of motion in advanced physics. (Wikipedia: Legendre Transformation)

Thermodynamics: From Entropy to Temperature

In thermodynamics, systems are described by energy functions that depend on quantities like entropy (S) and volume (V). For example, internal energy might be a function:

U = U(S, V)

However, it is often more useful to work with temperature (T) instead of entropy. The relationship between them is:

T = ∂U / ∂S

We can define a new function, the Helmholtz free energy F(T, V), by performing a Legendre transform on U with respect to S:

F(T, V) = U − T·S

This new function expresses energy in terms of measurable quantities like temperature and volume, rather than entropy. Similar transformations lead to other important thermodynamic potentials such as enthalpy (H = U + P·V) and Gibbs free energy (G = U − T·S + P·V). (Washington University Physics Notes)

5. Summary of Key Ideas

  • A function can be described either by its values (x, f(x)) or by the slopes and intercepts of its tangent lines (p, b).
  • The Legendre transform re-expresses a function in terms of its slopes rather than its original variable.
  • The transformation is reversible if the function is convex and differentiable.
  • In physics, the Legendre transform allows us to trade one set of variables for another—velocity for momentum, entropy for temperature—depending on which are more convenient or measurable.
  • This dual viewpoint helps simplify equations and reveal deeper structure in physical systems.

6. Closing Thoughts

The Legendre transform shows how the same mathematical object can appear in very different forms, depending on which variables we choose to emphasize. In geometry, it describes a curve as the envelope of its tangents. In mechanics, it connects the Lagrangian and Hamiltonian formulations. In thermodynamics, it explains why we can express energy in terms of temperature or pressure instead of entropy or volume.

Although the formal definitions may look advanced, the underlying concept is simple and powerful: a change in perspective—from positions to slopes, or from one set of variables to another—can reveal new insights into how the world works.

References
Wikipedia: Legendre Transformation
Legendre Transform Introduction, Washington University Physics Department
Zia, R. K. P. (2009). "Legendre Transform in Physics." University of Notre Dame.

Comments

Popular posts from this blog

What is Mathematical Fluency?

What does it really mean for students to be mathematically fluent? If you’ve been in any math PD over the past few years, you’ve likely heard the phrase everywhere. We talk about fluency as something students should develop, strengthen, and demonstrate, but it can still feel abstract when we try to describe it in observable, classroom-ready terms. This post breaks down mathematical fluency into the two simplest frames we can use as teachers: what it looks like and what it sounds like . These descriptions can guide instruction, assessment, student goal-setting, and even walkthrough conversations with colleagues or administrators. What Mathematical Fluency Looks Like In a classroom where students are developing mathematical fluency, you see students making choices about strategies rather than following steps robotically. They use representations—number lines, diagrams, tables, graphs, manipulatives, symbolic expressions—and switch between them to make sense of a problem. They move ...

The Tribe of Math Mentors: 11 Questions Every Educator Should Answer

It is easy to get caught up in the vague, existential questions of education: How do I become a better teacher? How do I make math engaging? How do I survive the burnout? But as author Tim Ferriss noted when writing his book Tribe of Mentors, "Life punishes the vague wish and rewards the specific ask." When Ferriss set out to deconstruct the habits of world-class performers, he didn’t ask them broad questions about "the secret to success." He engineered 11 highly specific questions designed to bypass rehearsed answers and force his subjects to share actionable, vulnerable, and unconventional insights. Recently, I started thinking about how perfectly this methodology translates to our world. What if we asked these exact types of questions to master math teachers? What if we used them to guide the next generation of educators? Here is my best thinking of what Ferriss’s Tribe of Mentors questionnaire looks like when translated into the context of the mathematics classr...

Beyond Taylor Series: The Magic and History of Padé Approximations

If you have ever taken a calculus class, you probably remember the Taylor series. It is the mathematical magic trick that lets you turn complicated functions—like sines, cosines, and exponentials—into simple, infinitely long polynomials. For centuries, it has been a cornerstone of numerical mathematics. But the Taylor series has a dark secret: it frequently breaks. If a function has a vertical asymptote (a pole) or if you move too far from your starting point, the Taylor series spirals out of control into infinity. It is strictly bounded by what mathematicians call a "radius of convergence." Enter the Padé approximation . Instead of using a single polynomial to estimate a function, a Padé approximant uses a fraction (a ratio of two polynomials). This simple structural change unlocks a profound level of mathematical power, allowing us to see past the limits of Taylor series and model complex, chaotic systems in modern physics and engineering. A Brief History: From Franc...