2.4.2 · D1Thermodynamics & Statistical Mechanics (Advanced)

Foundations — Legendre transforms connecting them

3,389 words15 min readBack to topic

This page assumes you have seen nothing. Every symbol on the parent page is unpacked here, in an order where each idea rests on the one before it.


0. The one prerequisite arrow you never skip: a slope

Before any thermodynamics, we need one idea from calculus: the slope of a curve at a point.

Picture a smooth curve . Zoom in on one point until the curve looks straight — that tiny straight piece has a steepness. That steepness is the slope, written or .

The figure below defines slope by the little rise-over-run triangle sitting on the tangent line: the orange line just touches the violet curve at the pink dot, and its steepness (rise ÷ run, dashed navy triangle) is at that point. Read it as "the tangent's steepness is the number ."

Figure — Legendre transforms connecting them

1. Functions and their "natural variables"

A function is a rule: feed in , get out a number . When we write we mean "an energy that depends on three inputs at once."

Figure — Legendre transforms connecting them

2. Tiny changes: the symbol

The symbol in front of a quantity means "an infinitesimally small change in it." = a whisker of energy change. = a whisker of entropy change.

The curly and its subscripts. The symbol ("partial derivative") is a slope taken while every other input is held frozen. The little subscript labels tell you which inputs are frozen:


3. The first law — where , , are born

Energy is conserved: any energy you put into a closed chunk of stuff has to go somewhere inside it. There are only two everyday ways to pour energy in, plus one for adding matter.

This is the first law of thermodynamics (energy bookkeeping). Now match it term-by-term against the differential of §2. Whatever multiplies must be , and so on:

The figure below shows as the actual slope of the -vs- curve: pick a point (pink dot), draw the tangent (orange), its steepness is the temperature there.

Figure — Legendre transforms connecting them

4. Extensive vs intensive, and conjugate pairs

Before pairing up variables, we need one classification.

Look at the first law again: . Each term is a product of one extensive change and one intensive partner:

extensive (a variable) its intensive slope-partner

5. The Legendre transform itself — the exact operation

Everything above was setup. Here is the machine, stated once and for all.

Derive the intercept. A tangent line at the point has slope , so its equation is . Set to read off its -intercept, which we call :

Build a thermodynamic potential with it. Take and Legendre-swap the -slot (whose slope is ). To land the standard thermodynamic sign we subtract slope×variable, : Now find . We need the change of the product , and here is why we cannot just write "": both and can move, so the product's change has two contributions. This is the ordinary product rule of calculus, because a small change in a rectangle of sides and adds a thin strip on each side. Therefore Substituting the first law , the pieces cancel: So depends on . This is the Helmholtz free energy.

Enthalpy . Swap the -slot (slope , so subtract , i.e. add ). Same product rule, : The and cancel, leaving on .

Gibbs . Swap both slots at once; apply the product rule to both products: Insert the first law and cancel the and pairs: so lives on — both lab-controllable.


6. Convexity — why the swap is even allowed

To swap "point-description" for "slope-description," each slope must name a unique point. That requires the curve to bend consistently one way, never to wiggle back and forth.

The figure below contrasts a well-behaved convex curve (each slope hits it once) with a wiggly one where a single slope touches at two points — there the transform is ambiguous.

Figure — Legendre transforms connecting them

7. Exact differentials — why Maxwell relations fall out for free

We met the exact-vs-inexact distinction in §2. An exact differential is a that came from a genuine function . Its signature: mixed second slopes don't care about the order you take them.

Because and , applying this to says — a Maxwell relation, gift-wrapped. Full set in Maxwell Relations.


The prerequisite map — how the pieces feed forward

Read the diagram top-to-bottom as a dependency chain: each box is a symbol you now own, and each arrow means "you need the box above before the box below makes sense." The one idea from calculus (slope, top-left) fans out into two independent streams — the physics stream (first law → the meanings of → conjugate pairs) and the geometry stream (convexity). Both streams must arrive before the Legendre transform box; that is the whole point — the transform needs a slope-meaning (physics) and a one-slope-one-point guarantee (geometry). They then merge, together with exact-differential facts, into the four potentials .

slope = steepness of tangent

partial derivative with held-fixed subscripts

differential dU

first law dU = T dS - P dV + mu dN

intensive vars T P mu are slopes

extensive vs intensive and conjugate pairs

convex or concave slope names one point

Legendre transform g = p x minus f

exact differential Clairaut

Maxwell relations

four potentials U H F G

§5 already built ; the parent page assembles all four potentials the same way.


The Legendre transform is not only thermodynamics — the same slope-swap turns a Lagrangian into a Hamiltonian in mechanics, see Lagrangian to Hamiltonian (Legendre in Mechanics). Once you meet Partition Functions, you'll see re-appear as .


Equipment checklist

Test yourself — cover the right side. If any answer is fuzzy, re-read that section before the parent page.

What does mean in one phrase?
The steepness (slope) of the tangent line to at the point .
What is entropy intuitively, and why can't you set it directly?
A count of how spread-out the microscopic arrangements are; there is no lab "entropy knob," so we swap it for .
What does the curly mean, and what do its subscripts tell you?
A slope wiggling one input while the subscripted inputs are held fixed at constant values.
What is the difference between and ?
is an exact differential (change of a genuine state function, path-independent); is inexact (a path-dependent transfer like heat or work, with no underlying state function).
Write the first law and give the physical origin of each term.
; is compression work, is reversible heat, is energy of added particles.
Why is and not ?
The first law carries a minus on the term, so squeezing (negative ) raises .
Extensive vs intensive — one-line test?
Clone the system: extensive quantities double (), intensive ones stay the same ().
Why does (not )?
The flipped sign makes , keeps convex and the transform a clean symmetric involution; both signs are otherwise valid.
When you differentiate , what rule handles the term and why?
The product rule , because both and can change, so the rectangle grows on both sides.
Convex vs concave, and where does convexity fail physically?
Convex curves up (), concave curves down (); both give unique slopes, but a phase transition flattens the curve so convexity fails.
What signature of an exact differential gives Maxwell relations, and why?
Mixed second partials are equal (Clairaut's theorem), because a genuine smooth function's cross-slopes don't depend on order.