Skip to content

The canonical ensemble describes a system that can exchange energy with a thermal environment while its particle number and external control parameters are fixed. Its standard macroscopic controls are

T,V,N,T,\qquad V,\qquad N,

with Hamiltonian HN(V,λ,…)H_N(V,\lambda,\ldots) acting on the fixed-NN Hilbert space.

The equilibrium state is

ρN,β=e−βHNZN,\rho_{N,\beta} = \frac{ e^{-\beta H_N} }{ Z_N },

where

ZN(β,V,λ,…)=Tr⁡HNe−βHN.Z_N(\beta,V,\lambda,\ldots) = \operatorname{Tr}_{\mathcal H_N} e^{-\beta H_N}.

The subscript NN is often suppressed, but the trace domain is part of the ensemble definition. The general operator properties of this state live in Thermal Density Operators. Here the focus is fixed-T,N,VT,N,V thermodynamics.

Helpful background. Use thermal density operators for the spectral Gibbs state and ensemble comparison for the trace-space choice.

Quantity Canonical status
temperature TT externally fixed
volume VV and other controls externally fixed
particle number NN fixed exactly
energy EE fluctuates
density operator ρN,β\rho_{N,\beta}
thermodynamic potential Helmholtz free energy FF

The ensemble describes a probability distribution over energy eigenstates in one fixed-particle-number sector. It does not imply that particles are exchanged with the environment. Particle exchange belongs to the grand-canonical ensemble.

Let a system exchange energy with a much larger bath. Neglect their interaction energy in the equilibrium state count and assign equal probabilities in the composite energy shell. If the system occupies one eigenstate of energy EnE_n, its weight is proportional to the bath’s compatible state count WB(Etot−En)W_B(E_{\mathrm{tot}}-E_n).

Choose a reference system energy U∗U_* and write δEn=En−U∗\delta E_n=E_n-U_* and EB∗=Etot−U∗E_B^*=E_{\mathrm{tot}}-U_*. Expanding the smooth bath entropy about EB∗E_B^* gives

SB(EB∗−δEn)=SB(EB∗)−δEnT−(δEn)22T2CB+⋯ .S_B(E_B^*-\delta E_n) =S_B(E_B^*)-\frac{\delta E_n}{T} -\frac{(\delta E_n)^2}{2T^2 C_B}+\cdots.

Here TT and CB=(∂EB/∂T)C_B=(\partial E_B/\partial T) are evaluated at the reference bath state. Dividing by kBk_{\mathrm B} and exponentiating yields

pn∝e−βEnexp⁡ ⁣[−(δEn)22kBT2CB+⋯ ].p_n\propto e^{-\beta E_n} \exp\!\left[-\frac{(\delta E_n)^2}{2k_{\mathrm B}T^2 C_B}+\cdots\right].

The reference-dependent constant cancels in normalization. An effectively infinite bath makes the correction negligible throughout the energies the system appreciably samples. For a stable bath with CB>0C_B>0, the quadratic correction suppresses excursions relative to the ideal Boltzmann weights. Expanding about a reference energy makes this criterion independent of the energy zero.

This derivation assumes an equilibrium shell assignment and meaningful subsystem energies. Weak contact can permit equilibration while contributing negligible equilibrium interaction energy. When that approximation fails, the reduced state involves a Hamiltonian of mean force.

The Partition Function as a Generating Object

Section titled “The Partition Function as a Generating Object”

The logarithm of the fixed-sector trace determines equilibrium energy, entropy, and free energy. The following derivatives hold with the other external parameters fixed; see partition functions for spectral evaluation and cumulants.

Define

F(T,V,N,λ,…)=−kBTln⁡ZN.F(T,V,N,\lambda,\ldots) = -k_{\mathrm B}T\ln Z_N.

Equivalently,

βF=−ln⁡ZN.\beta F = -\ln Z_N.

The internal energy is

U=⟨HN⟩=−∂∂βln⁡ZN,U = \langle H_N\rangle = -\frac{\partial}{\partial\beta} \ln Z_N,

for a Hamiltonian with no explicit temperature or β\beta dependence.

Another useful identity is

U=∂∂β(βF).U = \frac{\partial}{\partial\beta} \left( \beta F \right).

The entropy follows from

S=−(∂F∂T)V,N,λS = -\left( \frac{\partial F}{\partial T} \right)_{V,N,\lambda}

and equals

S=kB(ln⁡ZN+βU).S = k_{\mathrm B} \left( \ln Z_N+\beta U \right).

These relations use the natural logarithm.

The Helmholtz free energy is the thermodynamic potential appropriate to fixed TT, VV, and NN:

F=U−TS.F = U-TS.

At positive temperature, the Gibbs state minimizes the state functional

FT(ρ)=Tr⁡(ρHN)−TS(ρ)\mathcal F_T(\rho) = \operatorname{Tr}(\rho H_N) - TS(\rho)

over normalized density operators on HN\mathcal H_N.

The equilibrium value is

FT(ρN,β)=F=−kBTln⁡ZN.\mathcal F_T(\rho_{N,\beta}) = F = -k_{\mathrm B}T\ln Z_N.

Free energy balances energy against entropy. At positive temperature, low energy and large entropy both lower this functional. For a normalizable negative-temperature Gibbs state the variational inequality reverses; see the relative-entropy identity.

Let the Hamiltonian depend on an external parameter λ\lambda. Even when HH and ∂λH\partial_\lambda H do not commute, cyclicity of the trace gives

∂F∂λ=⟨∂H∂λ⟩β.\frac{\partial F}{\partial\lambda} = \left\langle \frac{\partial H}{\partial\lambda} \right\rangle_\beta.

If the physical generalized force is defined by

Xλ=−∂H∂λ,\mathcal X_\lambda = -\frac{\partial H}{\partial\lambda},

then

⟨Xλ⟩=−∂F∂λ.\langle\mathcal X_\lambda\rangle = -\frac{\partial F}{\partial\lambda}.

Examples include:

P=−(∂F∂V)T,NP = -\left( \frac{\partial F}{\partial V} \right)_{T,N}

for pressure and

M=−(∂F∂B)T,NM = -\left( \frac{\partial F}{\partial B} \right)_{T,N}

for magnetization when the Hamiltonian contains the appropriate magnetic-field coupling.

Sign conventions follow the definition of the Hamiltonian term. They should be checked rather than memorized independently of HH.

For a simple system,

dF=−S dT−P dV+μ dN.dF = -S\,dT - P\,dV + \mu\,dN.

The canonical ensemble holds NN fixed during fluctuations, but μ\mu can still be defined by comparing neighboring fixed-NN systems:

μ=(∂F∂N)T,V\mu = \left( \frac{\partial F}{\partial N} \right)_{T,V}

in a thermodynamic or smoothly interpolated description.

At finite integer NN, addition and removal chemical potentials are naturally finite differences:

μ+=FN+1−FN,μ−=FN−FN−1.\begin{aligned} \mu_+ &= F_{N+1}-F_N, \\ \mu_- &= F_N-F_{N-1}. \end{aligned}

They need not coincide in a finite system or across a gap.

The second β\beta derivative of ln⁡ZN\ln Z_N is

∂2∂β2ln⁡ZN=⟨HN2⟩−⟨HN⟩2.\frac{\partial^2}{\partial\beta^2} \ln Z_N = \langle H_N^2\rangle - \langle H_N\rangle^2.

Therefore

Var⁡(E)=−∂U∂β.\operatorname{Var}(E) = -\frac{\partial U}{\partial\beta}.

For a temperature-independent Hamiltonian,

CV≡(∂U∂T)V,N=kBβ2Var⁡(E).C_V \equiv \left( \frac{\partial U}{\partial T} \right)_{V,N} = k_{\mathrm B}\beta^2 \operatorname{Var}(E).

Thus

CV≥0C_V\geq0

in the canonical ensemble under these assumptions.

This does not prove that every definition of heat capacity in every ensemble is nonnegative. Microcanonical and nonadditive long-range systems can require separate analysis.

For distinct energy values EaE_a with degeneracy gag_a,

Pβ(Ea)=gae−βEaZN.P_\beta(E_a)=\frac{g_a e^{-\beta E_a}}{Z_N}.

The degeneracy multiplies the probability of the energy value, not the probability of each individual eigenstate. The competition between increasing state count and decreasing Boltzmann weight determines the typical energy.

For regular additive systems away from criticality, CV∝NC_V\propto N, so the root-mean-square fluctuation of energy per particle is

Var⁡(E)N∝N−1/2.\frac{\sqrt{\operatorname{Var}(E)}}{N}\propto N^{-1/2}.

The ratio to the mean energy has this scaling only if the chosen energy density is nonzero; it depends on the arbitrary energy zero. Concentration of energy density is the physically useful statement. It helps establish ensemble equivalence under additional locality and regularity assumptions, but global fluctuations still distinguish the ensembles.

Near a critical point the scaling can change. At first-order coexistence the energy distribution can be bimodal, so a Gaussian approximation need not describe it.

The exact density of states is ωN(E)=∑agaδ(E−Ea)\omega_N(E)=\sum_a g_a\delta(E-E_a), with units of inverse energy. Then

ZN(β)=∫dE ωN(E)e−βE.Z_N(\beta)=\int dE\,\omega_N(E)e^{-\beta E}.

For a smooth approximation, define a dimensionless entropy using a fixed reference energy ε0\varepsilon_0:

Sω(E)=kBln⁡[ε0ωN(E)],ZN≃∫dEε0eSω(E)/kB−βE.S_\omega(E)=k_{\mathrm B}\ln[\varepsilon_0\omega_N(E)],\qquad Z_N\simeq\int\frac{dE}{\varepsilon_0} e^{S_\omega(E)/k_{\mathrm B}-\beta E}.

An interior dominant maximum satisfies Sω′(E∗)=1/TS_\omega'(E_*)=1/T. If it is sufficiently sharp and unique, F≃E∗−TSω(E∗)F\simeq E_*-T S_\omega(E_*) at leading extensive order. At coexistence several contributions may compete; a stationary point is not enough to identify the dominant one. The microcanonical entropy conventions explain the relation to finite-window counts.

Suppose

H=HA⊗IB+IA⊗HBH = H_A\otimes\mathbb I_B + \mathbb I_A\otimes H_B

on

H=HA⊗HB.\mathcal H = \mathcal H_A\otimes\mathcal H_B.

The terms commute, so

e−βH=e−βHA⊗e−βHB.e^{-\beta H} = e^{-\beta H_A} \otimes e^{-\beta H_B}.

Therefore

ZAB=ZAZB,Z_{AB} = Z_AZ_B,

and

FAB=FA+FB.F_{AB} = F_A+F_B.

This factorization assumes a tensor-product decomposition with independent Hamiltonians. Identical-particle symmetrization, global particle-number constraints, or interactions can prevent a naive product of one-particle partition functions.

Canonical Ensemble and Identical Particles

Section titled “Canonical Ensemble and Identical Particles”

For NN identical particles, the trace must be taken over the appropriate symmetric or antisymmetric NN-particle subspace:

ZN(±)=Tr⁡HN(±)e−βHN.Z_N^{(\pm)} = \operatorname{Tr}_{\mathcal H_N^{(\pm)}} e^{-\beta H_N}.

One should not begin with an NN-fold labeled-particle trace and forget to impose exchange symmetry.

For a dilute classical gas, a factor of 1/N!1/N! emerges in the appropriate limit. For a quantum-degenerate gas, Bose–Einstein or Fermi–Dirac statistics must be treated directly.

The canonical ensemble fixes NN exactly. It can still describe identical particles, occupation numbers, and exchange correlations.

For a finite-dimensional Hamiltonian H(g)H(g) analytic in a real parameter gg,

ZN(β,g)=Tr⁡e−βH(g)>0Z_N(\beta,g) = \operatorname{Tr} e^{-\beta H(g)} > 0

at finite positive temperature. Therefore

FN(β,g)=−1βln⁡ZN(β,g)F_N(\beta,g) = -\frac{1}{\beta} \ln Z_N(\beta,g)

is analytic under the stated assumptions.

Finite systems can have sharp peaks, rapid crossovers, and bimodal distributions. A genuine thermal nonanalyticity requires an infinite-system or another singular limit.

Zero temperature is different: taking β→∞\beta\to\infty can expose a finite-system level crossing in the ground-state energy.

Temperature-Dependent Effective Hamiltonians

Section titled “Temperature-Dependent Effective Hamiltonians”

The familiar identity

U=−∂βln⁡ZU = -\partial_\beta\ln Z

assumes HH has no explicit β\beta dependence. If an effective Hamiltonian is written as H(β)H(\beta), then

−∂∂βln⁡Z=⟨H+β∂H∂β⟩.-\frac{\partial}{\partial\beta} \ln Z = \left\langle H + \beta \frac{\partial H}{\partial\beta} \right\rangle.

The extra term cannot be dropped.

Temperature-dependent effective Hamiltonians can arise after integrating out degrees of freedom or fitting phenomenological parameters. Their thermodynamic consistency must be derived from the underlying model rather than assumed from formal resemblance.

Let

H=Δ∣1⟩⟨1∣,Δ>0.H = \Delta|1\rangle\langle1|, \qquad \Delta>0.

With

x=βΔ,x = \beta\Delta,

the partition function is

Z1=1+e−x.Z_1 = 1+e^{-x}.

The free energy and internal energy are

F1=−kBTln⁡(1+e−x),U1=Δex+1.\begin{aligned} F_1 &= -k_{\mathrm B}T \ln(1+e^{-x}), \\ U_1 &= \frac{\Delta}{ e^x+1 }. \end{aligned}

The energy variance is

Var⁡(E)=Δ2ex(1+ex)2.\operatorname{Var}(E) = \Delta^2 \frac{e^x}{ (1+e^x)^2 }.

Therefore

C1kB=x2ex(1+ex)2.\frac{C_1}{k_{\mathrm B}} = x^2 \frac{e^x}{ (1+e^x)^2 }.

The heat capacity vanishes as T→0T\to0 and T→∞T\to\infty and has a finite-temperature Schottky peak.

For LL distinguishable noninteracting copies,

HL=∑j=1LΔ∣1⟩j⟨1∣.H_L = \sum_{j=1}^{L} \Delta |1\rangle_j\langle1|.

Factorization gives

ZL=(1+e−x)L.Z_L = (1+e^{-x})^L.

Consequently,

FL=LF1,UL=LU1,CL=LC1.\begin{gathered} F_L = L F_1, \\ U_L = L U_1, \\ C_L = L C_1. \end{gathered}

The energy standard deviation grows as L\sqrt L, while the mean energy grows as LL at fixed finite temperature. Relative energy fluctuations therefore scale as L−1/2L^{-1/2}.

For

H=ℏω(a†a+12),H = \hbar\omega \left( a^\dagger a+\frac12 \right),

define

x=βℏω.x = \beta\hbar\omega.

The partition function is

Z=e−x/21−e−x.Z = \frac{ e^{-x/2} }{ 1-e^{-x} }.

The internal energy is

U=ℏω(12+1ex−1).U = \hbar\omega \left( \frac12 + \frac{1}{e^x-1} \right).

The heat capacity is

CkB=x2ex(ex−1)2.\frac{C}{k_{\mathrm B}} = x^2 \frac{e^x}{ (e^x-1)^2 }.

As T→0T\to0, U→ℏω/2U\to\hbar\omega/2 and C→0C\to0. At high temperature, UU approaches kBTk_{\mathrm B}T and CC approaches kBk_{\mathrm B}.

If H′=H+CIH'=H+C\mathbb I, determine how ρβ\rho_\beta, ZZ, FF, UU, SS, and CVC_V change.

Solution

The partition function changes by

Z′=e−βCZ.Z' = e^{-\beta C}Z.

The normalized state is unchanged:

ρβ′=ρβ.\rho_\beta' = \rho_\beta.

The free energy and internal energy shift:

F′=F+C,U′=U+C.F'=F+C, \qquad U'=U+C.

The entropy is

S′=U′−F′T=S,S' = \frac{U'-F'}{T} = S,

and CV=∂U/∂TC_V=\partial U/\partial T is unchanged when CC is temperature independent.

For LL independent two-level sites with energies 00 and Δ\Delta, derive ZLZ_L, FLF_L, and the probability that exactly mm sites are excited.

Solution

Each site has

Z1=1+e−βΔ.Z_1 = 1+e^{-\beta\Delta}.

Independence gives

ZL=Z1L,FL=LF1.Z_L = Z_1^L, \qquad F_L = L F_1.

There are (Lm)\binom{L}{m} configurations with mm excitations, each of energy mΔm\Delta. Hence

Pr⁡(m)=(Lm)e−βmΔ(1+e−βΔ)L.\Pr(m) = \binom{L}{m} \frac{ e^{-\beta m\Delta} }{ (1+e^{-\beta\Delta})^L }.

This is a binomial distribution with single-site excitation probability 1/(eβΔ+1)1/(e^{\beta\Delta}+1).

Show that

Var⁡(E)=∂2∂β2ln⁡Z.\operatorname{Var}(E) = \frac{\partial^2}{\partial\beta^2} \ln Z.
Solution

First,

∂∂βln⁡Z=−⟨H⟩.\frac{\partial}{\partial\beta} \ln Z = -\langle H\rangle.

Differentiating again,

∂2∂β2ln⁡Z=1ZTr⁡(H2e−βH)−[1ZTr⁡(He−βH)]2=⟨H2⟩−⟨H⟩2.\begin{aligned} \frac{\partial^2}{\partial\beta^2} \ln Z &= \frac{1}{Z} \operatorname{Tr} \left( H^2e^{-\beta H} \right) - \left[ \frac{1}{Z} \operatorname{Tr} \left( He^{-\beta H} \right) \right]^2 \\ &= \langle H^2\rangle - \langle H\rangle^2. \end{aligned}

For H(λ)=Δσz+λσxH(\lambda)=\Delta\sigma_z+\lambda\sigma_x with fixed Δ>0\Delta>0, calculate FF and verify ∂λF=⟨σx⟩\partial_\lambda F=\langle\sigma_x\rangle even though [H,σx]≠0[H,\sigma_x]\ne0.

Solution

Since H2=r2IH^2=r^2 I, where r=Δ2+λ2r=\sqrt{\Delta^2+\lambda^2}, its eigenvalues are ±r\pm r. Thus

F=−1βln⁡[2cosh⁡(βr)],∂λF=−λrtanh⁡(βr).F=-\frac1\beta\ln[2\cosh(\beta r)],\qquad \partial_\lambda F=-\frac{\lambda}{r}\tanh(\beta r).

The density operator is ρ=12[I−tanh⁡(βr)H/r]\rho=\tfrac12[I-\tanh(\beta r)H/r]. Using Tr⁡(σiσj)=2δij\operatorname{Tr}(\sigma_i\sigma_j)=2\delta_{ij} gives the same result for ⟨σx⟩\langle\sigma_x\rangle. Cyclicity of the trace justifies the first derivative without replacing a noncommuting operator exponential by scalar differentiation.

  • H. B. Callen, Thermodynamics and an Introduction to Thermostatistics, 2nd ed., Wiley (1985).
  • K. Huang, Statistical Mechanics, 2nd ed., Wiley (1987).
  • M. Kardar, Statistical Physics of Particles, Cambridge University Press (2007).
  • L. D. Landau and E. M. Lifshitz, Statistical Physics, Part 1, 3rd ed., Butterworth–Heinemann (1980).
  • R. K. Pathria and P. D. Beale, Statistical Mechanics, 3rd ed., Elsevier (2011).
  • L. E. Reichl, A Modern Course in Statistical Physics, 4th ed., Wiley–VCH (2016).