Start with internal energy. Its fundamental relation is
U=U(S,V,N).
The trouble: S is not a lab variable. You cannot turn an "entropy knob." You can set T with a heat bath. So we want a new function whose independent variable is T instead of S, yet which still contains all the same physics.
A naive idea — "just write S in terms of T and plug back into U" — loses information (steel-manned below). The Legendre transform is the fix.
We apply the transform to U(S,V,N), swapping one conjugate pair at a time. Conjugate pairs are (S,T) and (V,−P).
(a) Swap S→T (conjugate slope T=∂U/∂S). Transform on the S-slot:
F=U−TS.
Differentiate, using dU=TdS−PdV+μdN:
dF=dU−TdS−SdT=−SdT−PdV+μdN.
The TdS cancelled — F now lives on (T,V,N). This is the Helmholtz free energy.
(b) Swap V→−P (slope −P=∂U/∂V). Transform on the V-slot. The Legendre subtract is (slope)×(var)=(−P)V, so we subtract −PV, i.e. addPV:
H=U+PV,dH=TdS+VdP+μdN.H lives on (S,P,N) — the enthalpy.
(c) Swap bothS→TandV→−P:
G=U−TS+PV,dG=−SdT+VdP+μdN.G lives on (T,P,N) — the Gibbs free energy (the lab's favourite: T and P are both controllable).
What does a Legendre transform swap, geometrically?
A description by (point, value) for one by (slope, intercept) — encoding the curve as its tangent-line envelope, losing no info.
Definition of the Legendre transform of f(x)?
g(p)=f−px where p=f′(x), inverted to eliminate x.
Key slope relation of g(p)=f−px?
dg/dp=−x (and the transform is an involution).
Why can't we just substitute S(T) into U?
It loses information; only F=U−TS keeps it via the −TS term, letting S=−(∂F/∂T)V recover it.
Natural variables and definition of F?
F=U−TS, F(T,V,N), dF=−SdT−PdV+μdN.
Natural variables and definition of H?
H=U+PV, H(S,P,N), dH=TdS+VdP+μdN.
Natural variables and definition of G?
G=U−TS+PV, G(T,P,N), dG=−SdT+VdP+μdN.
Why is H=U+PV (plus, not minus)?
Because the slope ∂U/∂V=−P; subtracting slope×V gives −(−P)V=+PV.
Where do Maxwell relations come from?
Equality of mixed second partials of each potential (exact differentials).
Maxwell relation from F?
(∂S/∂V)T=(∂P/∂T)V.
Why does chemistry use G?
Its natural variables (T,P) are exactly what's controlled in a lab; equilibrium = G minimized.
Recall Feynman: explain to a 12-year-old
Imagine a hill drawn on paper. You can describe the hill by listing every point's height, OR by listing how steep it is everywhere plus where each slope-line crosses the ground — both descriptions tell you the same hill. In physics, "height" is energy. Sometimes the thing we'd normally use (like hidden disorder, entropy) is impossible to grab with our hands, but the steepness of energy with respect to it (temperature!) is something a thermostat controls easily. The Legendre transform is the trick of re-describing the energy hill using the steepness we can control, never throwing away any information — so we can do real lab calculations.
Dekho, idea simple hai: hamare paas internal energy U hai jiske natural variables hain S,V,N — yaani entropy, volume, particle number. Problem ye hai ki entropy S ko lab me directly control nahi kar sakte; uski jagah hum temperature T set karte hain (thermostat se). Toh hume chahiye ek nayi energy-jaisi quantity jiska independent variable T ho, par information bilkul lose na ho. Yeh kaam karta hai Legendre transform.
Geometrically samjho: koi curve ko aap do tareeke se describe kar sakte ho — ya toh har point ki height batao, ya har jagah ka slope aur tangent line ka intercept batao. Dono me poori curve ki info hoti hai. Legendre transform g=f−px exactly yahi karta hai: variable x ko uske slope p=f′(x) se badal deta hai. Iski key property: dg/dp=−x, aur do baar karne par wapas original aa jata hai (involution) — isiliye koi info nahi khoti.
Thermo me jab S→T swap karte hain to milta hai F=U−TS (Helmholtz), jab V→−P swap karte hain to H=U+PV (enthalpy), aur dono swap karne se G=U−TS+PV (Gibbs). Sign ka dhyan rakhna: U ka V wala slope −P hai, isliye PVadd hota hai, minus nahi. Chemists G use karte hain kyunki unke lab conditions (T,P) exactly G ke natural variables hain.
Bonus: kyunki har dΦ exact differential hai, mixed partial derivatives equal hote hain — isse Maxwell relations free me mil jaate hain, jaise (∂S/∂V)T=(∂P/∂T)V. Yeh unmeasurable cheez (entropy ka volume ke saath change) ko measurable cheez (pressure ka temperature ke saath change) se jod deta hai. Isiliye Legendre transform thermodynamics ka asli engine hai.