The universal recipe
Everything in equilibrium statistical mechanics reduces to one workflow. Whether the system is a gas, a magnet, a crystal or a black-hole horizon, you do the same four things — and the algebra is usually easy once the physics is set up.
- Identify the ensemble and the microstates. Isolated → microcanonical; fixed T → canonical; fixed T,\mu → grand canonical. List the allowed states and their energies E_i.
- Build the partition function Z=\sum_i e^{-\beta E_i} (or \mathcal{Z}). Factorize over independent particles/modes where possible — this is what makes big systems tractable.
- Get the free energy F=-k_BT\ln Z (or \Phi=-k_BT\ln\mathcal{Z}). This one function is the gateway.
- Differentiate for observables: \langle E\rangle=-\partial_\beta\ln Z, S=-\partial_T F, P=-\partial_V F, C_V=\partial\langle E\rangle/\partial T, and fluctuations from second derivatives.
Worked problem: the two-level system
The simplest non-trivial system: N independent units, each with just two energy levels, $0 and \varepsilon$. This models atoms with two spin states, defects, impurities in solids — anything with a gap. Follow the recipe.
Steps 2–4 for one unit, then times N. The mean energy rises from $0$ (all in the ground state at T\to0) toward N\varepsilon/2 (levels equally populated at T\to\infty).
The heat capacity, differentiating \langle E\rangle with respect to T. It is zero at both T\to0 and T\to\infty and bulges in between — the Schottky anomaly, peaking near k_BT\approx0.42\,\varepsilon.
The physics of the Schottky peak is intuitive: at very low T no unit can afford the gap \varepsilon, so heating changes nothing (C\to0); at very high T both levels are already half-full, so more heat also changes little; only when k_BT\sim\varepsilon does added heat efficiently promote units across the gap. Measuring such a bump in a real solid's heat capacity reveals a hidden two-level structure — statistical mechanics used as a microscope.
Worked problem: paramagnetism and Curie's law
Now N magnetic moments \mu (here \mu is a magnetic moment, not chemical potential) in a field B, each with energy \mp\mu B for aligned/anti-aligned. Same recipe, one new twist — we differentiate \ln Z with respect to the field to get magnetization.
The partition function and magnetization of an ideal paramagnet. At large B or low T, \tanh\to1 and the moments saturate; the competition is thermal energy k_BT versus magnetic energy \mu B.
In weak fields (\mu B\ll k_BT), expand \tanh x\approx x to get M\approx N\mu^2 B/k_BT, so the susceptibility \chi=M/B\propto 1/T. This is Curie's law — magnetic response inversely proportional to temperature — one of the most-tested predictions in physics, and it drops straight out of the recipe. Thermal agitation randomizes the moments, and it does so more effectively the hotter you go.
Why the ensembles agree
A natural worry: microcanonical (fixed E) and canonical (fixed T) describe different physical setups, so why do they give identical thermodynamics? Because, as we saw, canonical energy fluctuations are tiny — \Delta E/\langle E\rangle\sim 1/\sqrt{N}. For N\sim10^{23} the canonical energy distribution is a needle-sharp spike at \langle E\rangle, indistinguishable from fixing E outright. In the thermodynamic limit the ensembles are equivalent, and you are free to choose whichever makes the math easiest — almost always the canonical.
Where this leads next
You now hold the master key of thermal physics. Everywhere it turns. When \lambda_{\text{th}}^3/V stops being small, the classical $1/N!$ is not enough and you need genuine quantum statistics — the Bose–Einstein and Fermi–Dirac distributions that govern blackbody radiation, electrons in metals, and Bose–Einstein condensates. That is Statistical Mechanics II.
Add interactions between particles and Z no longer factorizes — the frontier of phase transitions, critical exponents and the renormalization group. Let the states be field configurations and the same \sum e^{-\beta E} becomes the path integral of quantum field theory. From this one idea — weight every microstate by e^{-\beta E} and sum — flows an astonishing fraction of modern physics.