Skip to content

Statistical Ensembles and Partition Functions

Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

Scrollable table. Use Left and Right arrow keys to reveal additional columns.

Scrollable figure. Use Left and Right arrow keys to inspect hidden content.

An ensemble specifies both what a system can exchange and how its microscopic states are weighted. The logarithm of its partition function is a generating function: first derivatives give mean conserved quantities, second derivatives give fluctuations, and a Legendre transform gives the appropriate thermodynamic potential. Different ensembles model different physical couplings, not merely different calculation tricks.

Required background. Calculus and Linear Algebra supplies constrained extrema, second derivatives, and eigenvalue language. The probability weights and Gaussian saddle used below are defined locally. Helpful background. Classical and Variational Mechanics supplies phase-space and conservation-law language; Quantum Mechanics supplies energy-state and spectral language, while the Bose and Fermi occupation rules in the optional bridge below are introduced locally.

For an isolated system with energy in a narrow shell around EE, volume VV, and particle number NN, let NE(E,V,N)\mathcal N_E(E,V,N) be the number of accessible states in that shell. The microcanonical assignment is uniform:

pi=1NE,S(E,V,N)=ln⁡NE.p_i=\frac{1}{\mathcal N_E}, \qquad S(E,V,N)=\ln\mathcal N_E.

The shell convention matters for finite systems, but its microscopic width does not affect the leading extensive entropy when it is broad compared with the level spacing and narrow on macroscopic scales. Ergodicity can help explain why long-time measurements explore this distribution in some systems; it is not part of the ensemble’s algebraic definition.

If the system is weakly coupled to a much larger reservoir, so the interaction energy is negligible in the equilibrium accounting, a system microstate of energy EiE_i leaves the bath with energy Etot−EiE_{\mathrm{tot}}-E_i. Expanding the bath entropy gives

SR(Etot−Ei)=SR(Etot)−βEi−Ei22T2CR+⋯ .S_R(E_{\mathrm{tot}}-E_i) =S_R(E_{\mathrm{tot}})-\beta E_i -\frac{E_i^2}{2T^2C_R}+\cdots.

When the reservoir heat capacity CRC_R is large enough that the quadratic correction is negligible over the system’s relevant energies, the number of compatible bath states is proportional to e−βEie^{-\beta E_i}. Normalization then gives the canonical weights

pi=e−βEiZ(β,V,N),Z=∑ie−βEi,β=1T.p_i=\frac{e^{-\beta E_i}}{Z(\beta,V,N)}, \qquad Z=\sum_i e^{-\beta E_i}, \qquad \beta=\frac{1}{T}.

We use kB=1k_{\mathrm B}=1, natural logarithms, and T>0T\gt 0 unless a bounded-spectrum exception is explicitly stated. At fixed (V,N)(V,N), differentiating ZZ yields

U=⟨E⟩=−∂ln⁡Z∂β,Var⁡(E)=∂2ln⁡Z∂β2,U=\langle E\rangle=-\frac{\partial\ln Z}{\partial\beta}, \qquad \operatorname{Var}(E)=\frac{\partial^2\ln Z}{\partial\beta^2},

and substitution into S=−∑ipiln⁡piS=-\sum_i p_i\ln p_i gives

S=ln⁡Z+βU,F=U−TS=−Tln⁡Z.S=\ln Z+\beta U, \qquad F=U-TS=-T\ln Z.

The first derivative is the mean energy and the second is a nonnegative variance, so ln⁡Z\ln Z is convex in β\beta. The reservoir construction and these identities are derived in Tong, current notes, §1.3, printed pp. 17–25.

The canonical law can also be characterized variationally. Maximize Gibbs entropy at fixed normalization and mean energy:

L[p]=−∑ipiln⁡pi−α(∑ipi−1)−β(∑ipiEi−U).\mathcal L[p] =-\sum_i p_i\ln p_i -\alpha\left(\sum_i p_i-1\right) -\beta\left(\sum_i p_iE_i-U\right).

Stationarity with respect to every positive pip_i gives ln⁡pi=−1−α−βEi\ln p_i=-1-\alpha-\beta E_i; normalization then identifies e1+α=Ze^{1+\alpha}=Z. Because −∑ipiln⁡pi-\sum_i p_i\ln p_i is strictly concave on a finite probability simplex, this stationary distribution is the unique maximum whenever the prescribed mean energy lies strictly between the lowest and highest levels. At an endpoint, the maximum is instead the uniform distribution on the corresponding extremal-energy eigenspace, obtained as a limiting Gibbs state. For a nonconstant finite spectrum, a mean energy above the uniform distribution’s mean requires β<0\beta\lt0; that bounded-spectrum case is outside the positive-temperature branch used here. The variational argument does not say that every isolated trajectory becomes canonical: it identifies a probability law after a mean-energy constraint and state space have been chosen.

When energy and particles are exchanged, the reservoir expansion contains −β(Ei−μNi)-\beta(E_i-\mu N_i). In the quantum description this simple joint weighting assumes [H,N]=0[H,N]=0. The grand-canonical ensemble is

pi=e−β(Ei−μNi)Ξ,Ξ=∑ie−β(Ei−μNi),Ω=−Tln⁡Ξ.p_i=\frac{e^{-\beta(E_i-\mu N_i)}}{\Xi}, \qquad \Xi=\sum_i e^{-\beta(E_i-\mu N_i)}, \qquad \Omega=-T\ln\Xi.

Here Ξ\Xi is the grand partition function and Ω\Omega is the grand potential, not the microcanonical count. At fixed (T,V)(T,V),

⟨N⟩=T(∂ln⁡Ξ∂μ)T,V,Var⁡(N)=T(∂⟨N⟩∂μ)T,V=T2(∂2ln⁡Ξ∂μ2)T,V.\langle N\rangle=T\left(\frac{\partial\ln\Xi}{\partial\mu}\right)_{T,V}, \qquad \operatorname{Var}(N) =T\left(\frac{\partial\langle N\rangle}{\partial\mu}\right)_{T,V} =T^2\left(\frac{\partial^2\ln\Xi}{\partial\mu^2}\right)_{T,V}.

Volume differentiation supplies the equation of state,

p=T(∂ln⁡Ξ∂V)T,μ.p=T\left(\frac{\partial\ln\Xi}{\partial V}\right)_{T,\mu}.

For a homogeneous extensive phase in the thermodynamic limit, Euler scaling then gives Ω=−pV\Omega=-pV. Boundaries and other subextensive corrections prevent that last equality from being exact for a generic finite system.

The three main ensembles can therefore be read as a control-and-weight table:

EnsembleQuantities held fixedMicroscopic weightGenerated potential
MicrocanonicalE,V,NE,V,Nuniform in an energy shellS=ln⁡NES=\ln\mathcal N_E
CanonicalT,V,NT,V,Ne−βEi/Ze^{-\beta E_i}/ZF=−Tln⁡ZF=-T\ln Z
Grand canonicalT,V,μT,V,\mue−β(Ei−μNi)/Ξe^{-\beta(E_i-\mu N_i)}/\XiΩ=−Tln⁡Ξ\Omega=-T\ln\Xi

Optional bridge: Bose and Fermi occupation laws

Section titled “Optional bridge: Bose and Fermi occupation laws”

For noninteracting identical quantum particles, it is convenient to sum over the occupation number nrn_r of each one-particle mode with energy ϵr\epsilon_r. Let qr=e−β(ϵr−μ)q_r=e^{-\beta(\epsilon_r-\mu)}. A bosonic mode permits nr=0,1,2,…n_r=0,1,2,\ldots, so

ΞrB=∑n=0∞qrn=11−qr,⟨nr⟩B=1eβ(ϵr−μ)−1.\Xi_r^{\mathrm B}=\sum_{n=0}^{\infty}q_r^n=\frac{1}{1-q_r}, \qquad \langle n_r\rangle_{\mathrm B} =\frac{1}{e^{\beta(\epsilon_r-\mu)}-1}.

Convergence requires μ<ϵr\mu\lt \epsilon_r for every mode, hence μ\mu cannot exceed the lowest one-particle energy. A fermionic mode permits only nr=0,1n_r=0,1, so

ΞrF=1+qr,⟨nr⟩F=1eβ(ϵr−μ)+1.\Xi_r^{\mathrm F}=1+q_r, \qquad \langle n_r\rangle_{\mathrm F} =\frac{1}{e^{\beta(\epsilon_r-\mu)}+1}.

When eβ(ϵr−μ)≫1e^{\beta(\epsilon_r-\mu)}\gg1, both reduce to the dilute Maxwell–Boltzmann occupation e−β(ϵr−μ)e^{-\beta(\epsilon_r-\mu)}. These formulas assume noninteracting modes and equilibrium; interactions can invalidate the factorization even though the grand-canonical definition remains meaningful. Tong derives the Bose–Einstein and Fermi–Dirac laws in Tong, current notes, §§3.5.1 and 3.6, printed pp. 78–81 and 90–92.

The saddle-point bridge makes the canonical–microcanonical relation explicit. Let g(E) dEg(E)\,dE count states and choose one fixed reference width ΔE0\Delta E_0. Define

SΔ(E)=ln⁡ ⁣[g(E)ΔE0].S_\Delta(E)=\ln\!\left[g(E)\Delta E_0\right].

Then both the logarithm and the canonical measure are dimensionless:

Z(β)=∫dEΔE0eSΔ(E)−βE.Z(\beta) =\int\frac{dE}{\Delta E_0} e^{S_\Delta(E)-\beta E}.

Changing the fixed reference width adds a constant to SΔS_\Delta and does not change the saddle. Each finite canonical system fixes (V,N)(V,N). Suppose a no-exchange thermodynamic sequence has V,N→∞V,N\to\infty at fixed specific volume v=V/Nv=V/N, one interior dominant energy E∗E_*, and a twice-differentiable, strictly concave entropy near that point. Then

S′(E∗)=β=1T,S′′(E∗)=−1T2CV.S'(E_*)=\beta=\frac{1}{T}, \qquad S''(E_*)=-\frac{1}{T^2C_V}.

Thus CV>0C_V\gt 0 makes the stationary point a local maximum. Expanding the exponent to second order gives a Gaussian with Var⁡(E)=T2CV\operatorname{Var}(E)=T^2C_V. When CVC_V grows proportionally to NN at fixed temperature, the standard deviation of the energy per particle is Var⁡(E)/N=O(N−1/2)\sqrt{\operatorname{Var}(E)}/N=O(N^{-1/2}). The relative width Var⁡(E)/∣E∗∣\sqrt{\operatorname{Var}(E)}/|E_*| has the same scaling if the limiting mean energy per particle is nonzero; unlike that ratio, the fluctuation of energy per particle is unaffected by shifting the energy zero. This scaling can fail at critical points, and at first-order coexistence two competing saddles can produce a bimodal distribution rather than one Gaussian. A negative microcanonical heat-capacity branch has S′′>0S''\gt 0 and cannot be an ordinary canonical maximum.

For ordinary additive systems with short-range interactions and a well-defined thermodynamic limit, strict concavity in energy and a unique smooth saddle usually produce canonical–microcanonical concentration after matching EE and TT. For this no-exchange limit, write

s(e,v)=lim⁡N→∞SN(Ne,Nv,N)N,e=EN,v=VN.s(e,v)=\lim_{N\to\infty}\frac{S_N(Ne,Nv,N)}{N}, \qquad e=\frac{E}{N},\quad v=\frac{V}{N}.

Extending the conclusion to particle exchange instead uses the entropy per volume sV(eV,n)=lim⁡V→∞SV(eVV,V,nV)/Vs_V(e_V,n)=\lim_{V\to\infty}S_V(e_VV,V,nV)/V, with eV=E/Ve_V=E/V and n=N/Vn=N/V. It requires concentration in both densities and the corresponding joint concavity or large-deviation hypotheses; energy concavity alone is insufficient. Tong demonstrates the regular single-energy-saddle concentration in Tong, current notes, §1.3.2, printed pp. 19–21.

The sharper fixed-vv geometry suppresses the constant specific volume and writes s(e)=s(e,v)s(e)=s(e,v). A canonical inverse temperature β\beta realizes a microcanonical energy ee when ss has a supporting line there:

s(e′)≤s(e)+β(e′−e)for every allowed e′.s(e')\leq s(e)+\beta(e'-e) \quad\text{for every allowed }e'.

The figure turns that inequality into geometry. In the upper panel, inspect how the positive-slope tangent at e⋆e_\star stays above the entire entropy curve. In the lower panel, compare the depressed point e0e_0 with the positive-slope common tangent through the two outer contact points: no line through (e0,s(e0))(e_0,s(e_0)) can lie above both sides.

Two entropy-density plots compare a concave curve with a positive-slope tangent that stays above it at e-star against a nonconcave curve whose center energy e-zero lies below the positive-slope line joining two outer contact points; the first energy is canonically supported and the second is not.

A microcanonical energy is canonically realizable only where s(e)s(e) admits a supporting line. Panel (a) shows a strict positive-β\beta supporting tangent at e⋆e_\star, while panel (b) places e0e_0 in a nonconcave region of ss below a positive-slope common tangent, so no β\beta supports it and no canonical ensemble selects it as equilibrium. Original schematic; axes not to scale.

Any supporting line gives thermodynamic equivalence at that energy. Under the corresponding large-deviation hypotheses, strict support gives equality of the canonical and microcanonical equilibrium-macrostate sets, while nonstrict support generally gives only inclusion and permits several energies at one β\beta. Vanishing specific relative entropy can still hold in the nonstrict case; equality at the stronger specific-action level needs an additional concentration condition. At a point where ss has no supporting line, that energy is absent from every canonical equilibrium-energy set. Touchette separates these levels in Touchette 2015, Proposition 2, author-manuscript pp. 11–12; Theorem 7, p. 16; and Theorems 10 and 12, pp. 20–22 (Open PDF), and treats the additional particle-density saddle for canonical–grand-canonical equivalence in §VI.A, pp. 24–25.

Finite systems have nonzero fluctuations and surface corrections. Long-range nonadditive interactions make subsystem–reservoir separation delicate. Self-gravitating matter is the central warning for this site: the canonical variance identity forbids CV<0C_V\lt 0, while an isolated gravitating system may possess a negative microcanonical caloric slope. One must state the ensemble before calling either result unstable.

Agreement of thermodynamic potentials need not imply equality of finite-size probability distributions, and agreement of equilibrium macrostates need not make rare-event probabilities identical. Conversely, a local observable can agree between ensembles even when a global fluctuation does not. A static ensemble comparison specifies the observable, the matched intensive parameters, and the thermodynamic limit; convergence of long-time averages is a separate dynamical question.

For NN independent distinguishable units with energies 00 and ϵ>0\epsilon\gt0, find the canonical internal energy and heat capacity, and check their low- and high-temperature limits.

Solution

The one-unit and total partition functions are

Z1=1+e−βϵ,Z=Z1N.Z_1=1+e^{-\beta\epsilon}, \qquad Z=Z_1^N.

Therefore

U=−∂βln⁡Z=Nϵeβϵ+1,U=-\partial_\beta\ln Z =\frac{N\epsilon}{e^{\beta\epsilon}+1},

and

CV=∂U∂T=N(βϵ)2eβϵ(1+eβϵ)2≥0.C_V=\frac{\partial U}{\partial T} =N(\beta\epsilon)^2 \frac{e^{\beta\epsilon}}{(1+e^{\beta\epsilon})^2}\geq0.

At low temperature the excited state freezes out, so U,CV→0U,C_V\to0. At high temperature both levels are equally populated, U→Nϵ/2U\to N\epsilon/2, while the finite spectrum again makes CV→0C_V\to0. The heat capacity therefore has a Schottky peak at an intermediate temperature. The partition function produces both limits and the stability sign without tracking individual configurations.

The next page, Entropy, Relative Entropy, and Information, separates the physical meanings attached to the logarithms used here.

  • Tong, David. Statistical Physics. University of Cambridge Part II Mathematical Tripos lecture notes, current official undated-cover PDF, §§1.2–1.4, printed pp. 2–30; §§3.5.1 and 3.6, printed pp. 78–81 and 90–92. Open PDF.
  • Touchette, Hugo. “Equivalence and Nonequivalence of Ensembles: Thermodynamic, Macrostate, and Measure Levels.” Journal of Statistical Physics 159 (2015): 987–1016, §§III–VI.A. doi:10.1007/s10955-015-1212-2; Open PDF.