Before any thermodynamics, we need one idea from calculus: the slope of a curve at a point.
Picture a smooth curve y=f(x). Zoom in on one point until the curve looks straight — that tiny straight piece has a steepness. That steepness is the slope, written f′(x) or dxdf.
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 f′(x) at that point. Read it as "the tangent's steepness is the number f′(x)."
The symbol d in front of a quantity means "an infinitesimally small change in it." dU = a whisker of energy change. dS = 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:
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.
dU=TdS−PdV+μdN.
This is the first law of thermodynamics (energy bookkeeping). Now match it term-by-term against the differential of §2. Whatever multiplies dSmust be∂U/∂S, and so on:
The figure below shows T as the actual slope of the U-vs-S curve: pick a point (pink dot), draw the tangent (orange), its steepness is the temperature there.
Everything above was setup. Here is the machine, stated once and for all.
Derive the intercept. A tangent line at the point x has slope p=f′(x), so its equation is Y=f(x)+p(X−x). Set X=0 to read off its y-intercept, which we call b:
b=f(x)−px.
Build a thermodynamic potential with it. Take U(S,V,N) and Legendre-swap the S-slot (whose slope is T). To land the standard thermodynamic sign we subtract slope×variable, T⋅S:
F=U−TS.
Now find dF. We need the change of the productTS, and here is why we cannot just write "TdS": both TandS can move, so the product's change has two contributions. This is the ordinary product rule of calculus,
d(TS)=TdS+SdT(just like d(uv)=udv+vdu),
because a small change in a rectangle of sides T and S adds a thin strip on each side. Therefore
dF=dU−d(TS)=dU−TdS−SdT.
Substituting the first law dU=TdS−PdV+μdN, the TdS pieces cancel:
dF=(TdS−PdV+μdN)−TdS−SdT=−SdT−PdV+μdN.
So F depends on (T,V,N). This is the Helmholtz free energy.
Enthalpy H=U+PV. Swap the V-slot (slope −P, so subtract −P⋅V, i.e. addPV). Same product rule, d(PV)=PdV+VdP:
dH=dU+d(PV)=(TdS−PdV+μdN)+(PdV+VdP)=TdS+VdP+μdN.
The −PdV and +PdV cancel, leaving H on (S,P,N).
Gibbs G=U−TS+PV. Swap both slots at once; apply the product rule to both products:
dG=dU−d(TS)+d(PV)=dU−(TdS+SdT)+(PdV+VdP).
Insert the first law and cancel the TdS and PdV pairs:
dG=−SdT+VdP+μdN,
so G lives on (T,P,N) — both lab-controllable.
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.
We met the exact-vs-inexact distinction in §2. An exact differential is a dU that came from a genuine function U(S,V). Its signature: mixed second slopes don't care about the order you take them.
Because ∂U/∂S=T and ∂U/∂V=−P, applying this to U says (∂V∂T)S=−(∂S∂P)V — a Maxwell relation, gift-wrapped. Full set in Maxwell Relations.
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 T,P,μ → 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 U,H,F,G.
§5 already built F=U−TS; 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 F=U−TS re-appear as F=−kBTlnZ.
Test yourself — cover the right side. If any answer is fuzzy, re-read that section before the parent page.
What does f′(x) mean in one phrase?
The steepness (slope) of the tangent line to y=f(x) at the point x.
What is entropy S 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 T.
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 d and δ?
d 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.
dU=TdS−PdV+μdN; −PdV is compression work, TdS is reversible heat, μdN is energy of added particles.
Why is −P=∂U/∂V and not +P?
The first law carries a minus on the −PdV term, so squeezing (negative dV) raises U.
Extensive vs intensive — one-line test?
Clone the system: extensive quantities double (U,S,V,N), intensive ones stay the same (T,P,μ).
Why does g=px−f (not f−px)?
The flipped sign makes dg/dp=+x, keeps g convex and the transform a clean symmetric involution; both signs are otherwise valid.
When you differentiate F=U−TS, what rule handles the TS term and why?
The product rule d(TS)=TdS+SdT, because both T and S can change, so the rectangle TS grows on both sides.
Convex vs concave, and where does convexity fail physically?
Convex curves up (f′′≥0), concave curves down (f′′≤0); 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.