Statistical physics bridges the gap between the microscopic laws governing individual particles and the macroscopic phenomena we observe in everyday matter. A gas in a box contains on the order of $10^{23}$ particles, each obeying Newton's laws (or quantum mechanics), yet we describe the gas with just a handful of quantities — pressure, temperature, volume. The central question of the subject is: *how do macroscopic laws emerge from microscopic dynamics?*
The strategy is fundamentally statistical. We cannot hope to track the trajectory of every particle, nor would it be useful to do so. Instead, we assign probabilities to the possible configurations of the system and extract macroscopic quantities as averages. Remarkably, the enormous number of particles involved makes these averages extraordinarily sharp — fluctuations are negligible, and the statistical predictions become, for all practical purposes, exact.
These notes develop the subject in two parallel threads. The first, covered in Chapters 1–3, builds statistical mechanics from the bottom up: we define ensembles, compute partition [functions](/page/Function), and derive thermodynamic quantities from microscopic models. The second thread, in Chapter 4, develops classical thermodynamics axiomatically — starting from empirical laws about heat, work, and entropy, without reference to atoms or microstates. Chapter 5 brings both threads together in the study of phase transitions, where the connection between microscopic interactions and macroscopic discontinuities is sharpest.
# Fundamentals of Statistical Physics
This chapter introduces the three statistical ensembles that form the backbone of the subject. The **microcanonical ensemble** describes isolated systems with fixed energy and leads naturally to the concept of entropy. The **canonical ensemble** describes systems at fixed temperature and introduces the partition function — the single most important computational tool in statistical mechanics. The **grand canonical ensemble** further allows particle number to fluctuate and is indispensable for quantum gases. By the end of the chapter, we will see that all three descriptions agree in the thermodynamic [limit](/page/Limit) of large particle number, and the choice between them is one of computational convenience.
## The Microcanonical Ensemble
### Microstates and the Fundamental Postulate
Consider an isolated system with fixed energy $E$, volume $V$, and particle number $N$. In quantum mechanics, the state of the system is described by a solution $|\Psi\rangle$ of the Schrödinger equation $\hat{H}|\Psi\rangle = E|\Psi\rangle$. For a many-body system with $N \sim 10^{23}$ particles, this wavefunction — the **microstate** — encodes the complete information about what every particle is doing.
In practice, however, a macroscopic system does not remain in a single microstate. Small perturbations — from the environment, from internal interactions — drive transitions between different microstates that share the same energy $E$. The system wanders through the space of accessible states, and the question becomes: with what probability does it visit each one?
The answer is given by the foundational axiom of statistical mechanics. To state it precisely, we first need two preliminary notions.
[definition:Equilibrium]
A system is in **equilibrium** if, having been left undisturbed for a sufficiently long time, all macroscopic observables (energy, pressure, magnetisation, etc.) are time-independent.
[/definition]
[definition:Accessible States]
The **accessible states** of an isolated system at energy $E$ are the quantum states that can be reached from the current state by small perturbations. For an isolated system, these are precisely the states with energy $E$. We write $\Omega(E)$ for the number of such states.
[/definition]
With these notions in place, the central postulate can be stated precisely.
[theorem:Fundamental Postulate Of Statistical Mechanics]
For an isolated system in equilibrium, all accessible microstates are equally probable. That is, if the system has energy $E$ and $\Omega(E)$ accessible microstates, the probability of finding the system in any particular microstate $|n\rangle$ with energy $E$ is
\begin{align*}
P(n) = \frac{1}{\Omega(E)}.
\end{align*}
[/theorem]
This is not a result to be derived — it is the starting point of the entire subject. Its justification is ultimately empirical: the predictions that follow from it agree spectacularly with experiment. The postulate can also be motivated on grounds of symmetry (there is no reason to prefer one microstate over another) and by ergodic arguments (the system spends equal time in each accessible state), though neither argument is fully rigorous for realistic systems.
The quantity $\Omega(E)$ is typically astronomically large. For a box of gas at room temperature, $\Omega$ can be of order $e^{10^{23}}$ — a number so vast that writing it in decimal notation would require more digits than there are atoms in the observable universe. This enormous size is not a nuisance; it is the reason statistical mechanics works. Averages over $\Omega(E)$ states are so sharply peaked that fluctuations become invisible.
### Boltzmann Entropy
The number of microstates $\Omega(E)$ is the fundamental quantity characterising an isolated system, but it is unwieldy — it is multiplicative for independent systems and varies over many orders of magnitude. Taking the logarithm converts both of these features into more tractable additive and slowly-varying behaviour.
[definition:Boltzmann Entropy]
The **Boltzmann entropy** of an isolated system with $\Omega(E)$ accessible microstates at energy $E$ is
\begin{align*}
S(E) = k_B \ln \Omega(E),
\end{align*}
where $k_B = 1.381 \times 10^{-23}\,\mathrm{J\,K^{-1}}$ is **Boltzmann's constant**.
[/definition]
The factor of $k_B$ is a historical convention that gives entropy units of $\mathrm{J\,K^{-1}}$, matching the thermodynamic definition we will encounter in Chapter 4. If we measured temperature in energy units, we could set $k_B = 1$.
The logarithm ensures that entropy is **additive** for independent systems: if two non-interacting systems have energies $E_1$ and $E_2$, then the total number of microstates is $\Omega(E_1, E_2) = \Omega_1(E_1)\,\Omega_2(E_2)$ (each microstate of system 1 can be paired with each microstate of system 2), and so
\begin{align*}
S(E_1, E_2) = k_B \ln\bigl[\Omega_1(E_1)\,\Omega_2(E_2)\bigr] = S_1(E_1) + S_2(E_2).
\end{align*}
Entropy is an **extensive** quantity: it scales proportionally with the size of the system, like $E$, $V$, and $N$. Other quantities, such as temperature $T$ and pressure $p$, are **intensive** — they are independent of system size.
### The Second Law of Thermodynamics
The second law governs what happens when constraints on a system are relaxed. Its statistical-mechanical content is surprisingly simple: removing a constraint can only increase (or leave unchanged) the number of accessible states, and therefore the entropy.
To make this precise, consider two initially isolated systems with energies $E_1$ and $E_2$. The total energy $E_{\mathrm{tot}} = E_1 + E_2$ is fixed. While they are separated, the total number of microstates is $\Omega_1(E_1)\,\Omega_2(E_2)$, and the entropy is $S_1(E_1) + S_2(E_2)$.
Now bring the systems into thermal contact so that they can exchange energy, while keeping $E_{\mathrm{tot}}$ fixed. The combined system can now access any partition of energy between the two subsystems, so the total number of microstates becomes
\begin{align*}
\Omega(E_{\mathrm{tot}}) = \sum_{E_1'} \Omega_1(E_1')\,\Omega_2(E_{\mathrm{tot}} - E_1'),
\end{align*}
where the sum runs over all allowed energies $E_1'$ of system 1. Each term in this sum is positive, and the original configuration $E_1' = E_1$ is one of the terms, so $\Omega(E_{\mathrm{tot}}) \geq \Omega_1(E_1)\,\Omega_2(E_2)$.
In fact, much more is true: the sum is overwhelmingly dominated by a single term. Writing $\Omega_1(E_1')\,\Omega_2(E_{\mathrm{tot}} - E_1') = \exp\bigl[\frac{1}{k_B}(S_1(E_1') + S_2(E_{\mathrm{tot}} - E_1'))\bigr]$, we see that the summand is the exponential of an extensive quantity. For large systems, this exponential is so sharply peaked at its maximum $E_1' = E_1^*$ that all other terms are negligible. The entropy of the combined system is therefore
\begin{align*}
S(E_{\mathrm{tot}}) = S_1(E_1^*) + S_2(E_{\mathrm{tot}} - E_1^*),
\end{align*}
where $E_1^*$ maximises $S_1(E_1') + S_2(E_{\mathrm{tot}} - E_1')$.
[theorem:Second Law Of Thermodynamics]
Whenever a constraint on an isolated system is removed, the entropy of the system cannot decrease:
\begin{align*}
S_{\mathrm{final}} \geq S_{\mathrm{initial}}.
\end{align*}
Equality holds only if the system was already in the state that maximises entropy subject to the remaining constraints.
[/theorem]
The mechanism is purely combinatorial: removing a constraint enlarges the [set](/page/Set) of accessible states, so $\Omega$ increases and with it $S = k_B \ln \Omega$. The second law is not an additional axiom — it is a consequence of the fundamental postulate and the definition of entropy.
A crucial feature of this argument is its irreversibility. Once the constraint is removed and the system settles into the new equilibrium, the probability of spontaneously returning to the original configuration is of order $\Omega_1(E_1)\Omega_2(E_2)/\Omega(E_{\mathrm{tot}})$, which is exponentially small in the number of particles. For macroscopic systems, "exponentially small" means effectively zero — the system never returns.
### Temperature
The condition that determines how energy is shared between two systems in thermal contact leads directly to the concept of temperature.
At equilibrium, the energy partition $E_1^*$ maximises $S_1(E_1') + S_2(E_{\mathrm{tot}} - E_1')$. Setting the derivative with respect to $E_1'$ to zero gives the equilibrium condition
\begin{align*}
\frac{\partial S_1}{\partial E}\bigg|_{E_1^*} = \frac{\partial S_2}{\partial E}\bigg|_{E_{\mathrm{tot}} - E_1^*}.
\end{align*}
Two systems are in thermal equilibrium — meaning no net energy transfer occurs when they are brought into contact — precisely when this derivative takes the same value in both systems. This quantity therefore deserves a name.
[definition:Temperature]
The **temperature** $T$ of a system is defined by
\begin{align*}
\frac{1}{T} = \frac{\partial S}{\partial E}\bigg|_{V, N}.
\end{align*}
Two systems are in thermal equilibrium if and only if $T_1 = T_2$.
[/definition]
Since $S$ typically increases with $E$ (adding energy opens up more microstates), temperature is usually positive. There exist model systems — such as spin systems with a finite number of states — where $S$ decreases at high $E$, giving rise to negative temperatures. These are not "colder than absolute zero"; they are *hotter* than any positive temperature, because the more natural variable is $1/T$ rather than $T$, and $1/T$ passes smoothly through zero.
When two systems at slightly different temperatures $T_1 > T_2$ are brought into thermal contact, the entropy change to leading order is
\begin{align*}
\delta S = \left(\frac{1}{T_2} - \frac{1}{T_1}\right)\delta E_2 > 0,
\end{align*}
where $\delta E_2 > 0$ is the energy gained by the colder system. The second law requires $\delta S \geq 0$, which is satisfied when energy flows from the hotter system to the colder one — exactly as everyday experience dictates. This confirms that our statistical definition of temperature captures the intuitive notion of "hotness."
### Heat Capacity
Temperature tells us the *direction* of energy flow; heat capacity tells us *how much* the temperature changes when energy is added. It provides the link between theoretical predictions and experimental measurements.
[definition:Heat Capacity At Constant Volume]
The **heat capacity at constant volume** is
\begin{align*}
C_V = \frac{\partial E}{\partial T}\bigg|_V.
\end{align*}
[/definition]
From the definition of temperature, $\frac{\partial^2 S}{\partial E^2} = -\frac{1}{T^2 C_V}$. Since entropy is concave in energy for stable systems (corresponding to the second derivative being negative), we need $C_V > 0$: energy increases with temperature. Geometrically, the slope $1/T = \partial S/\partial E$ decreases as $E$ increases, so the entropy curve $S(E)$ bends downward — a direct consequence of stability.
Heat capacity also connects entropy differences to measurable quantities: from $dS = dE/T = C_V \, dT/T$ at constant volume, we obtain
\begin{align*}
S(T_2) - S(T_1) = \int_{T_1}^{T_2} \frac{C_V}{T}\,dT,
\end{align*}
which allows entropy changes to be determined experimentally by measuring $C_V(T)$.
### The Two-State System
The simplest non-trivial model in statistical mechanics consists of $N$ non-interacting particles, each of which can occupy one of two energy levels. Despite its simplicity, this model exhibits several features — entropy saturation, negative temperature, exponentially vanishing heat capacity — that appear in more realistic systems.
[example:Two State System In The Microcanonical Ensemble]
Consider $N$ non-interacting particles, each with two states: spin up $|\!\uparrow\rangle$ with energy $\varepsilon$, and spin down $|\!\downarrow\rangle$ with energy $0$. If $N_\uparrow$ particles are spin up, the total energy is $E = N_\uparrow \varepsilon$, so $N_\uparrow = E/\varepsilon$.
**Counting microstates.** The number of ways to choose which $N_\uparrow$ particles are spin up from $N$ is
\begin{align*}
\Omega(E) = \binom{N}{N_\uparrow} = \frac{N!}{N_\uparrow!\,(N - N_\uparrow)!}.
\end{align*}
**Entropy.** For large $N$, we apply Stirling's approximation $\ln N! \approx N\ln N - N$ to obtain
\begin{align*}
S(E) &= k_B \ln \Omega(E) \\
&= k_B\bigl[N\ln N - N_\uparrow \ln N_\uparrow - (N - N_\uparrow)\ln(N - N_\uparrow)\bigr] \\
&= -k_B N\left[\frac{E}{N\varepsilon}\ln\frac{E}{N\varepsilon} + \left(1 - \frac{E}{N\varepsilon}\right)\ln\left(1 - \frac{E}{N\varepsilon}\right)\right].
\end{align*}
The entropy vanishes at $E = 0$ (all spins down, one microstate) and at $E = N\varepsilon$ (all spins up, one microstate), and reaches its maximum $S_{\max} = Nk_B\ln 2$ at $E = N\varepsilon/2$, where the system has the greatest uncertainty about its configuration.
**Temperature.** From $1/T = \partial S/\partial E$:
\begin{align*}
\frac{1}{T} = \frac{k_B}{\varepsilon}\ln\frac{N\varepsilon - E}{E}.
\end{align*}
When $E < N\varepsilon/2$ (fewer than half the spins are up), $T > 0$. When $E > N\varepsilon/2$, $T < 0$ — a consequence of the entropy decreasing with energy beyond the midpoint. At $E = N\varepsilon/2$, the temperature diverges: $T \to \pm\infty$.
Inverting for the energy at temperature $T$:
\begin{align*}
E = \frac{N\varepsilon}{e^{\varepsilon/k_B T} + 1}.
\end{align*}
As $T \to 0^+$, $E \to 0$ (all spins down). As $T \to \infty$, $E \to N\varepsilon/2$ (spins equally split).
**Heat capacity.** Differentiating $E$ with respect to $T$:
\begin{align*}
C_V = Nk_B\left(\frac{\varepsilon}{k_B T}\right)^2 \frac{e^{\varepsilon/k_B T}}{(e^{\varepsilon/k_B T} + 1)^2}.
\end{align*}
This vanishes exponentially as $T \to 0$, due to the energy gap $\varepsilon$: at low temperatures, the thermal energy $k_B T$ is insufficient to excite particles across the gap, and the system is frozen in its ground state. The heat capacity is extensive (proportional to $N$), as expected.
[/example]
### Pressure, Volume, and the First Law
So far we have considered the entropy as a function of energy alone. In general, the number of microstates — and hence the entropy — also depends on external parameters such as the volume $V$ of the container. For a gas, increasing $V$ gives the particles more room and increases $\Omega$.
With $S = S(E, V)$, we have
\begin{align*}
dS = \frac{1}{T}\,dE + \frac{\partial S}{\partial V}\bigg|_E dV.
\end{align*}
Rearranging gives the **first law of thermodynamics** in the microcanonical setting:
\begin{align*}
dE = T\,dS - p\,dV,
\end{align*}
where the **pressure** is defined as follows.
[definition:Pressure]
\begin{align*}
p = T\frac{\partial S}{\partial V}\bigg|_E.
\end{align*}
[/definition]
The term $-p\,dV$ is the work done *on* the system when its volume changes by $dV$ (compression corresponds to $dV < 0$, which increases the energy). The term $T\,dS$ is the energy transferred as heat.
The same equilibrium argument used for temperature applies to pressure: two systems that can exchange volume (separated by a movable partition) at the same temperature reach equilibrium when $p_1 = p_2$, exactly as physical intuition requires.
## The Canonical Ensemble
### From Fixed Energy to Fixed Temperature
The microcanonical ensemble describes an isolated system with a sharply defined energy. In practice, however, many systems of interest are not isolated but are in thermal contact with a much larger environment — a **heat reservoir** — that maintains a constant temperature $T$.
The key question is: if we know the temperature rather than the energy, what is the probability of finding the system in a given microstate?
Consider a small system $\mathcal{S}$ in thermal contact with a large reservoir $\mathcal{R}$ at temperature $T$. The combined system $\mathcal{S} + \mathcal{R}$ is isolated with total energy $E_{\mathrm{tot}}$, and the energy of $\mathcal{S}$ is negligible compared to $E_{\mathrm{tot}}$. Let $\{|n\rangle\}$ denote the microstates of $\mathcal{S}$ with energies $\{E_n\}$.
By the fundamental postulate, every microstate of the combined system is equally likely. The number of microstates of $\mathcal{S} + \mathcal{R}$ in which $\mathcal{S}$ is in state $|n\rangle$ is $\Omega_{\mathcal{R}}(E_{\mathrm{tot}} - E_n)$ — the reservoir must carry the remaining energy. The probability that $\mathcal{S}$ is in state $|n\rangle$ is therefore proportional to $\Omega_{\mathcal{R}}(E_{\mathrm{tot}} - E_n)$.
Since $E_n \ll E_{\mathrm{tot}}$, we can Taylor expand the entropy of the reservoir:
\begin{align*}
S_{\mathcal{R}}(E_{\mathrm{tot}} - E_n) \approx S_{\mathcal{R}}(E_{\mathrm{tot}}) - E_n \frac{\partial S_{\mathcal{R}}}{\partial E} = S_{\mathcal{R}}(E_{\mathrm{tot}}) - \frac{E_n}{T},
\end{align*}
so that $\Omega_{\mathcal{R}}(E_{\mathrm{tot}} - E_n) \propto e^{-E_n / k_B T}$.
[definition:Boltzmann Distribution]
A system in thermal equilibrium with a reservoir at temperature $T$ occupies microstate $|n\rangle$ with probability
\begin{align*}
P(n) = \frac{e^{-\beta E_n}}{Z},
\end{align*}
where $\beta = 1/(k_B T)$ is the **inverse temperature**. This is the **Boltzmann distribution**, also called the **canonical probability distribution**.
[/definition]
[definition:Partition Function]
The normalisation constant in the Boltzmann distribution is the **(canonical) partition function**:
\begin{align*}
Z = Z(\beta, V, N) = \sum_n e^{-\beta E_n},
\end{align*}
where the sum runs over all microstates $|n\rangle$ of the system (not over energy levels — states with the same energy are counted separately).
[/definition]
The partition function is the central object of the canonical ensemble. As we will see, all thermodynamic quantities can be extracted from it.
### Factorisation for Independent Systems
If two systems $\mathcal{S}_1$ and $\mathcal{S}_2$ are independent (non-interacting) and share the same temperature, then the energies of the combined system are $E_{n,m} = E_n^{(1)} + E_m^{(2)}$ and the partition function factorises.
[theorem:Factorisation Of The Partition Function]
For two independent systems at the same temperature, the partition function of the combined system is
\begin{align*}
Z = Z_1 \cdot Z_2.
\end{align*}
[/theorem]
[proof]
The states of the combined system are labelled by pairs $(n, m)$, with energies $E_n^{(1)} + E_m^{(2)}$. Substituting into the definition:
\begin{align*}
Z = \sum_{n,m} e^{-\beta(E_n^{(1)} + E_m^{(2)})} = \left(\sum_n e^{-\beta E_n^{(1)}}\right)\left(\sum_m e^{-\beta E_m^{(2)}}\right) = Z_1 \cdot Z_2.
\end{align*}
The factorisation of the exponential into a product is what allows the double sum to separate.
[/proof]
This result extends immediately by induction: for $N$ independent, identical subsystems, $Z = Z_1^N$. This is the workhorse identity for ideal (non-interacting) systems.
### Energy and Fluctuations
The Boltzmann distribution assigns a probability to each microstate, so any observable can be computed as a weighted average. For the energy, the result takes a particularly clean form in terms of the partition function.
[theorem:Energy From The Partition Function]
The average energy of a system in the canonical ensemble is
\begin{align*}
\langle E \rangle = -\frac{\partial \ln Z}{\partial \beta}.
\end{align*}
[/theorem]
[proof]
By definition, $\langle E \rangle = \sum_n P(n) E_n = \frac{1}{Z}\sum_n E_n \, e^{-\beta E_n}$. The sum $\sum_n E_n \, e^{-\beta E_n} = -\frac{\partial}{\partial \beta}\sum_n e^{-\beta E_n} = -\frac{\partial Z}{\partial \beta}$. Dividing by $Z$ gives $\langle E \rangle = -\frac{1}{Z}\frac{\partial Z}{\partial \beta} = -\frac{\partial \ln Z}{\partial \beta}$.
[/proof]
The spread of energies around the mean is captured by the variance. By a similar computation (differentiating $\ln Z$ twice),
\begin{align*}
(\Delta E)^2 = \langle E^2 \rangle - \langle E \rangle^2 = \frac{\partial^2 \ln Z}{\partial \beta^2} = k_B T^2 C_V.
\end{align*}
This last equality, connecting fluctuations to the heat capacity, has a striking consequence. Both $\langle E \rangle$ and $C_V$ are extensive — proportional to $N$ — so $(\Delta E)^2 \propto N$. The *relative* fluctuation is therefore
\begin{align*}
\frac{\Delta E}{\langle E \rangle} \propto \frac{\sqrt{N}}{N} = \frac{1}{\sqrt{N}}.
\end{align*}
For $N \sim 10^{23}$, this is of order $10^{-12}$ — fantastically small. The energy is, for all practical purposes, sharply defined. This is the **thermodynamic limit**: as $N \to \infty$, the canonical ensemble becomes equivalent to the microcanonical ensemble, and we may drop the angle brackets and write $\langle E \rangle = E$.
### Entropy in the Canonical Ensemble
In the microcanonical ensemble, entropy was defined via $S = k_B \ln \Omega$. We need a definition that applies more generally — to any probability distribution over microstates, not just the uniform one.
The idea is to consider $W$ identical copies of the system (an "ensemble" in the literal sense, with $W$ very large). Among these $W$ copies, the number in microstate $|n\rangle$ is $P(n) \cdot W$. The total number of ways to arrange the copies among the microstates is the multinomial coefficient
\begin{align*}
\Omega_{\mathrm{copies}} = \frac{W!}{\prod_n [P(n)\,W]!}.
\end{align*}
Applying Stirling's approximation ($\ln M! \approx M \ln M - M$) and dividing by $W$ to get the entropy per copy gives the following.
[definition:Gibbs Entropy]
For a system with probability distribution $\{P(n)\}$ over microstates $\{|n\rangle\}$, the **Gibbs entropy** (also called **Shannon entropy** or **von Neumann entropy** in the quantum setting) is
\begin{align*}
S = -k_B \sum_n P(n) \ln P(n).
\end{align*}
[/definition]
This definition applies to any probability distribution and reduces to the Boltzmann entropy in the microcanonical case: if $P(n) = 1/\Omega$ for all accessible states and $0$ otherwise, then $S = -k_B \cdot \Omega \cdot \frac{1}{\Omega}\ln\frac{1}{\Omega} = k_B \ln \Omega$.
In the canonical ensemble, substituting the Boltzmann distribution $P(n) = e^{-\beta E_n}/Z$ gives
\begin{align*}
S &= -k_B \sum_n P(n)\bigl(-\beta E_n - \ln Z\bigr) \\
&= \frac{\langle E \rangle}{T} + k_B \ln Z \\
&= \frac{\partial}{\partial T}\bigl(k_B T \ln Z\bigr).
\end{align*}
### The Helmholtz Free Energy
At zero temperature, the equilibrium state of a system minimises the energy. At finite temperature, this is no longer the correct criterion — the system can lower its "cost" by increasing entropy, even at the expense of higher energy. The quantity that captures this trade-off is the free energy.
[definition:Helmholtz Free Energy]
The **Helmholtz free energy** is
\begin{align*}
F = E - TS,
\end{align*}
where "free" refers to the energy available to do work.
[/definition]
The significance of $F$ is that it determines the equilibrium state at fixed temperature.
[theorem:Free Energy Determines Equilibrium]
At fixed temperature and volume, the equilibrium state of a system minimises the Helmholtz free energy $F$.
[/theorem]
[proof]
The probability that the system has energy $E$ is proportional to the number of states at that energy times the Boltzmann factor:
\begin{align*}
P(E) = \Omega(E)\,e^{-\beta E} = e^{S(E)/k_B}\,e^{-\beta E} = e^{-\beta(E - TS)} = e^{-\beta F(E)}.
\end{align*}
The most probable energy maximises $P(E)$, which is equivalent to minimising $F(E) = E - TS(E)$.
[/proof]
The competition is transparent: lowering $E$ reduces $F$ (energetic preference for the ground state), while increasing $S$ also reduces $F$ via the $-TS$ term (entropic preference for disorder). At low temperature, energy wins; at high temperature, entropy dominates.
The free energy is related to the partition function by a clean identity.
[theorem:Free Energy And The Partition Function]
\begin{align*}
F = -k_B T \ln Z.
\end{align*}
[/theorem]
[proof]
From the canonical entropy derived above, $S = \langle E \rangle / T + k_B \ln Z$. Substituting into $F = E - TS$:
\begin{align*}
F = \langle E \rangle - T\left(\frac{\langle E \rangle}{T} + k_B \ln Z\right) = -k_B T \ln Z.
\end{align*}
[/proof]
Since $F = F(T, V)$ is a function of the natural variables $T$ and $V$, we can extract all thermodynamic quantities from it. Differentiating:
\begin{align*}
dF = dE - T\,dS - S\,dT = (T\,dS - p\,dV) - T\,dS - S\,dT = -S\,dT - p\,dV,
\end{align*}
where we used the first law $dE = T\,dS - p\,dV$. Reading off partial derivatives:
\begin{align*}
S = -\frac{\partial F}{\partial T}\bigg|_V, \qquad p = -\frac{\partial F}{\partial V}\bigg|_T.
\end{align*}
Mathematically, $F(T, V)$ is a Legendre transform of $E(S, V)$: we have traded the natural variable $S$ for $T = \partial E / \partial S$.
### The Two-State System Revisited
The canonical ensemble provides an alternative — and often simpler — route to the thermodynamics of the two-state system studied earlier.
[example:Two State System In The Canonical Ensemble]
For a single particle with states $|\!\uparrow\rangle$ (energy $\varepsilon$) and $|\!\downarrow\rangle$ (energy $0$), the single-particle partition function is
\begin{align*}
Z_1 = e^{-\beta \cdot 0} + e^{-\beta \varepsilon} = 1 + e^{-\beta\varepsilon} = 2e^{-\beta\varepsilon/2}\cosh\left(\frac{\beta\varepsilon}{2}\right).
\end{align*}
For $N$ non-interacting particles, the partition function factorises: $Z = Z_1^N = \bigl(1 + e^{-\beta\varepsilon}\bigr)^N$.
The average energy is
\begin{align*}
\langle E \rangle = -\frac{\partial \ln Z}{\partial \beta} = -N\frac{\partial}{\partial\beta}\ln(1 + e^{-\beta\varepsilon}) = \frac{N\varepsilon}{e^{\beta\varepsilon} + 1}.
\end{align*}
This is identical to the microcanonical result obtained by inverting the temperature relation, confirming the equivalence of ensembles.
[/example]
## The Chemical Potential and Grand Canonical Ensemble
### Conserved Quantities and the Chemical Potential
So far, the number of particles $N$ has been held fixed. Many physical systems, however, involve particle exchange — gases leaking between containers, electrons flowing between metals, atoms adsorbing onto surfaces. When particle number can change, the accessible states are restricted by the value of $N$, and the entropy depends on it: $S = S(E, V, N)$.
The rate at which entropy changes with particle number at fixed $E$ and $V$ defines a new intensive quantity.
[definition:Chemical Potential]
The **chemical potential** $\mu$ is defined by
\begin{align*}
\mu = -T\frac{\partial S}{\partial N}\bigg|_{E, V}.
\end{align*}
[/definition]
The chemical potential plays the same role for particle exchange that temperature plays for energy exchange. By the same maximisation argument used for temperature: when two systems can exchange particles, entropy is maximised when $\mu_1 = \mu_2$. If $\mu_1 > \mu_2$, particles flow from system 1 to system 2 (from high chemical potential to low, analogous to energy flowing from high temperature to low).
The first law of thermodynamics generalises to include changes in particle number:
\begin{align*}
dE = T\,dS - p\,dV + \mu\,dN.
\end{align*}
The chemical potential $\mu$ is the energy cost of adding one particle to the system at fixed entropy and volume — a direct measure of how "reluctant" the system is to accept another particle.
### The Grand Canonical Ensemble
When both the energy and particle number of a system can fluctuate — maintained at fixed temperature $T$ and chemical potential $\mu$ by a reservoir — we are led to the grand canonical ensemble.
The derivation follows the same logic as the canonical ensemble. The system $\mathcal{S}$ is in contact with a reservoir $\mathcal{R}$ that can exchange both energy and particles. By the fundamental postulate applied to the combined (isolated) system, and expanding the reservoir's entropy as before, the probability that $\mathcal{S}$ is in a microstate $|n\rangle$ with energy $E_n$ and particle number $N_n$ is
\begin{align*}
P(n) = \frac{1}{\Xi}\,e^{-\beta(E_n - \mu N_n)}.
\end{align*}
[definition:Grand Partition Function]
The **grand partition function** (or **grand canonical partition function**) is
\begin{align*}
\Xi = \Xi(T, V, \mu) = \sum_n e^{-\beta(E_n - \mu N_n)},
\end{align*}
where the sum runs over all microstates $|n\rangle$ with any energy and any particle number.
[/definition]
The average energy and particle number are obtained by differentiation:
\begin{align*}
\langle E \rangle - \mu\langle N \rangle = -\frac{\partial \ln \Xi}{\partial \beta}, \qquad \langle N \rangle = \frac{1}{\beta}\frac{\partial \ln \Xi}{\partial \mu}.
\end{align*}
Just as in the canonical ensemble, fluctuations in both $E$ and $N$ are negligible in the thermodynamic limit, and all three ensembles give identical predictions for macroscopic observables.
### The Grand Canonical Potential
The thermodynamic potential associated with the grand canonical ensemble is obtained by a further Legendre transform.
[definition:Grand Canonical Potential]
The **grand canonical potential** is
\begin{align*}
\Phi = F - \mu N = E - TS - \mu N,
\end{align*}
with natural variables $(T, V, \mu)$. Its differential is
\begin{align*}
d\Phi = -S\,dT - p\,dV - N\,d\mu.
\end{align*}
[/definition]
By the same argument that gives $F = -k_B T \ln Z$ in the canonical ensemble, we have
\begin{align*}
\Phi = -k_B T \ln \Xi.
\end{align*}
### Extensive and Intensive Quantities
A quantity is **extensive** if it scales proportionally with the size of the system: doubling the system doubles the quantity. Energy $E$, volume $V$, particle number $N$, and entropy $S$ are all extensive. **Intensive** quantities — temperature $T$, pressure $p$, chemical potential $\mu$ — are independent of system size.
This scaling has powerful consequences. Since $S$ is extensive, it satisfies $S(\lambda E, \lambda V, \lambda N) = \lambda S(E, V, N)$ for all $\lambda > 0$. The same is true of the free energy: $F(T, \lambda V, \lambda N) = \lambda F(T, V, N)$.
The grand canonical potential $\Phi = F - \mu N$ is also extensive, and $\Phi(T, \lambda V, \mu) = \lambda \Phi(T, V, \mu)$. Since $\Phi$ depends on only one extensive variable ($V$), the only way this scaling can hold is if $\Phi$ is proportional to $V$. From $d\Phi = -S\,dT - p\,dV - N\,d\mu$, the coefficient of $dV$ is $-p$, so we conclude
\begin{align*}
\Phi = -p(T, \mu)\,V,
\end{align*}
a result that links the grand canonical potential directly to the pressure. This elegant identity is sometimes the quickest route to the equation of state.
# Classical Gases
The partition function machinery developed in Chapter 1 is general but abstract — it applies to any system, but computing $Z$ requires knowing all the energy levels. This chapter applies the framework to the simplest and most important class of systems: gases of classical particles. We begin by deriving the classical limit of the partition function, then work through the ideal gas in detail, obtaining the equation of state, entropy, and the Maxwell speed distribution. The chapter then turns to diatomic gases, where the interplay between classical and quantum physics produces a striking temperature-dependent heat capacity. Finally, we treat weakly interacting gases via the virial expansion and derive the van der Waals equation of state.
## The Classical Partition Function
### From Quantum Sums to Phase-Space [Integrals](/page/Integral)
In quantum mechanics, the partition function is a sum over discrete energy eigenstates: $Z = \sum_n e^{-\beta E_n}$. In classical mechanics, the state of a particle is not a discrete label but a point in **phase space** — specified by its position $q$ and momentum $p$. The energy is given by the Hamiltonian $H(q, p)$.
For a single particle moving in three dimensions, $q = (q_1, q_2, q_3)$ and $p = (p_1, p_2, p_3)$, so phase space is six-dimensional. For a general Hamiltonian of the form
\begin{align*}
H = \frac{|p|^2}{2m} + V(q),
\end{align*}
the classical partition function replaces the quantum sum with an integral over phase space.
[definition:Classical Partition Function]
The **classical partition function** for a single particle in three dimensions is
\begin{align*}
Z_1 = \frac{1}{h^3}\int d^3p\,d^3q\; e^{-\beta H(q, p)},
\end{align*}
where $h$ is Planck's constant.
[/definition]
The factor of $h^3$ is needed on dimensional grounds: $[h] = [\text{length}][\text{momentum}] = \mathrm{J\cdot s}$, so $h^3$ has the dimensions of a volume element in phase space, making $Z_1$ dimensionless. The precise value $h = 2\pi\hbar$ (with $\hbar$ the reduced Planck constant) can be derived by taking the classical limit of the quantum partition function, as shown in Tong §2.1.1.
The key point is that $h$ does not appear in any measurable thermodynamic quantity. All observables involve [derivatives](/page/Derivative) of $\ln Z$, and since $h$ enters $Z$ only as a multiplicative constant, it drops out upon differentiation. The factor is bookkeeping — necessary for absolute entropy but invisible in equations of state, heat capacities, and energy.
## The Ideal Gas
### Definition and Partition Function
The ideal gas is the simplest model of a gas: $N$ particles confined to a volume $V$, with no interactions between them. The Hamiltonian is purely kinetic.
[definition:Ideal Gas]
An **ideal gas** consists of $N$ non-interacting particles in a box of volume $V$. The Hamiltonian is
\begin{align*}
H = \sum_{i=1}^{N} \frac{|p_i|^2}{2m}.
\end{align*}
[/definition]
For a single particle, the position and momentum integrals factorise because there is no potential:
\begin{align*}
Z_1 = \frac{1}{h^3}\int d^3q\int d^3p\; e^{-\beta |p|^2/2m} = \frac{V}{h^3}\int d^3p\; e^{-\beta |p|^2/2m}.
\end{align*}
The position integral gives a factor of $V$ (the particle can be anywhere in the box). The momentum integral is a product of three independent Gaussian integrals. Using $\int_{-\infty}^{\infty} dx\, e^{-ax^2} = \sqrt{\pi/a}$ with $a = \beta/(2m)$:
\begin{align*}
\int d^3p\; e^{-\beta |p|^2/2m} = \left(\frac{2\pi m}{\beta}\right)^{3/2} = (2\pi m k_B T)^{3/2}.
\end{align*}
This motivates the definition of a characteristic length scale.
[definition:Thermal De Broglie Wavelength]
The **thermal de Broglie wavelength** is
\begin{align*}
\lambda = \sqrt{\frac{2\pi\hbar^2}{mk_BT}} = \frac{h}{(2\pi m k_B T)^{1/2}}.
\end{align*}
[/definition]
In terms of $\lambda$, the single-particle partition function takes the clean form
\begin{align*}
Z_1 = \frac{V}{\lambda^3}.
\end{align*}
The thermal de Broglie wavelength has a direct physical interpretation: it is the quantum-mechanical wavelength associated with a particle whose kinetic energy is of order $k_B T$. When $\lambda$ is much smaller than the typical interparticle spacing $(V/N)^{1/3}$, quantum effects are negligible and the classical treatment is valid. The condition for classicality is therefore $\lambda \ll (V/N)^{1/3}$, or equivalently $N\lambda^3/V \ll 1$.
### The Ideal Gas Law
For $N$ non-interacting particles, the partition function factorises: $Z = Z_1^N$ (we will refine this shortly to account for indistinguishability). The free energy is
\begin{align*}
F = -k_B T \ln Z = -Nk_B T \ln\frac{V}{\lambda^3},
\end{align*}
and the pressure follows immediately:
\begin{align*}
p = -\frac{\partial F}{\partial V}\bigg|_T = \frac{Nk_BT}{V}.
\end{align*}
[theorem:Ideal Gas Law]
For an ideal gas of $N$ particles at temperature $T$ in volume $V$:
\begin{align*}
pV = Nk_BT.
\end{align*}
[/theorem]
This is the **equation of state** for an ideal gas. It works well for real gases at low densities, where interactions between atoms are negligible. The result also confirms that our statistical-mechanical definition of temperature coincides with the temperature measured by an ideal gas thermometer.
### Energy and Equipartition
The average energy of the ideal gas is
\begin{align*}
\langle E \rangle = -\frac{\partial \ln Z}{\partial \beta} = \frac{3N}{2\beta} = \frac{3}{2}Nk_BT = 3N \cdot \frac{1}{2}k_BT.
\end{align*}
The factor of $3$ counts the number of independent directions in which each particle can move — the three translational **degrees of freedom**. Each degree of freedom contributes $\frac{1}{2}k_BT$ to the average energy. This is a special case of a general result.
[theorem:Equipartition Of Energy]
In a classical system at temperature $T$, each quadratic degree of freedom in the Hamiltonian (i.e. each term proportional to $p_i^2$ or $q_i^2$) contributes $\frac{1}{2}k_BT$ to the average energy.
[/theorem]
[proof]
Consider a single quadratic term $H_{\mathrm{quad}} = \alpha x^2$ appearing in the Hamiltonian, where $x$ is some generalised coordinate or momentum. Its contribution to the partition function is $\int dx\, e^{-\beta \alpha x^2} = \sqrt{\pi/(\beta\alpha)}$. The corresponding average energy is
\begin{align*}
\langle H_{\mathrm{quad}} \rangle = -\frac{\partial}{\partial \beta}\ln\sqrt{\frac{\pi}{\beta\alpha}} = -\frac{\partial}{\partial\beta}\left(-\frac{1}{2}\ln\beta + \text{const}\right) = \frac{1}{2\beta} = \frac{1}{2}k_BT.
\end{align*}
Since each quadratic term contributes independently to the partition function (via factorisation), the result applies to each degree of freedom separately.
[/proof]
For a monatomic ideal gas with $3N$ translational degrees of freedom, equipartition gives $\langle E \rangle = \frac{3}{2}Nk_BT$, and the heat capacity is
\begin{align*}
C_V = \frac{\partial \langle E \rangle}{\partial T} = \frac{3}{2}Nk_B.
\end{align*}
The de Broglie wavelength satisfies $\lambda \propto 1/\sqrt{T}$, so $\langle E \rangle = \frac{3}{2}Nk_BT$ can be rewritten as $\langle E \rangle \propto \langle p^2 \rangle / m$, confirming that $\lambda$ is the wavelength of a particle with typical thermal momentum.
### Boltzmann's Constant and the Scale of Atoms
The ideal gas law $pV = Nk_BT$ provides a direct link between the microscopic world (particle number $N$, Boltzmann's constant $k_B$) and macroscopic measurements ($p$, $V$, $T$). For gases at standard conditions, $p$, $V$, and $T$ are all of "reasonable" magnitude — of order $10^5\,\mathrm{Pa}$, $10^{-2}\,\mathrm{m^3}$, and $10^2\,\mathrm{K}$ respectively. For this to be consistent, $Nk_B$ must be of order $1\,\mathrm{J\,K^{-1}}$. Since $k_B \approx 10^{-23}\,\mathrm{J\,K^{-1}}$, we need $N \sim 10^{23}$. The extreme smallness of $k_B$ is not a peculiarity of thermodynamics — it is a reflection of the fact that atoms are very small and very numerous.
### Entropy and the Gibbs Paradox
We said $Z = Z_1^N$ for $N$ non-interacting particles, but this overcounts: quantum particles are **indistinguishable**. Swapping two particles produces the same physical state (up to a sign for fermions), so $Z_1^N$ counts each configuration $N!$ times. The correct partition function is
\begin{align*}
Z_{\mathrm{ideal}} = \frac{Z_1^N}{N!} = \frac{1}{N!}\left(\frac{V}{\lambda^3}\right)^N.
\end{align*}
The $N!$ does not affect the pressure or energy (both involve derivatives of $\ln Z$ with respect to $\beta$ or $V$, and $\ln N!$ is a constant). It does, however, affect the entropy.
Using Stirling's approximation $\ln N! \approx N\ln N - N$, the free energy becomes
\begin{align*}
F = -k_BT\left[N\ln\frac{V}{\lambda^3} - N\ln N + N\right] = -Nk_BT\left[\ln\frac{V}{N\lambda^3} + 1\right],
\end{align*}
and the entropy is
\begin{align*}
S = -\frac{\partial F}{\partial T}\bigg|_V = Nk_B\left[\ln\frac{V}{N\lambda^3} + \frac{5}{2}\right].
\end{align*}
[theorem:Sackur Tetrode Equation]
The entropy of an ideal gas of $N$ identical particles is
\begin{align*}
S = Nk_B\left[\ln\frac{V}{N\lambda^3} + \frac{5}{2}\right].
\end{align*}
[/theorem]
Without the $N!$ correction, the entropy would not be extensive: doubling $N$ and $V$ simultaneously (keeping density fixed) would not double $S$, because $\ln V$ would appear without the compensating $\ln N$. This failure of extensivity for distinguishable particles is the **Gibbs paradox**. In classical mechanics, the $N!$ factor had to be inserted by hand and was not fully understood until quantum mechanics provided the resolution: identical particles are fundamentally indistinguishable.
### The Ideal Gas in the Grand Canonical Ensemble
When the particle number fluctuates at fixed chemical potential $\mu$ and temperature $T$, the grand partition function for the ideal gas is
\begin{align*}
\Xi = \sum_{N=0}^{\infty} e^{\beta\mu N} Z_{\mathrm{ideal}}(N) = \sum_{N=0}^{\infty} \frac{1}{N!}\left(\frac{e^{\beta\mu}V}{\lambda^3}\right)^N = \exp\left(\frac{e^{\beta\mu}V}{\lambda^3}\right).
\end{align*}
The average particle number is
\begin{align*}
\langle N \rangle = \frac{1}{\beta}\frac{\partial \ln \Xi}{\partial \mu} = \frac{e^{\beta\mu}V}{\lambda^3}.
\end{align*}
Writing $\langle N \rangle = N$, this gives the chemical potential as a function of density and temperature:
\begin{align*}
\mu = k_BT\ln\frac{N\lambda^3}{V}.
\end{align*}
Since classicality requires $N\lambda^3/V \ll 1$, the argument of the logarithm is much less than one, and $\mu < 0$ for a classical ideal gas. Physically, the sign is natural: adding a particle to an ideal gas at fixed energy increases the entropy (more configurations available), so the system *wants* more particles. The negative $\mu$ reflects this — energy must be *removed* to keep the system in equilibrium after adding a particle.
The equation of state follows from $pV = k_BT\ln\Xi = k_BT \cdot e^{\beta\mu}V/\lambda^3 = Nk_BT$, recovering the ideal gas law as expected.
## The Maxwell Distribution
### Speed Distribution of Gas Particles
Not all particles in a gas move at the same speed. The partition function tells us the average energy, but we can extract more detailed information — the full probability distribution over speeds.
For a single particle with $Z_1 = V \int d^3p\, e^{-\beta |p|^2/2m}/h^3$, the probability of having momentum in the range $[p, p + d^3p]$ is proportional to $e^{-\beta |p|^2/2m}\,d^3p$. Changing variables to $v = p/m$ and using the isotropy of the distribution (only $|v| = v$ matters), we convert the volume element $d^3v = 4\pi v^2\,dv$ and obtain the following.
[definition:Maxwell Speed Distribution]
The probability that a particle in an ideal gas at temperature $T$ has speed between $v$ and $v + dv$ is $f(v)\,dv$, where
\begin{align*}
f(v) = 4\pi \left(\frac{m}{2\pi k_BT}\right)^{3/2} v^2\, e^{-mv^2/2k_BT}.
\end{align*}
The distribution is normalised: $\int_0^\infty f(v)\,dv = 1$.
[/definition]
The shape of $f(v)$ reflects two competing effects: the Boltzmann factor $e^{-mv^2/2k_BT}$ suppresses high speeds, while the phase-space factor $4\pi v^2$ (the surface area of a sphere of radius $v$ in velocity space) enhances them — there are more ways for a particle to have speed $v$ if $v$ is large. The result is a distribution that rises from zero, peaks at a characteristic speed, and then falls off exponentially.
For heavier particles at the same temperature, the distribution is narrower and peaked at lower speeds: the Boltzmann factor decays more rapidly with $v$ when $m$ is large.
[example:Mean Square Speed From The Maxwell Distribution]
As a consistency check, we compute $\langle v^2 \rangle$ from the Maxwell distribution and verify that it agrees with the equipartition result $\langle E \rangle = \frac{1}{2}m\langle v^2 \rangle = \frac{3}{2}k_BT$.
\begin{align*}
\langle v^2 \rangle &= \int_0^\infty v^2 f(v)\,dv = 4\pi\left(\frac{m}{2\pi k_BT}\right)^{3/2}\int_0^\infty v^4 e^{-mv^2/2k_BT}\,dv.
\end{align*}
The integral $\int_0^\infty v^4 e^{-av^2}\,dv = \frac{3}{8}\sqrt{\pi/a^5}$ with $a = m/(2k_BT)$ gives
\begin{align*}
\langle v^2 \rangle = 4\pi\left(\frac{m}{2\pi k_BT}\right)^{3/2} \cdot \frac{3}{8}\sqrt{\frac{\pi}{(m/2k_BT)^5}} = \frac{3k_BT}{m},
\end{align*}
so $\frac{1}{2}m\langle v^2 \rangle = \frac{3}{2}k_BT$, in agreement with equipartition.
[/example]
## Diatomic Gases
### Internal Degrees of Freedom
A molecule made of two atoms has more ways to store energy than a single atom. In addition to translational motion of the centre of mass, the molecule can **rotate** about axes perpendicular to its symmetry axis, and the two atoms can **vibrate** along the axis of symmetry.
If these modes are independent (a good approximation for small oscillations and moderate temperatures), the single-molecule partition function factorises:
\begin{align*}
Z_1 = Z_{\mathrm{trans}} \cdot Z_{\mathrm{rot}} \cdot Z_{\mathrm{vib}}.
\end{align*}
We already know $Z_{\mathrm{trans}} = V/\lambda^3$, contributing $\frac{3}{2}k_BT$ per molecule to the energy. We now compute the rotational and vibrational contributions.
### Rotations
A diatomic molecule can rotate about two independent axes perpendicular to the bond (rotations about the bond axis itself do not contribute — there is no moment of inertia about this axis for point-like atoms). Let $\theta$ and $\phi$ be the polar and azimuthal angles specifying the orientation, and let $p_\theta$, $p_\phi$ be the conjugate momenta. The rotational Hamiltonian is
\begin{align*}
H_{\mathrm{rot}} = \frac{1}{2I}\left(p_\theta^2 + \frac{p_\phi^2}{\sin^2\theta}\right),
\end{align*}
where $I$ is the moment of inertia about a perpendicular axis.
The classical rotational partition function involves integrating over all orientations and angular momenta:
\begin{align*}
Z_{\mathrm{rot}} = \frac{1}{h^2}\int_0^\pi d\theta\int_0^{2\pi} d\phi\int dp_\theta\int dp_\phi\; e^{-\beta H_{\mathrm{rot}}}.
\end{align*}
The $p_\theta$ integral is a Gaussian, and the $p_\phi$ integral is also Gaussian (with width depending on $\theta$). After evaluating these:
\begin{align*}
Z_{\mathrm{rot}} = \frac{2I}{\beta\hbar^2} = \frac{2Ik_BT}{\hbar^2}.
\end{align*}
By equipartition (two quadratic degrees of freedom $p_\theta$ and $p_\phi$), the rotational energy per molecule is
\begin{align*}
\langle E_{\mathrm{rot}} \rangle = k_BT,
\end{align*}
contributing $k_BT$ per molecule, or $Nk_B$ to the total heat capacity.
### Vibrations
Along the bond axis, the two atoms undergo small oscillations about their equilibrium separation. Modelling this as a classical harmonic oscillator with frequency $\omega$ (determined by the strength of the molecular bond):
\begin{align*}
H_{\mathrm{vib}} = \frac{p^2}{2m_{\mathrm{red}}} + \frac{1}{2}m_{\mathrm{red}}\omega^2 x^2,
\end{align*}
where $m_{\mathrm{red}}$ is the reduced mass and $x$ is the displacement from equilibrium.
The classical vibrational partition function is
\begin{align*}
Z_{\mathrm{vib}} = \frac{1}{h}\int dx\int dp\; e^{-\beta H_{\mathrm{vib}}} = \frac{k_BT}{\hbar\omega}.
\end{align*}
By equipartition (one quadratic kinetic term and one quadratic potential term):
\begin{align*}
\langle E_{\mathrm{vib}} \rangle = k_BT,
\end{align*}
contributing another $Nk_B$ to the heat capacity.
### Classical Prediction vs Experiment
Combining all contributions, the classical prediction for a diatomic gas is
\begin{align*}
\langle E \rangle = \frac{3}{2}Nk_BT + Nk_BT + Nk_BT = \frac{7}{2}Nk_BT, \qquad C_V = \frac{7}{2}Nk_B.
\end{align*}
This disagrees with experiment. Measurements on diatomic gases such as $\mathrm{H_2}$ show that $C_V$ depends on temperature: at low temperatures $C_V \approx \frac{3}{2}Nk_B$ (translation only), rising to $\frac{5}{2}Nk_B$ at intermediate temperatures (translation + rotation), and only approaching $\frac{7}{2}Nk_B$ at very high temperatures (translation + rotation + vibration).
The resolution is quantum mechanical. Rotation and vibration have discrete energy levels, and a mode only contributes to the heat capacity when $k_BT$ is comparable to or larger than the spacing between its energy levels. Below this threshold, the mode is **frozen out**.
### Quantum Freezing of Rotational Modes
The quantum energy levels of a rigid rotor are $E_\ell = \frac{\hbar^2}{2I}\ell(\ell+1)$ for $\ell = 0, 1, 2, \ldots$, with degeneracy $2\ell + 1$. The quantum rotational partition function is
\begin{align*}
Z_{\mathrm{rot}} = \sum_{\ell=0}^{\infty}(2\ell+1)\,e^{-\beta\hbar^2 \ell(\ell+1)/2I}.
\end{align*}
At high temperatures ($k_BT \gg \hbar^2/2I$), many terms contribute, the sum can be approximated by an integral, and one recovers the classical result $Z_{\mathrm{rot}} \approx 2Ik_BT/\hbar^2$. At low temperatures ($k_BT \ll \hbar^2/2I$), only the $\ell = 0$ term survives: $Z_{\mathrm{rot}} \approx 1$, giving $\langle E_{\mathrm{rot}} \rangle \approx 0$ and $C_{V,\mathrm{rot}} \approx 0$. The rotational mode is frozen out.
### Quantum Freezing of Vibrational Modes
The quantum harmonic oscillator has energy levels $E_n = \hbar\omega(n + \frac{1}{2})$ for $n = 0, 1, 2, \ldots$. The partition function is a geometric series:
\begin{align*}
Z_{\mathrm{vib}} = \sum_{n=0}^{\infty} e^{-\beta\hbar\omega(n+1/2)} = \frac{e^{-\beta\hbar\omega/2}}{1 - e^{-\beta\hbar\omega}}.
\end{align*}
At high temperatures ($k_BT \gg \hbar\omega$), $\beta\hbar\omega \ll 1$ and $Z_{\mathrm{vib}} \approx k_BT/\hbar\omega$, recovering the classical result. At low temperatures ($k_BT \ll \hbar\omega$), $Z_{\mathrm{vib}} \approx e^{-\beta\hbar\omega/2}$ and the vibrational energy is stuck at the zero-point value $\frac{1}{2}\hbar\omega$, contributing nothing to $C_V$.
Since the vibrational energy spacing $\hbar\omega$ is typically much larger than the rotational spacing $\hbar^2/2I$, vibrations freeze out at a higher temperature than rotations. This explains the stepwise increase in $C_V$ as temperature rises: first translations only, then rotations turn on, and finally vibrations. This temperature-dependent heat capacity was one of the first experimental signatures of quantum mechanics.
## Interacting Gases
### The Virial Expansion
Real gases are not ideal: atoms interact. At low densities, these interactions are weak, and we can treat them perturbatively. The equation of state for a general gas can be written as an expansion in powers of the density $N/V$:
\begin{align*}
\frac{p}{k_BT} = \frac{N}{V} + B_2(T)\left(\frac{N}{V}\right)^2 + B_3(T)\left(\frac{N}{V}\right)^3 + \cdots
\end{align*}
[definition:Virial Expansion]
The **virial expansion** is the expansion of the equation of state in powers of the density $N/V$. The coefficients $B_n(T)$ are called **virial coefficients** and encode the effects of $n$-body interactions.
[/definition]
The first term gives the ideal gas law. The goal is to compute $B_2(T)$ — the leading correction due to pairwise interactions — from first principles.
### The Interatomic Potential
The interaction between two neutral atoms at separation $r$ has two characteristic features: strong short-range repulsion (from the Pauli exclusion principle preventing electron clouds from overlapping) and weak long-range attraction (from induced dipole–dipole interactions, with potential energy falling as $r^{-6}$). A commonly used model is the **Lennard-Jones potential**:
\begin{align*}
U(r) = U_0\left[\left(\frac{r_0}{r}\right)^{12} - \left(\frac{r_0}{r}\right)^6\right],
\end{align*}
where $r_0$ is the equilibrium separation and $U_0$ is the depth of the potential well. For the calculations below, we use a simpler model that captures the essential physics: a hard-core repulsion at $r < r_0$, supplemented by a weak attractive tail for $r > r_0$.
### Computing the Second Virial Coefficient
Consider $N$ particles with pairwise interactions $U(r_{ij})$, where $r_{ij} = |r_i - r_j|$. The partition function is
\begin{align*}
Z(N, V, T) = \frac{1}{N!}\left(\frac{1}{\lambda^3}\right)^N \int \prod_{i=1}^N d^3r_i\; e^{-\beta\sum_{i<j} U(r_{ij})}.
\end{align*}
The momentum integrals have already been performed (giving $\lambda^{-3N}$); the remaining integral over positions is called the **configuration integral**.
To expand perturbatively, define the **Mayer $f$-function**:
\begin{align*}
f(r) = e^{-\beta U(r)} - 1.
\end{align*}
This function vanishes when $U = 0$ (no interaction), is $-1$ for hard-core repulsion ($U \to \infty$), and decays to zero at large $r$ (where $U \to 0$). Writing $e^{-\beta U} = 1 + f$, the configuration integral becomes
\begin{align*}
\int \prod_i d^3r_i\;\prod_{i<j}(1 + f_{ij}) = \int \prod_i d^3r_i\;\left(1 + \sum_{i<j}f_{ij} + \cdots\right).
\end{align*}
The zeroth-order term (no interactions) gives $V^N$, recovering $Z_{\mathrm{ideal}}$. Each first-order term involving $f_{ij}$ contributes identically. For a typical pair, say $(1, 2)$:
\begin{align*}
\int d^3r_1\,d^3r_2\; f(r_{12}) \cdot V^{N-2} = V^{N-1}\int d^3r\; f(r),
\end{align*}
where we changed variables to the relative coordinate $r = r_1 - r_2$ and the centre of mass. There are $\binom{N}{2} \approx N^2/2$ such pairs. Collecting terms:
\begin{align*}
Z = Z_{\mathrm{ideal}}\left(1 + \frac{N^2}{2V}\int d^3r\; f(r) + \cdots\right).
\end{align*}
The free energy is $F = F_{\mathrm{ideal}} - Nk_BT \frac{N}{2V}\int d^3r\; f(r) + \cdots$, and differentiating with respect to $V$ gives the pressure:
\begin{align*}
p = \frac{Nk_BT}{V}\left(1 - \frac{N}{2V}\int d^3r\; f(r) + \cdots\right).
\end{align*}
Comparing with the virial expansion identifies the second virial coefficient:
\begin{align*}
B_2(T) = -\frac{1}{2}\int d^3r\; f(r) = -\frac{1}{2}\int d^3r\;\bigl(e^{-\beta U(r)} - 1\bigr).
\end{align*}
The sign of $B_2$ depends on whether repulsion or attraction dominates: repulsion ($U > 0$) gives $f < 0$ and $B_2 > 0$ (increased pressure), while attraction ($U < 0$) gives $f > 0$ and $B_2 < 0$ (decreased pressure).
### The Van der Waals Equation
Evaluating $B_2(T)$ for the hard-core plus attractive-tail potential,
\begin{align*}
U(r) = \begin{cases} \infty & r < r_0, \\ -U_0(r_0/r)^6 & r \geq r_0, \end{cases}
\end{align*}
we split the integral into two regions. For $r < r_0$, $f(r) = e^{-\beta\cdot\infty} - 1 = -1$, giving a contribution $\frac{1}{2} \cdot \frac{4}{3}\pi r_0^3$. For $r \geq r_0$, at high temperatures ($\beta U_0 \ll 1$), we expand $e^{\beta U_0(r_0/r)^6} \approx 1 + \beta U_0(r_0/r)^6$, so $f(r) \approx \beta U_0(r_0/r)^6$, giving a contribution $-\frac{1}{2}\cdot 4\pi\beta U_0 r_0^3/3$.
Defining
\begin{align*}
b = \frac{2}{3}\pi r_0^3, \qquad a = \frac{2}{3}\pi U_0 r_0^3,
\end{align*}
the equation of state becomes
\begin{align*}
k_BT = \left(p + a\frac{N^2}{V^2}\right)\left(\frac{V}{N} - b\right).
\end{align*}
[theorem:Van Der Waals Equation Of State]
The **van der Waals equation of state** for $N$ interacting particles is
\begin{align*}
\left(p + a\frac{N^2}{V^2}\right)\left(\frac{V}{N} - b\right) = Nk_BT.
\end{align*}
The parameter $a > 0$ accounts for attractive interactions (reducing the effective pressure), and $b > 0$ accounts for the finite volume of each atom (reducing the available volume).
[/theorem]
The parameter $b$ is related to the volume of each atom, but with a factor of $2$: the **excluded volume** around each atom (the region inaccessible to the centre of another atom) is $\frac{4}{3}\pi r_0^3 = 2b$, not $b$. The factor of $2$ arises because exclusion is a pairwise effect: the total excluded volume in a system of $N$ atoms is $N \cdot 2b / 2 = Nb$ (dividing by $2$ to avoid double-counting pairs).
The van der Waals equation is the simplest model that captures both the finite size of atoms and the attractive interactions between them. Despite being only a leading-order approximation, it predicts qualitatively correct behaviour including the liquid-gas phase transition and the existence of a critical point — topics we will return to in Chapter 5.
# Quantum Gases
When the thermal de Broglie wavelength $\lambda$ becomes comparable to the interparticle spacing $(V/N)^{1/3}$, the classical treatment of Chapter 2 breaks down and quantum effects become essential. This chapter develops the statistical mechanics of quantum gases — systems where the indistinguishability of particles is not merely a bookkeeping device (the $N!$ correction) but fundamentally shapes the physics.
The chapter opens with the density of states, which converts sums over quantum numbers into integrals over energy. We then treat three physically important systems — photons (blackbody radiation), phonons (lattice vibrations), and the diatomic gas revisited — before developing the full quantum statistical mechanics of bosons and fermions. The Bose-Einstein and Fermi-Dirac [distributions](/page/Distribution) lead to dramatically different low-temperature physics: Bose-Einstein condensation for bosons, and degeneracy pressure for fermions.
## Density of States
### From Discrete Sums to Energy Integrals
Consider a non-relativistic gas of particles confined to a cubic box with sides of length $L$, so $V = L^3$. Imposing periodic [boundary](/page/Boundary) conditions, the allowed wavevectors are $k = \frac{2\pi}{L}(n_1, n_2, n_3)$ with $n_i \in \mathbb{Z}$. For a single particle, the energy is
\begin{align*}
E_n = \frac{\hbar^2 |k|^2}{2m} = \frac{(2\pi\hbar)^2}{2mL^2}(n_1^2 + n_2^2 + n_3^2).
\end{align*}
The single-particle partition function is $Z_1 = \sum_n e^{-\beta E_n}$. The exponent scales as $\beta E \sim (\lambda/L)^2$, so for large volumes ($L \gg \lambda$), the energy levels are finely spaced and we can replace the sum by an integral:
\begin{align*}
\sum_n \to \int d^3n = \int \frac{L^3}{(2\pi)^3}\,d^3k = \int \frac{V}{(2\pi)^3}\,d^3k.
\end{align*}
Changing variables from $k$ to energy $E = \hbar^2 k^2/2m$ and using the spherical shell $4\pi k^2\,dk$:
\begin{align*}
Z_1 = \int_0^\infty g(E)\,e^{-\beta E}\,dE,
\end{align*}
where $g(E)$ is the density of states.
[definition:Density Of States]
The **density of states** $g(E)$ is the function such that $g(E)\,dE$ gives the number of single-particle quantum states with energy between $E$ and $E + dE$. For a non-relativistic particle in three dimensions:
\begin{align*}
g(E) = \frac{V}{4\pi^2}\left(\frac{2m}{\hbar^2}\right)^{3/2} E^{1/2}.
\end{align*}
[/definition]
The $\sqrt{E}$ dependence reflects the geometry of the energy shell in momentum space: higher energy corresponds to a larger sphere, so there are more states. For relativistic particles with $E = \hbar c |k|$, the same procedure gives $g(E) \propto E^2$, and for massless particles $g(E) = VE^2/(\pi^2\hbar^3c^3)$.
## Photons
### Blackbody Radiation
A gas of photons in thermal equilibrium at temperature $T$ is called **blackbody radiation** — the electromagnetic radiation emitted by an idealised object that absorbs all incident light. The spectrum of this radiation was one of the central puzzles of late 19th-century physics, and its resolution by Planck in 1900 launched quantum mechanics.
Photons are massless particles with energy $E = \hbar\omega$ (where $\omega$ is the angular frequency), wavelength $\lambda = 2\pi c/\omega$, and two polarisation states. The density of states for a single photon with energy between $E$ and $E + dE$ is therefore
\begin{align*}
g(E)\,dE = 2 \cdot \frac{VE^2}{\pi^2\hbar^3c^3}\,dE,
\end{align*}
where the factor of $2$ accounts for the two polarisations. Rewriting in terms of frequency using $E = \hbar\omega$:
\begin{align*}
g(\omega)\,d\omega = \frac{V\omega^2}{\pi^2c^3}\,d\omega.
\end{align*}
A crucial property of photons is that they are **not conserved**: the number of photons in the cavity is not fixed, and states with any number of photons are accessible. This means we must sum over all possible photon numbers in the partition function. For photons of a single frequency $\omega$, a state with $n$ photons has energy $E_n = n\hbar\omega$, and the partition function is a geometric series:
\begin{align*}
Z_\omega = \sum_{n=0}^\infty e^{-n\beta\hbar\omega} = \frac{1}{1 - e^{-\beta\hbar\omega}}.
\end{align*}
Including all frequencies, $\ln Z = \int_0^\infty d\omega\, g(\omega) \ln Z_\omega = -\int_0^\infty d\omega\, \frac{V\omega^2}{\pi^2c^3}\ln(1 - e^{-\beta\hbar\omega})$.
The average energy of photons with frequency between $\omega$ and $\omega + d\omega$ is $\mathcal{E}(\omega)\,d\omega$, where
[definition:Planck Distribution]
The **Planck distribution** gives the energy density per unit frequency of blackbody radiation:
\begin{align*}
\mathcal{E}(\omega) = \frac{V}{\pi^2c^3}\frac{\hbar\omega^3}{e^{\beta\hbar\omega} - 1}.
\end{align*}
[/definition]
The Planck distribution interpolates between two regimes. At low frequencies ($\hbar\omega \ll k_BT$), expanding $e^{\beta\hbar\omega} \approx 1 + \beta\hbar\omega$ gives $\mathcal{E}(\omega) \approx V\omega^2 k_BT/(\pi^2c^3)$ — this is the **Rayleigh-Jeans law**, which is the classical result obtained by assigning energy $k_BT$ to each mode. At high frequencies ($\hbar\omega \gg k_BT$), the exponential dominates and $\mathcal{E}(\omega)$ falls off as $e^{-\beta\hbar\omega}$ — the quantum suppression that resolves the classical **ultraviolet catastrophe** (the divergence $E = \int_0^\infty \mathcal{E}\,d\omega \to \infty$ that would follow from the Rayleigh-Jeans law).
### Wien's Law and the Stefan-Boltzmann Law
The Planck distribution peaks at a frequency $\omega_{\max}$ determined by $\partial\mathcal{E}/\partial\omega = 0$. Writing $x = \beta\hbar\omega$, the condition becomes $3(1 - e^{-x}) = x$, which gives $x \approx 2.822$.
[theorem:Wien Displacement Law]
The frequency at which blackbody radiation is most intense is proportional to the temperature:
\begin{align*}
\hbar\omega_{\max} \approx 2.822\,k_BT.
\end{align*}
For sunlight ($T \approx 5800\,\mathrm{K}$), this corresponds to a wavelength of approximately $500\,\mathrm{nm}$ — visible light.
[/theorem]
The total energy is obtained by integrating over all frequencies. Substituting $x = \beta\hbar\omega$:
\begin{align*}
E = \int_0^\infty \mathcal{E}(\omega)\,d\omega = \frac{V}{\pi^2c^3}\frac{(k_BT)^4}{\hbar^3}\int_0^\infty \frac{x^3}{e^x - 1}\,dx = \frac{\pi^2V(k_BT)^4}{15\hbar^3c^3},
\end{align*}
where we used $\int_0^\infty x^3/(e^x - 1)\,dx = \pi^4/15$.
[theorem:Stefan Boltzmann Law]
The energy flux (power per unit area) radiated by a blackbody at temperature $T$ is
\begin{align*}
j = \sigma T^4, \qquad \sigma = \frac{\pi^2k_B^4}{60\hbar^3c^2}
\end{align*}
where $\sigma$ is Stefan's constant. The factor relating the energy density $E/V$ to the flux includes a geometric factor of $c/4$ from averaging the velocity component normal to the surface over the hemisphere.
[/theorem]
The free energy, entropy, and heat capacity follow from $F = k_BT\ln Z$:
\begin{align*}
F = -\frac{\pi^2V(k_BT)^4}{45\hbar^3c^3}, \qquad S = \frac{4\pi^2Vk_B(k_BT)^3}{45\hbar^3c^3}, \qquad C_V = \frac{4\pi^2Vk_B(k_BT)^3}{15\hbar^3c^3}.
\end{align*}
The radiation pressure is $p = -\partial F/\partial V = E/(3V)$ — one third of the energy density, a result characteristic of massless particles in three dimensions.
The most precise measurement of blackbody radiation is the **cosmic microwave background** (CMB), relic radiation from the early universe at $T \approx 2.7\,\mathrm{K}$. Its spectrum matches the Planck distribution to extraordinary precision.
## The Debye Model of Phonons
### Phonons as Quantised Sound Waves
The vibrations of a crystal lattice — sound waves — are also quantised in discrete energy packets called **phonons**. A phonon of wavevector $k$ has energy $E = \hbar\omega(k)$, where $\omega(k)$ is the dispersion relation. For long wavelengths (small $k$), the dispersion is linear: $\omega = c_s k$, where $c_s$ is the speed of sound. (At shorter wavelengths, the dispersion bends over and saturates, since wavelengths shorter than the lattice spacing $a$ have no physical meaning.)
Unlike photons, phonons have **three polarisations** (two transverse and one longitudinal), and there is a **maximum frequency** $\omega_D$ — the Debye frequency — set by the atomic spacing. The Debye model approximates the true dispersion as linear up to a sharp cutoff at $\omega_D$.
[definition:Debye Frequency]
The **Debye frequency** $\omega_D$ and **Debye temperature** $T_D = \hbar\omega_D/k_B$ are defined by requiring that the total number of single-phonon states equals the number of degrees of freedom of the lattice:
\begin{align*}
\int_0^{\omega_D} g(\omega)\,d\omega = 3N,
\end{align*}
where $g(\omega) = 3V\omega^2/(\pi^2 c_s^3)$ and $3N$ is the number of vibrational degrees of freedom of $N$ atoms. This gives $\omega_D = c_s(6\pi^2 N/V)^{1/3}$.
[/definition]
Typical values are $T_D \sim 100\,\mathrm{K}$ for lead (soft material, low-frequency vibrations) and $T_D \sim 2000\,\mathrm{K}$ for diamond (hard material, high-frequency vibrations). By the time the temperature reaches $T_D$, phonons of all allowed frequencies can be excited.
### Heat Capacity
Like photons, phonons are not conserved — they can be created and destroyed by thermal fluctuations. For a single frequency, the partition function is the same as for photons: $Z_\omega = 1/(1 - e^{-\beta\hbar\omega})$. The total energy is
\begin{align*}
\langle E \rangle = \int_0^{\omega_D} d\omega\, g(\omega)\frac{\hbar\omega}{e^{\beta\hbar\omega} - 1}.
\end{align*}
Substituting $x = \beta\hbar\omega$ and $x_D = T_D/T$:
\begin{align*}
\langle E \rangle = 9Nk_BT\left(\frac{T}{T_D}\right)^3\int_0^{x_D}\frac{x^3}{e^x - 1}\,dx.
\end{align*}
[example:Debye Heat Capacity In Limiting Cases]
**High temperature ($T \gg T_D$):** The upper limit $x_D = T_D/T \ll 1$, so the integrand can be Taylor expanded: $x^3/(e^x - 1) \approx x^2$ for small $x$. The integral gives $x_D^3/3$, so
\begin{align*}
\langle E \rangle \approx 9Nk_BT \cdot \frac{T^3}{T_D^3}\cdot \frac{T_D^3}{3T^3} = 3Nk_BT, \qquad C_V = 3Nk_B.
\end{align*}
This is the **Dulong-Petit law**: at high temperatures, each atom contributes $3k_BT$ to the energy (three degrees of freedom, each with kinetic and potential energy, giving $6 \times \frac{1}{2}k_BT = 3k_BT$). The Debye model recovers the classical result, as it must.
**Low temperature ($T \ll T_D$):** The upper limit $x_D \to \infty$, and the integral becomes $\int_0^\infty x^3/(e^x - 1)\,dx = \pi^4/15$ (the same integral as for photons). Therefore
\begin{align*}
\langle E \rangle \approx \frac{3\pi^4Nk_BT^4}{5T_D^3}, \qquad C_V = \frac{12\pi^4}{5}Nk_B\left(\frac{T}{T_D}\right)^3.
\end{align*}
The heat capacity vanishes as $T^3$ — a power law, in contrast to the exponential vanishing of the two-state system. This $T^3$ law agrees well with experimental data for solids at low temperature, unlike the earlier Einstein model (which treats all atoms as independent oscillators at a single frequency and gives exponential rather than power-law behaviour).
[/example]
## Diatomic Gas Revisited
The quantum freezing of rotational and vibrational modes in diatomic gases, discussed qualitatively in Chapter 2, can now be understood quantitatively using the density of states and quantum partition functions developed above.
For **rotations**, the energy levels are $E_\ell = \frac{\hbar^2}{2I}\ell(\ell+1)$ with degeneracy $2\ell+1$. At high temperatures, the partition function sum is well-approximated by an integral, recovering the classical result $Z_{\mathrm{rot}} \approx 2Ik_BT/\hbar^2$ and $C_{V,\mathrm{rot}} = Nk_B$. At low temperatures, only the $\ell = 0$ ground state is populated, so $Z_{\mathrm{rot}} \approx 1$ and $C_{V,\mathrm{rot}} \to 0$.
For **vibrations**, the quantum harmonic oscillator gives $Z_{\mathrm{vib}} = e^{-\beta\hbar\omega/2}/(1 - e^{-\beta\hbar\omega})$. At high temperatures, $Z_{\mathrm{vib}} \approx k_BT/(\hbar\omega)$ and $C_{V,\mathrm{vib}} = Nk_B$. At low temperatures, $Z_{\mathrm{vib}} \approx e^{-\beta\hbar\omega/2}$ and $C_{V,\mathrm{vib}} \to 0$. The key point is that quantum mechanics leads to modes being frozen out when $k_BT$ is much smaller than the energy level spacing.
## Bosons
### Quantum Statistics and the Bose-Einstein Distribution
Quantum particles come in two kinds, distinguished by their behaviour under exchange of identical particles.
[definition:Bosons And Fermions]
**Bosons** are particles with integer spin. Their many-body wavefunction is symmetric under interchange of any two particles: $\Psi(r_1, r_2) = \Psi(r_2, r_1)$.
**Fermions** are particles with half-integer spin. Their many-body wavefunction is antisymmetric: $\Psi(r_1, r_2) = -\Psi(r_2, r_1)$.
Fermions obey the **Pauli exclusion principle**: no two identical fermions can occupy the same quantum state.
[/definition]
Examples of fermions include electrons, quarks, neutrinos, protons, and neutrons. Examples of bosons include photons, gluons, $W$ and $Z$ bosons, and the Higgs boson. Composite particles made of an even number of fermions (e.g. ${}^4\mathrm{He}$, with 2 protons, 2 neutrons, 2 electrons) behave as bosons; those made of an odd number (e.g. ${}^3\mathrm{He}$) behave as fermions.
For bosons, any number of particles can occupy the same single-particle state. Working in the grand canonical ensemble (where particle number fluctuates), the occupation number $n_r$ of each single-particle state $|r\rangle$ with energy $E_r$ is independent, and the grand partition function for state $|r\rangle$ is
\begin{align*}
\Xi_r = \sum_{n_r=0}^\infty e^{-\beta n_r(E_r - \mu)} = \frac{1}{1 - e^{-\beta(E_r - \mu)}}.
\end{align*}
For this sum to converge, we need $E_r - \mu > 0$ for all $r$. Taking $E_0 = 0$ as the ground state energy, this requires $\mu < 0$.
The average occupation number is
\begin{align*}
\langle n_r \rangle = -\frac{1}{\beta}\frac{\partial \ln \Xi_r}{\partial E_r} = \frac{1}{e^{\beta(E_r - \mu)} - 1}.
\end{align*}
[definition:Bose Einstein Distribution]
The average number of bosons in a single-particle state with energy $E$ is
\begin{align*}
\bar{n}(E) = \frac{1}{e^{\beta(E - \mu)} - 1},
\end{align*}
where $\mu < 0$ is the chemical potential. This is the **Bose-Einstein distribution**.
[/definition]
We have already encountered this distribution for photons and phonons with $\mu = 0$. The vanishing of $\mu$ in those cases reflects the fact that photon and phonon numbers are not conserved — there is no constraint fixing $\langle N \rangle$, so the chemical potential is not needed.
The **fugacity** $z = e^{\beta\mu}$ satisfies $0 < z < 1$ (since $\mu < 0$).
### The Ideal Bose Gas
For a non-relativistic ideal Bose gas with density of states $g(E) = \frac{V}{4\pi^2}(\frac{2m}{\hbar^2})^{3/2}E^{1/2}$, the total particle number and energy are
\begin{align*}
N &= \int_0^\infty g(E)\,\bar{n}(E)\,dE = \frac{V}{\lambda^3}g_{3/2}(z), \\
E &= \int_0^\infty g(E)\,E\,\bar{n}(E)\,dE = \frac{3}{2}k_BT\frac{V}{\lambda^3}g_{5/2}(z),
\end{align*}
where $g_n(z) = \frac{1}{\Gamma(n)}\int_0^\infty \frac{x^{n-1}}{z^{-1}e^x - 1}\,dx$ are the Bose functions (polylogarithms).
### High-Temperature Expansion
At high temperatures, $z = e^{\beta\mu} \ll 1$, and we can expand $g_n(z) \approx z + z^2/2^n + \cdots$. From the particle number equation, $z \approx N\lambda^3/V \ll 1$ (the classical condition), and the equation of state becomes
\begin{align*}
pV = Nk_BT\left(1 - \frac{1}{2^{5/2}}\frac{N\lambda^3}{V} + \cdots\right).
\end{align*}
The leading correction to the ideal gas law is negative — the quantum statistics of bosons effectively reduce the pressure, as if there were a weak attraction between particles. This is the second virial coefficient arising purely from quantum statistics, with no interaction potential.
### Bose-Einstein Condensation
As the temperature decreases at fixed $N$, $z$ increases toward $1$ to maintain $N = (V/\lambda^3)g_{3/2}(z)$. Since $\lambda \propto T^{-1/2}$, the left side is fixed while $V/\lambda^3 \propto T^{3/2}$ shrinks. The function $g_{3/2}(z)$ must therefore increase, which it does as $z \to 1$. But $g_{3/2}(z)$ has a finite maximum at $z = 1$: $g_{3/2}(1) = \zeta(3/2) \approx 2.612$, where $\zeta$ is the Riemann zeta function.
At a critical temperature $T_c$, we reach $z = 1$ and
\begin{align*}
N = \frac{V}{\lambda_c^3}\,\zeta(3/2), \qquad \text{where } \lambda_c = \lambda(T_c).
\end{align*}
For $T < T_c$, the integral over the density of states can no longer account for all $N$ particles. The resolution is that the density of states $g(E) \propto \sqrt{E}$ vanishes at $E = 0$, so the integral misses the ground state entirely. The missing particles are in the ground state, whose occupation we must track separately:
\begin{align*}
n_0 = \frac{1}{e^{-\beta\mu} - 1}.
\end{align*}
When $z \to 1$ (i.e. $\mu \to 0^-$), $n_0$ becomes macroscopically large. The total particle number is
\begin{align*}
N = n_0 + \frac{V}{\lambda^3}\,g_{3/2}(1).
\end{align*}
[theorem:Bose Einstein Condensation]
Below the critical temperature $T_c$ defined by $N\lambda_c^3/V = \zeta(3/2)$, a macroscopic fraction of the bosons occupies the single-particle ground state. The fraction in the ground state is
\begin{align*}
\frac{n_0}{N} = 1 - \left(\frac{T}{T_c}\right)^{3/2}.
\end{align*}
This macroscopic occupation of a single quantum state is the **Bose-Einstein condensate** (BEC).
[/theorem]
At $T = 0$, all particles are in the ground state ($n_0 = N$). As $T$ increases toward $T_c$, the condensate fraction decreases continuously to zero. Above $T_c$, there is no condensate and the system behaves as a normal quantum gas.
### Phase Transition and Heat Capacity
The formation of the BEC is a **phase transition** — an abrupt change in the macroscopic properties of the system. For $T < T_c$, $z = 1$ and the equation of state becomes $p \propto T^{5/2}$, independent of $V$ — a striking departure from the ideal gas law. The pressure depends only on temperature, not on density.
The heat capacity exhibits a characteristic signature. For $T < T_c$, the energy scales as $E \propto T^{5/2}$, so $C_V \propto T^{3/2}$. For $T > T_c$, a separate calculation gives $C_V$ decreasing with temperature. The heat capacity reaches a maximum at $T = T_c$ — a cusp that signals the phase transition. The derivative of $C_V$ is discontinuous at $T_c$ (in the thermodynamic limit $N \to \infty$), making this a [continuous](/page/Continuity) (second-order) phase transition.
An important experimental realisation of BEC-like physics is **superfluid helium-4** (${}^4\mathrm{He}$), which undergoes a transition to a superfluid state at $T_\lambda \approx 2.17\,\mathrm{K}$. This is a Bose condensation of strongly interacting atoms — the interactions modify the details but the underlying physics is the same.
## Fermions
### The Fermi-Dirac Distribution
For fermions, the Pauli exclusion principle restricts the occupation number of each state to $n_r = 0$ or $1$. The grand partition function for a single state $|r\rangle$ is
\begin{align*}
\Xi_r = \sum_{n_r=0}^{1} e^{-\beta n_r(E_r - \mu)} = 1 + e^{-\beta(E_r - \mu)}.
\end{align*}
There is no restriction on $\mu$ — it can be positive or negative.
[definition:Fermi Dirac Distribution]
The average number of fermions in a single-particle state with energy $E$ is
\begin{align*}
\bar{n}(E) = \frac{1}{e^{\beta(E - \mu)} + 1}.
\end{align*}
This is the **Fermi-Dirac distribution**.
[/definition]
The key difference from the Bose-Einstein distribution is the $+1$ in the denominator (versus $-1$). At high temperatures ($\beta(E - \mu) \gg 1$ for all relevant $E$), both distributions reduce to the Boltzmann distribution $\bar{n} \approx e^{-\beta(E-\mu)}$, recovering classical behaviour.
### The Ideal Fermi Gas
For non-relativistic fermions with spin $s$, each energy level has a degeneracy of $g_s = 2s + 1$ (for spin-$\frac{1}{2}$ fermions, $g_s = 2$). The density of states is $g(E) = g_s \frac{V}{4\pi^2}(\frac{2m}{\hbar^2})^{3/2}E^{1/2}$. The total particle number, energy, and pressure are
\begin{align*}
N = \int_0^\infty g(E)\,\bar{n}(E)\,dE, \qquad E = \int_0^\infty g(E)\,E\,\bar{n}(E)\,dE, \qquad pV = \frac{2}{3}E.
\end{align*}
The last relation follows from integrating by parts (as for bosons) and is valid at all temperatures.
**High-temperature expansion.** For $z = e^{\beta\mu} \ll 1$, expanding as for bosons but with opposite signs:
\begin{align*}
pV = Nk_BT\left(1 + \frac{1}{2^{5/2}}\frac{N\lambda^3}{V} + \cdots\right).
\end{align*}
The quantum correction now *increases* the pressure — the Pauli exclusion principle effectively acts as a repulsion, preventing fermions from clustering.
### Zero Temperature: The Degenerate Fermi Gas
At $T = 0$, the Fermi-Dirac distribution becomes a step function:
\begin{align*}
\bar{n}(E) = \begin{cases} 1 & E < \mu(T=0), \\ 0 & E > \mu(T=0). \end{cases}
\end{align*}
All states below a sharp energy are filled; all states above are empty.
[definition:Fermi Energy]
The **Fermi energy** $E_F = \mu(T=0)$ is the energy of the highest occupied state at zero temperature. It is determined by the condition
\begin{align*}
N = \int_0^{E_F} g(E)\,dE,
\end{align*}
giving $E_F = \frac{\hbar^2}{2m}\left(\frac{6\pi^2 N}{g_s V}\right)^{2/3}$. The associated **Fermi temperature** is $T_F = E_F/k_B$, and the **Fermi momentum** is $k_F = \sqrt{2mE_F}/\hbar$.
[/definition]
All states with $|k| < k_F$ are occupied, forming the **Fermi sea**. The boundary $|k| = k_F$ is the **Fermi surface**.
Typical values of $T_F$ are enormous: $T_F \sim 10^4\,\mathrm{K}$ for electrons in metals, $T_F \sim 10^9\,\mathrm{K}$ for white dwarfs. "High temperature" in the context of Fermi gases means $T \gg T_F$ — a condition rarely met for electrons in solids.
At $T = 0$, the energy and pressure are
\begin{align*}
E = \int_0^{E_F} g(E)\,E\,dE = \frac{3}{5}NE_F, \qquad pV = \frac{2}{3}E = \frac{2}{5}NE_F.
\end{align*}
[theorem:Degeneracy Pressure]
At zero temperature, a Fermi gas exerts a nonzero pressure:
\begin{align*}
p = \frac{2}{5}\frac{N}{V}E_F.
\end{align*}
This **degeneracy pressure** arises purely from the Pauli exclusion principle — it persists even in the complete absence of interactions and at absolute zero.
[/theorem]
Degeneracy pressure is what supports **white dwarf** stars (electron degeneracy pressure) and **neutron stars** (neutron degeneracy pressure) against gravitational collapse.
### Low Temperature: The Sommerfeld Expansion
At low but nonzero temperature ($T \ll T_F$), the Fermi-Dirac distribution is nearly a step function, with a narrow transition region of width $\sim k_BT$ around $E = \mu$. Only fermions within $\sim k_BT$ of the Fermi energy can participate in thermal physics — those deep in the Fermi sea are frozen out by the Pauli principle.
The heat capacity can be estimated by a simple argument: the number of thermally active fermions is $\sim g(E_F)\,k_BT$, and each gains energy $\sim k_BT$ above $E_F$. The total thermal energy above the ground state is therefore $\sim g(E_F)(k_BT)^2$, giving
\begin{align*}
C_V \sim g(E_F)\,k_B^2\,T.
\end{align*}
A rigorous calculation (the Sommerfeld expansion) confirms this, yielding
\begin{align*}
C_V = \frac{\pi^2}{3}g(E_F)\,k_B^2\,T = \frac{\pi^2}{2}Nk_B\frac{T}{T_F}.
\end{align*}
The linear dependence $C_V \propto T$ is characteristic of a Fermi gas at low temperature — it is much smaller than the classical value $\frac{3}{2}Nk_B$ because only a fraction $\sim T/T_F$ of the fermions participate.
In metals, the electronic heat capacity $C_{\mathrm{el}} = \gamma T$ (linear in $T$) competes with the phonon heat capacity $C_{\mathrm{ph}} \propto T^3$ (from the Debye model). At high temperatures, phonons dominate; at sufficiently low temperatures, the linear electronic term wins. The crossover occurs at $T \sim \sqrt{T_D^3/T_F}$, typically a few kelvin.
### Pauli Paramagnetism
A magnetic field $B$ splits the energy levels of spin-$\frac{1}{2}$ fermions: spin-up and spin-down electrons have energies shifted by $\pm\mu_B B$ (where $\mu_B$ is the Bohr magneton). This creates different occupation numbers for spin-up and spin-down states, producing a net magnetisation.
**High temperature ($T \gg T_F$):** The gas is classical, and the magnetisation follows Curie's law:
\begin{align*}
M = N\mu_B\tanh(\beta\mu_B B) \approx \frac{N\mu_B^2 B}{k_BT}, \qquad \chi = \frac{N\mu_B^2}{k_BT}.
\end{align*}
The susceptibility $\chi = \partial M/\partial B|_{B=0}$ diverges as $1/T$.
**Low temperature ($T \ll T_F$):** Only electrons near the Fermi surface can flip their spins in response to the field. The magnetisation is
\begin{align*}
M = \mu_B^2 g(E_F)\,B,
\end{align*}
and the susceptibility is
\begin{align*}
\chi = \mu_B^2\,g(E_F) \propto \frac{N\mu_B^2}{E_F}.
\end{align*}
This is **Pauli paramagnetism** — the susceptibility is temperature-independent (to leading order) and much smaller than the classical Curie result, because only the fraction $\sim k_BT/E_F$ of electrons at the Fermi surface can respond to the field. The suppression factor is $T/T_F$, which for metals is of order $10^{-2}$.
# Classical Thermodynamics
The preceding chapters built thermodynamics from the bottom up: starting with microstates, we derived entropy, temperature, and the laws of thermodynamics as consequences of the fundamental postulate. This chapter takes the opposite approach — the historical one — and develops thermodynamics axiomatically from macroscopic observations about heat, work, and equilibrium, without any reference to atoms or microstates.
The remarkable fact is that the two approaches give identical results. The axiomatic framework is more general in some ways (it does not require a microscopic model) and more limited in others (it cannot compute partition functions or predict specific heat capacities). Together, they provide complementary perspectives on the same physics.
## Temperature and the Zeroth Law
### Walls, Contact, and Equilibrium
The basic vocabulary of thermodynamics begins with how systems interact.
[definition:Adiabatic And Diathermal Walls]
A system enclosed within **adiabatic walls** is completely isolated from all outside influences — it cannot exchange energy, particles, or any other quantity with its surroundings. Such a system is said to be **insulated**.
Walls that are not adiabatic are **diathermal**. Systems separated by diathermal walls are in **thermal contact** — they can exchange energy (though not particles or volume).
[/definition]
An isolated system, left alone, will eventually reach **equilibrium** — a state where no further macroscopic change occurs. In equilibrium, the state of a gas is completely specified by its macroscopic variables, such as pressure $p$ and volume $V$.
The zeroth law provides the logical foundation for the concept of temperature.
[theorem:Zeroth Law Of Thermodynamics]
If system $A$ is in thermal equilibrium with system $C$, and system $B$ is also in thermal equilibrium with system $C$, then $A$ is in thermal equilibrium with $B$. That is, thermal equilibrium is a **transitive** relation.
[/theorem]
The zeroth law implies the existence of a function of state — **temperature** — that characterises equilibrium. To see this, consider three gases $A$, $B$, $C$ with state variables $(p_1, V_1)$, $(p_2, V_2)$, $(p_3, V_3)$. If $A$ and $C$ are in equilibrium, there is a constraint $f_{AC}(p_1, V_1; p_3, V_3) = 0$, which we can write as $V_3 = F_{AC}(p_1, V_1; p_3)$. Similarly, if $B$ and $C$ are in equilibrium, $V_3 = F_{BC}(p_2, V_2; p_3)$. Equating these expressions for $V_3$ and using the zeroth law (which tells us $A$ and $B$ must also be in equilibrium independently of $C$), the dependence on $p_3$ must cancel. We are left with $\Theta_A(p_1, V_1) = \Theta_B(p_2, V_2)$ — a function of each system's own variables whose equality characterises equilibrium. This function is the temperature, and the relation $T = \Theta(p, V)$ is the equation of state. For an ideal gas, we choose $T = pV/(Nk_B)$.
## The First Law
### Energy as a Function of State
The first law establishes energy as a well-defined property of a thermodynamic system.
[theorem:First Law Of Thermodynamics]
The amount of work required to change an isolated system from one equilibrium state to another depends only on the initial and final states, not on the process used.
[/theorem]
This allows us to define a function of state $E(p, V)$ — the **internal energy** — such that the work done on an isolated system equals the change in energy: $\Delta E = W$.
For systems that are not isolated, the state can also change through thermal contact. We define **heat** $Q$ as the energy transferred to the system by means other than work: $\Delta E = W + Q$. Crucially, $E$ is a function of state but $W$ and $Q$ individually are not — they depend on the path taken. Heat is not a type of energy stored in a system; it is a mode of transferring energy.
For a quasi-static process (one that proceeds slowly enough to remain in equilibrium at each stage), the first law in differential form is
\begin{align*}
dE = \text{\dj}Q + \text{\dj}W,
\end{align*}
where $\text{\dj}Q$ and $\text{\dj}W$ are inexact differentials (path-dependent), while $dE$ is exact (path-independent). For compression work, $\text{\dj}W = -p\,dV$ (with the sign convention that $\text{\dj}W$ is work done *on* the system).
## The Second Law
### Reversibility and Heat Engines
[definition:Reversible Process]
A **reversible process** is a quasi-static process that can be run in reverse without any other change to the surroundings. In practice, this means no friction, no turbulence, and no heat flow across a finite temperature difference.
[/definition]
A cyclic process — one that returns to its starting state — satisfies $\oint dE = 0$, but generically $\oint \text{\dj}W \neq 0$ and $\oint \text{\dj}Q \neq 0$. Going around a cycle can therefore convert heat into work (or vice versa). The second law restricts how efficiently this conversion can occur.
[theorem:Kelvin Statement Of The Second Law]
No cyclic process exists whose sole effect is to convert heat entirely into work.
[/theorem]
[theorem:Clausius Statement Of The Second Law]
No cyclic process exists whose sole effect is the transfer of heat from a colder body to a hotter body.
[/theorem]
These two statements are equivalent: assuming either one is false leads to a violation of the other. Any machine that violates Kelvin's statement could power a refrigerator to violate Clausius's statement, and vice versa.
### The Carnot Cycle
The Carnot cycle is a particular reversible cycle operating between two heat reservoirs at temperatures $T_H$ (hot) and $T_C$ (cold), with $T_H > T_C$. It consists of four stages: isothermal expansion at $T_H$ (absorbing heat $Q_H$), adiabatic expansion (cooling from $T_H$ to $T_C$), isothermal compression at $T_C$ (releasing heat $Q_C$), and adiabatic compression (warming from $T_C$ to $T_H$).
Since the cycle returns to its starting point, $\Delta E = 0$ and the work done by the system is $W = Q_H - Q_C$.
[definition:Efficiency Of A Heat Engine]
The **efficiency** of a heat engine is the fraction of absorbed heat converted to work:
\begin{align*}
\eta = \frac{W}{Q_H} = 1 - \frac{Q_C}{Q_H}.
\end{align*}
[/definition]
[theorem:Carnot Theorem]
Of all heat engines operating between reservoirs at temperatures $T_H$ and $T_C$:
1. No engine is more efficient than a reversible (Carnot) engine.
2. All reversible engines have the same efficiency: $\eta_{\mathrm{Carnot}} = 1 - T_C/T_H$.
[/theorem]
[proof]
**Part 1.** Suppose a "super-Carnot" engine has efficiency $\eta_{SC} > \eta_{\mathrm{Carnot}}$. Run the Carnot engine in reverse (as a refrigerator) using the work output of the super-Carnot engine. The combined system transfers heat from the cold reservoir to the hot reservoir with no net work input — violating Clausius's statement.
**Part 2.** If the super-Carnot engine is also reversible, running it backwards gives the reverse inequality, so $\eta_{SC} = \eta_{\mathrm{Carnot}}$. All reversible engines have the same efficiency.
To find this efficiency, compute it for an ideal gas. Along the isothermal stages, $Q_H = Nk_BT_H\ln(V_B/V_A)$ and $Q_C = Nk_BT_C\ln(V_C/V_D)$. Along the adiabatic stages, $TV^{\gamma-1} = \text{const}$ (where $\gamma = C_p/C_V$), which gives $V_B/V_A = V_C/V_D$. Therefore $Q_C/Q_H = T_C/T_H$ and $\eta = 1 - T_C/T_H$.
[/proof]
### Entropy as a Function of State
The Carnot cycle satisfies $Q_H/T_H = Q_C/T_C$, or equivalently $Q_H/T_H - Q_C/T_C = 0$. Writing $Q_1 = Q_H$ (heat absorbed at $T_H$) and $Q_2 = -Q_C$ (heat absorbed at $T_C$, negative since heat is released), this becomes $\sum_i Q_i/T_i = 0$.
For a general reversible cycle, we can decompose it into infinitesimal Carnot cycles, giving $\oint \frac{\text{\dj}Q_{\mathrm{rev}}}{T} = 0$. Since the integral around any closed reversible path vanishes, the integrand defines a function of state.
[definition:Thermodynamic Entropy]
The **entropy** $S$ is a function of state defined by
\begin{align*}
S(B) - S(A) = \int_A^B \frac{\text{\dj}Q_{\mathrm{rev}}}{T},
\end{align*}
where the integral is taken along any reversible path from $A$ to $B$.
[/definition]
This is the same entropy we introduced in Chapter 1 via $S = k_B\ln\Omega$. The first law now takes the form $dE = T\,dS - p\,dV$, which is the fundamental thermodynamic relation.
For irreversible processes, Carnot's theorem implies $\oint \text{\dj}Q/T \leq 0$ (with equality for reversible cycles). It follows that for an isolated system ($\text{\dj}Q = 0$), entropy never decreases: $S(B) \geq S(A)$.
## Thermodynamic Potentials
The internal energy $E = E(S, V)$ is the natural potential for processes at constant $S$ and $V$. Other experimental conditions call for different potentials, obtained by Legendre transforms.
[definition:Thermodynamic Potentials]
The four standard thermodynamic potentials, their natural variables, and their differentials are:
**Internal energy:** $E = E(S, V)$, $\quad dE = T\,dS - p\,dV$.
**Helmholtz free energy:** $F = E - TS = F(T, V)$, $\quad dF = -S\,dT - p\,dV$.
**Gibbs free energy:** $G = E + pV - TS = G(T, p)$, $\quad dG = -S\,dT + V\,dp$.
**Enthalpy:** $H = E + pV = H(S, p)$, $\quad dH = T\,dS + V\,dp$.
[/definition]
Each potential generates a **Maxwell relation** by the equality of mixed partial derivatives. For example, from $dF = -S\,dT - p\,dV$:
\begin{align*}
\frac{\partial S}{\partial V}\bigg|_T = \frac{\partial p}{\partial T}\bigg|_V.
\end{align*}
Similar relations follow from the other potentials. These identities connect quantities that are often difficult to measure directly (such as $\partial S/\partial V|_T$) to quantities that are readily accessible (such as $\partial p/\partial T|_V$).
When particle number $N$ is allowed to vary, each potential acquires an additional term $\mu\,dN$, and the Gibbs free energy takes the special form $G(T, p, N) = \mu(T, p)\,N$ (since $G$ is extensive and depends on only one extensive variable, $N$).
## The Third Law
[theorem:Third Law Of Thermodynamics]
As $T \to 0$, the entropy of a system approaches a constant (which can be taken to be zero) independent of all other parameters:
\begin{align*}
S \to 0 \quad \text{as} \quad T \to 0.
\end{align*}
[/theorem]
A consequence is that the heat capacity must vanish at $T = 0$: from $S(T) = \int_0^T C_V/T'\,dT'$, convergence of the integral requires $C_V \to 0$ at least as fast as $T^n$ for some $n > 0$. The classical ideal gas, with its constant heat capacity $C_V = \frac{3}{2}Nk_B$, violates this — a clear signal that quantum effects are essential at low temperatures. As we saw in Chapter 3, the quantum-mechanical heat capacities of phonons ($\propto T^3$), electrons ($\propto T$), and gapped systems ($\propto e^{-\Delta/k_BT}$) all satisfy the third law.
# Phase Transitions
A phase transition is an abrupt, discontinuous change in the properties of a system as an external parameter (temperature, pressure, magnetic field) is varied continuously. The liquid-gas transition, the freezing of water, and the spontaneous magnetisation of a ferromagnet are all examples. This chapter develops the theory of phase transitions, connecting the macroscopic phenomenology to the microscopic models studied earlier.
## The Liquid-Gas Transition
### Van der Waals Isotherms
The van der Waals equation of state, derived in Chapter 2, predicts a rich structure when plotted as isotherms (curves of constant $T$ in the $p$-$V$ plane).
Above a critical temperature $T_c$, the isotherms are monotonically decreasing — increasing volume always decreases pressure, as expected. Below $T_c$, each isotherm develops an S-shaped region with a local minimum and maximum in $p(V)$. The critical point is determined by the simultaneous vanishing of the first and second derivatives: $\partial p/\partial V = 0$ and $\partial^2 p/\partial V^2 = 0$, giving
\begin{align*}
k_BT_c = \frac{8a}{27b}, \qquad V_c = 3Nb, \qquad p_c = \frac{a}{27b^2}.
\end{align*}
### Phase Coexistence and the Maxwell Construction
Below $T_c$, the S-shaped isotherm contains an unstable region (where $\partial p/\partial V > 0$ — squeezing the gas causes the pressure to drop). This unphysical region is replaced by a horizontal line segment representing **phase coexistence**: the system separates into liquid and gas phases at the same temperature, pressure, and chemical potential.
The coexistence pressure is determined by the **Maxwell construction** (or equal-area rule): the areas between the horizontal line and the van der Waals isotherm above and below must be equal. This follows from requiring $\mu_{\mathrm{liquid}} = \mu_{\mathrm{gas}}$ along the isotherm.
[definition:Latent Heat]
The **latent heat** $L$ of a first-order phase transition is the energy absorbed during the transition at constant temperature and pressure:
\begin{align*}
L = T(S_{\mathrm{gas}} - S_{\mathrm{liquid}}).
\end{align*}
[/definition]
### The Clausius-Clapeyron Equation
Along the coexistence curve in the $p$-$T$ plane, the chemical potentials of the two phases remain equal: $\mu_{\mathrm{liquid}}(T, p) = \mu_{\mathrm{gas}}(T, p)$. Differentiating this condition along the coexistence curve gives a relation between the slope of the curve and the thermodynamic properties of the two phases.
[theorem:Clausius Clapeyron Equation]
The slope of the coexistence curve in the $p$-$T$ plane is
\begin{align*}
\frac{dp}{dT} = \frac{S_g - S_l}{V_g - V_l} = \frac{L}{T(V_g - V_l)},
\end{align*}
where $L = T(S_g - S_l)$ is the latent heat, and $V_g - V_l$ is the volume change across the transition.
[/theorem]
[proof]
Along the coexistence curve, $d\mu_l = d\mu_g$. Using $d\mu = -s\,dT + v\,dp$ (where $s = S/N$ and $v = V/N$ are the entropy and volume per particle), this gives $-s_l\,dT + v_l\,dp = -s_g\,dT + v_g\,dp$. Rearranging: $dp/dT = (s_g - s_l)/(v_g - v_l) = L/[T(V_g - V_l)]$.
[/proof]
### Classification of Phase Transitions
[definition:First And Second Order Phase Transitions]
A phase transition is **first order** (or **discontinuous**) if there is a discontinuity in a first derivative of the free energy — for instance, a jump in entropy $S = -\partial G/\partial T$ or volume $V = \partial G/\partial p$.
A phase transition is **second order** (or **continuous**) if the first derivatives are continuous, but there is a discontinuity or divergence in a second derivative — for instance, in the heat capacity $C_p = -T\partial^2 G/\partial T^2$ or the compressibility $\kappa = -V^{-1}\partial^2 G/\partial p^2$.
[/definition]
The liquid-gas transition below $T_c$ is first order (discontinuous volume and entropy). At the critical point $T = T_c$, the discontinuity vanishes and the transition becomes second order (continuous).
### Critical Exponents
The behaviour of thermodynamic quantities near the critical point is characterised by power laws. Defining reduced variables $\tilde{T} = T/T_c$, $\tilde{V} = V/V_c$, $\tilde{p} = p/p_c$, the van der Waals equation takes a universal form independent of the specific values of $a$ and $b$ — the **law of corresponding states**.
[definition:Critical Exponents]
The **critical exponents** describe how quantities diverge or vanish as the critical point is approached:
$V_g - V_l \sim (T_c - T)^\beta$ along the coexistence curve ($\beta$ controls the order parameter).
$(p - p_c) \sim (V - V_c)^\delta$ along the critical isotherm.
The isothermal compressibility $\kappa_T \sim (T - T_c)^{-\gamma}$ as $T \to T_c^+$ at $V = V_c$.
[/definition]
The van der Waals equation predicts $\beta = 1/2$, $\delta = 3$, and $\gamma = 1$. These values are **not** quantitatively correct — experiments give $\beta \approx 0.32$, $\delta \approx 4.8$, $\gamma \approx 1.2$. The discrepancy arises because the van der Waals equation (like all mean-field theories) neglects density fluctuations, which become large near the critical point. Understanding how to correctly account for these fluctuations is the subject of the theory of **critical phenomena**.
Strikingly, the experimental critical exponents for the liquid-gas transition are **identical** to those of the Ising model in three dimensions — a completely different physical system. This **universality** of critical exponents is one of the deepest results in statistical physics.
## The Ising Model
### Definition and Motivation
The Ising model is the simplest model of a magnet. It consists of $N$ **spin variables** $s_i = \pm 1$ ("up" or "down") arranged on a lattice, interacting with their nearest neighbours and with an external magnetic field $B$.
[definition:Ising Model]
The **Ising model** on a $d$-dimensional lattice with nearest-neighbour coupling $J$ and external field $B$ has energy
\begin{align*}
E = -J\sum_{\langle ij \rangle} s_i s_j - B\sum_i s_i,
\end{align*}
where $\langle ij \rangle$ denotes a sum over nearest-neighbour pairs. Each site has $q$ nearest neighbours (e.g. $q = 2$ in $d = 1$, $q = 4$ on a square lattice in $d = 2$).
For $J > 0$, aligned spins are energetically preferred (**ferromagnet**). For $J < 0$, anti-aligned spins are preferred (**antiferromagnet**).
[/definition]
We consider $J > 0$ (ferromagnetic case). The partition function is $Z = \sum_{\{s_i\}} e^{-\beta E\{s_i\}}$, and the average magnetisation per site is $m = \langle s_i \rangle$.
### Mean Field Theory
The exact partition function of the Ising model is not tractable in $d \geq 2$ (at $B \neq 0$). Mean field theory (MFT) provides an approximate but analytically solvable treatment by replacing the fluctuating neighbours of each spin with their average value.
Write $s_i = m + (s_i - m)$, where $m = \langle s_i \rangle$ is the average magnetisation. In the product $s_i s_j$:
\begin{align*}
s_i s_j = [m + (s_i - m)][m + (s_j - m)] = m^2 + m(s_i - m) + m(s_j - m) + (s_i - m)(s_j - m).
\end{align*}
The mean field approximation neglects the last term (fluctuation–fluctuation correlations). The energy becomes
\begin{align*}
E_{\mathrm{MF}} = \frac{1}{2}NJqm^2 - (B + Jqm)\sum_i s_i,
\end{align*}
where the first term is a constant and the second has the form of non-interacting spins in an effective field $B_{\mathrm{eff}} = B + Jqm$. The partition function factorises, and the self-consistency condition $m = \langle s_i \rangle$ gives
\begin{align*}
m = \tanh\bigl[\beta(B + Jqm)\bigr].
\end{align*}
### Phase Transition at $B = 0$
At $B = 0$, the self-consistency equation becomes $m = \tanh(\beta Jqm)$.
For $\beta Jq < 1$ (high temperature, $k_BT > Jq$), the only solution is $m = 0$ — the paramagnetic phase. For $\beta Jq > 1$ (low temperature, $k_BT < Jq$), there are additional solutions $m = \pm m_0$ with $m_0 \neq 0$ — the ferromagnetic phase. The critical temperature is $k_BT_c = Jq$.
The magnetisation $m$ is continuous at $T_c$ (it drops smoothly to zero as $T \to T_c^-$), but its derivative is discontinuous — this is a **second-order phase transition**. Below $T_c$, the system spontaneously chooses $m = +m_0$ or $m = -m_0$: the energy and free energy are symmetric under $m \to -m$, but the ground state breaks this symmetry. This is **spontaneous symmetry breaking**.
### Phase Transition at $B \neq 0$
When $B \neq 0$, the symmetry $m \to -m$ is explicitly broken, and the magnetisation $m(B)$ is a smooth function of $B$ for $T > T_c$. For $T < T_c$, however, $m$ changes discontinuously as $B$ passes through zero — a **first-order phase transition**. The phase diagram in the $B$-$T$ plane has a line of first-order transitions along $B = 0$ for $T < T_c$, terminating at the critical point $(B = 0, T = T_c)$.
This structure is strikingly analogous to the liquid-gas transition in the $p$-$V$ diagram: the magnetic field $B$ plays the role of pressure, the magnetisation $m$ plays the role of density, and the critical point has the same [topology](/page/Topology).
### Mean Field Critical Exponents
Expanding the self-consistency equation near the critical point reproduces the critical exponents.
**Exponent $\beta$:** At $B = 0$, expanding $\tanh(x) \approx x - x^3/3$ for small $m$ near $T_c$: $m \approx \beta Jqm - \frac{1}{3}(\beta Jq)^3 m^3$. For $T < T_c$, $m_0 \propto (T_c - T)^{1/2}$, giving $\beta = 1/2$.
**Exponent $\delta$:** At $T = T_c$ ($\beta Jq = 1$), expanding: $m \approx m + \beta B - \frac{1}{3}m^3$, so $m \propto B^{1/3}$, giving $\delta = 3$.
**Exponent $\gamma$:** The magnetic susceptibility $\chi = \partial m/\partial B|_{B=0}$ diverges as $\chi \propto (T - T_c)^{-1}$ for $T > T_c$, giving $\gamma = 1$.
These are exactly the same exponents as the van der Waals equation predicts for the liquid-gas transition. This is not a coincidence — both are mean field theories, and mean field theory always gives $\beta = 1/2$, $\delta = 3$, $\gamma = 1$, regardless of the physical system.
### Validity of Mean Field Theory
The accuracy of MFT depends on the spatial dimension $d$:
In $d = 1$, MFT is completely wrong. There is no phase transition at all (exact solution known).
In $d = 2$, a phase transition exists (Onsager's exact solution at $B = 0$), but the critical exponents differ from MFT predictions.
In $d = 3$, no exact solution is known. Numerically computed critical exponents are found to be *exactly the same* as the experimental critical exponents for the liquid-gas transition — a striking instance of universality.
For $d \geq 4$, MFT critical exponents are exactly correct.
## Landau Theory
### The Order Parameter and Free Energy Expansion
Landau theory provides a unified framework for understanding phase transitions near the critical point. The key idea is to treat the free energy as a function $\mathcal{F}(T, m)$ of the order parameter $m$ (which could be magnetisation, density difference $\rho_g - \rho_l$, or any other quantity that vanishes in the disordered phase).
Near the critical point, $m$ is small, and we expand $\mathcal{F}$ in powers of $m$, respecting the symmetries of the system.
### Second-Order Transitions
If the system has a symmetry $m \to -m$ (as in the Ising model at $B = 0$), only even powers appear:
\begin{align*}
\mathcal{F}(T, m) = \mathcal{F}_0(T) + a(T)\,m^2 + b(T)\,m^4 + \cdots
\end{align*}
Stability requires $b(T) > 0$. Minimising $\mathcal{F}$ with respect to $m$:
When $a(T) > 0$: unique minimum at $m = 0$ (disordered phase).
When $a(T) < 0$: $m = 0$ becomes a local maximum, and new minima appear at $m = \pm m_0$ with $m_0 = \sqrt{-a/2b}$.
The transition occurs at $T = T_c$ where $a(T_c) = 0$. Typically $a(T) \propto (T - T_c)$, giving $m_0 \propto (T_c - T)^{1/2}$ — the mean field exponent $\beta = 1/2$.
The free energy and its dynamics are symmetric under $m \to -m$, but below $T_c$ the equilibrium state picks $m = +m_0$ or $m = -m_0$. This is **spontaneous symmetry breaking**: the symmetry of the governing equations is not shared by the ground state.
### First-Order Transitions
If the symmetry $m \to -m$ is absent (as in the Ising model with $B \neq 0$, or in the liquid-gas system where the order parameter is density), odd powers appear in the expansion:
\begin{align*}
\mathcal{F}(T, m) = \mathcal{F}_0(T) + \alpha(T)\,m + a(T)\,m^2 + c(T)\,m^3 + b(T)\,m^4 + \cdots
\end{align*}
The linear and cubic terms break the $m \to -m$ symmetry. As the external parameter (e.g. $B$) varies, the global minimum of $\mathcal{F}$ can jump discontinuously from one local minimum to another — a first-order phase transition. The metastable states between the spinodal and coexistence curves correspond to local (but not global) minima of $\mathcal{F}$.
Landau theory captures the essential phenomenology of phase transitions near criticality and correctly identifies the role of symmetry, order parameters, and the qualitative distinction between first- and second-order transitions. Its quantitative predictions for critical exponents are those of mean field theory and are exact only in $d \geq 4$ dimensions. In lower dimensions, fluctuations — which Landau theory ignores — modify the critical behaviour.
Contents
- Fundamentals of Statistical Physics
- The Microcanonical Ensemble
- Microstates and the Fundamental Postulate
- Boltzmann Entropy
- The Second Law of Thermodynamics
- Temperature
- Heat Capacity
- The Two-State System
- Pressure, Volume, and the First Law
- The Canonical Ensemble
- From Fixed Energy to Fixed Temperature
- Factorisation for Independent Systems
- Energy and Fluctuations
- Entropy in the Canonical Ensemble
- The Helmholtz Free Energy
- The Two-State System Revisited
- The Chemical Potential and Grand Canonical Ensemble
- Conserved Quantities and the Chemical Potential
- The Grand Canonical Ensemble
- The Grand Canonical Potential
- Extensive and Intensive Quantities
- Classical Gases
- The Classical Partition Function
- From Quantum Sums to Phase-Space Integrals
- The Ideal Gas
- Definition and Partition Function
- The Ideal Gas Law
- Energy and Equipartition
- Boltzmann's Constant and the Scale of Atoms
- Entropy and the Gibbs Paradox
- The Ideal Gas in the Grand Canonical Ensemble
- The Maxwell Distribution
- Speed Distribution of Gas Particles
- Diatomic Gases
- Internal Degrees of Freedom
- Rotations
- Vibrations
- Classical Prediction vs Experiment
- Quantum Freezing of Rotational Modes
- Quantum Freezing of Vibrational Modes
- Interacting Gases
- The Virial Expansion
- The Interatomic Potential
- Computing the Second Virial Coefficient
- The Van der Waals Equation
- Quantum Gases
- Density of States
- From Discrete Sums to Energy Integrals
- Photons
- Blackbody Radiation
- Wien's Law and the Stefan-Boltzmann Law
- The Debye Model of Phonons
- Phonons as Quantised Sound Waves
- Heat Capacity
- Diatomic Gas Revisited
- Bosons
- Quantum Statistics and the Bose-Einstein Distribution
- The Ideal Bose Gas
- High-Temperature Expansion
- Bose-Einstein Condensation
- Phase Transition and Heat Capacity
- Fermions
- The Fermi-Dirac Distribution
- The Ideal Fermi Gas
- Zero Temperature: The Degenerate Fermi Gas
- Low Temperature: The Sommerfeld Expansion
- Pauli Paramagnetism
- Classical Thermodynamics
- Temperature and the Zeroth Law
- Walls, Contact, and Equilibrium
- The First Law
- Energy as a Function of State
- The Second Law
- Reversibility and Heat Engines
- The Carnot Cycle
- Entropy as a Function of State
- Thermodynamic Potentials
- The Third Law
- Phase Transitions
- The Liquid-Gas Transition
- Van der Waals Isotherms
- Phase Coexistence and the Maxwell Construction
- The Clausius-Clapeyron Equation
- Classification of Phase Transitions
- Critical Exponents
- The Ising Model
- Definition and Motivation
- Mean Field Theory
- Phase Transition at $B = 0$
- Phase Transition at $B \neq 0$
- Mean Field Critical Exponents
- Validity of Mean Field Theory
- Landau Theory
- The Order Parameter and Free Energy Expansion
- Second-Order Transitions
- First-Order Transitions
Cambridge II Statistical Physics
Content
Problems
History
Created by admin on 3/29/2026 | Last updated on 3/29/2026
Prerequisites
No prerequisites required for this page.
Rate this page
★
★
★
★
★
Poor
Excellent