← thecodex.expert
Thermodynamics & Statistical Mechanics Hub Physicist Biographies
Definition Curious Exploring Deep Dive Sources
Statistical Mechanics · Concept

Canonical Ensemble

Reading time: 9 minConfidence: HighLast verified: October 2026

The canonical ensemble is the statistical ensemble of a system with fixed particle number N and volume V in thermal equilibrium with a heat reservoir at temperature T. Each microstate i of energy Ei occurs with probability Pi = e−Ei/kBT/Z, where Z is the partition function; the natural thermodynamic potential is the Helmholtz free energy F = −kBT ln Z.

Curious

One sentence that captures itThe canonical ensemble describes a system that can trade energy with its surroundings at a fixed temperature, like a cup of tea sitting in a room.

Most real systems are not isolated: a gas in a bottle, a protein in a cell, or a crystal on a bench exchange heat with their surroundings and settle at the surroundings' temperature. Their energy is not fixed but fluctuates slightly. The canonical ensemble, introduced by J. Willard Gibbs in 1902, describes exactly this situation (see Josiah Willard Gibbs).

Its central result is the Boltzmann distribution: the probability of finding the system in a state with energy E is proportional to e−E/kBT. Low-energy states are favoured, but higher ones are visited more often as the temperature rises (see Partition Function).

Exploring

Worked example — how big are the energy fluctuations?In the canonical ensemble the energy fluctuates with variance ⟨(ΔE)²⟩ = kBT²CV. For an ideal monatomic gas, ⟨E⟩ = (3/2)NkBT and CV = (3/2)NkB, so the relative fluctuation is √(2/3N). For one mole (N = 6.02×1023) this is about 1.05×10−12, far too small to measure, which is why canonical and microcanonical descriptions give the same thermodynamics for large systems. (Computed in Python.)
EnsembleFixedExchanges with surroundingsKey function
MicrocanonicalE, V, NNothing (isolated)Multiplicity Ω, entropy S = kB ln Ω
CanonicalT, V, NEnergyPartition function Z, free energy F = −kBT ln Z
Grand canonicalT, V, μEnergy and particlesGrand partition function Ξ, grand potential Φ = −kBT ln Ξ
Common mistake — Commonly ConfusedThe temperature in the canonical ensemble belongs to the heat bath; the system's energy fluctuates, but T is fixed. This differs from the microcanonical ensemble, where energy is fixed and temperature is derived. For small systems, such as single molecules or nanoparticles, the two descriptions can give measurably different results.

Deep Dive

Primary sourceGibbs, J.W. (1902). Elementary Principles in Statistical Mechanics. New York: Scribner's.

Derivation. Treat the system plus a much larger reservoir as an isolated (microcanonical) whole. The probability of the system being in state i is proportional to the number of reservoir microstates with energy Etot − Ei, i.e. exp[SR(Etot − Ei)/kB]; expanding SR to first order and using ∂SR/∂E = 1/T gives Pi ∝ e−Ei/kBT (see Microcanonical Ensemble). Equivalently, the canonical distribution maximises the Gibbs entropy −kBΣPi ln Pi at fixed mean energy (Jaynes, 1957).

Equivalence of ensembles. In the thermodynamic limit, for systems with short-range interactions, microcanonical, canonical and grand canonical ensembles give the same thermodynamics. Equivalence can fail for systems with long-range interactions, such as self-gravitating systems, which can have negative heat capacity in the microcanonical ensemble, impossible canonically (see Stellar Structure).

Computation. Monte Carlo methods (the Metropolis algorithm, 1953) sample states with canonical probabilities and are among the most widely used computational tools in physics and chemistry; molecular-dynamics simulations use thermostats to generate canonical sampling.

Sources

  • Gibbs, J.W. (1902). Elementary Principles in Statistical Mechanics. Scribner's.
  • Jaynes, E.T. (1957). “Information Theory and Statistical Mechanics.” Physical Review, 106, 620–630.
  • Metropolis, N., et al. (1953). “Equation of State Calculations by Fast Computing Machines.” Journal of Chemical Physics, 21, 1087–1092.
Last verified: October 2026 · Source: Gibbs (1902); Jaynes (1957); Metropolis et al. (1953) · Confidence: high