{
  "id": "canonical-ensemble",
  "title": "Canonical Ensemble",
  "lang": "en",
  "source_lang": "en",
  "summary": "The canonical ensemble describes equilibrium systems with fixed particle number and volume that exchange energy with a reservoir at a prescribed temperature.",
  "category": "science",
  "subcategory": "physics",
  "type": "concept",
  "aliases": [
    "NVT ensemble",
    "Gibbs canonical ensemble"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/canonical-ensemble/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/canonical-ensemble/",
      "json": "https://aiwiki.page/zh/canonical-ensemble.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The canonical ensemble is a probability distribution over the microscopic states of a system in thermal equilibrium at a fixed temperature. In its standard form, the particle number \\(N\\) and volume \\(V\\) are also fixed, while energy can fluctuate through exchange with a heat reservoir. It is a central framework of statistical mechanics, connecting microscopic energy levels to macroscopic thermal properties. (damtp.cam.ac.uk)"
    },
    {
      "heading": "Physical meaning",
      "text": "An ensemble represents a collection of hypothetical copies of a system, all subject to the same macroscopic constraints but potentially occupying different microscopic states. It is a statistical description, not necessarily a collection of physically interacting copies. The canonical ensemble specifies the probabilities of those states rather than the precise trajectory of any particular copy. (en.wikisource.org)\n\nThe usual physical realization is a system in thermal contact with a much larger reservoir. Energy exchange is allowed, but particles do not cross the boundary and the volume remains fixed. The reservoir is sufficiently large that energy transferred to or from the system produces a negligible change in its temperature. In the standard derivation, the interaction energy between system and reservoir is also negligible compared with their bulk energies. (homepage.univie.ac.at)\n\n“Fixed temperature” does not mean that every microscopic state has the same energy. Temperature is a parameter of the equilibrium distribution; the system’s energy is a fluctuating quantity. This distinguishes the canonical ensemble from an isolated system with fixed energy. (damtp.cam.ac.uk)"
    },
    {
      "heading": "Canonical distribution and partition function",
      "text": "For discrete microstates \\(i\\), with energies \\(E_i\\), the canonical probabilities are\n\n\\[p_i=\\frac{e^{-\\beta E_i}}{Z}, \\qquad \\beta=\\frac{1}{k_{\\mathrm B}T},\\]\n\nwhere \\(k_{\\mathrm B}\\) is the Boltzmann constant. The normalization factor\n\n\\[Z(N,V,T)=\\sum_i e^{-\\beta E_i}\\]\n\nis the canonical partition function. This probability law is the Boltzmann distribution. For an observable \\(A\\) that has value \\(A_i\\) in microstate \\(i\\), its ensemble expectation value is\n\n\\[\\langle A\\rangle=\\sum_i p_iA_i.\\]\n\nThese expressions apply when the state sum converges. (damtp.cam.ac.uk)\n\nThe sum counts microstates, not merely distinct energy values. If an energy level \\(E_a\\) has degeneracy \\(g_a\\), then\n\n\\[Z=\\sum_a g_a e^{-\\beta E_a}, \\qquad P(E_a)=\\frac{g_a e^{-\\beta E_a}}{Z}.\\]\n\nConsequently, although an individual high-energy state has a smaller probability than an individual low-energy state at positive temperature, an energy range containing many states can carry substantial total probability. (damtp.cam.ac.uk)"
    },
    {
      "heading": "Derivation from a heat reservoir",
      "text": "Consider an isolated composite consisting of the system and its reservoir, with total energy \\(E_{\\mathrm{tot}}\\). If the system occupies microstate \\(i\\), the reservoir has energy approximately \\(E_{\\mathrm{tot}}-E_i\\). Assuming equal probabilities for accessible microstates of the composite, the probability of \\(i\\) is proportional to the number of compatible reservoir states:\n\n\\[p_i\\propto\\Omega_{\\mathrm R}(E_{\\mathrm{tot}}-E_i).\\]\n\nWriting the reservoir’s entropy as\n\\(S_{\\mathrm R}=k_{\\mathrm B}\\ln\\Omega_{\\mathrm R}\\), expand it to first order:\n\n\\[S_{\\mathrm R}(E_{\\mathrm{tot}}-E_i) \\simeq S_{\\mathrm R}(E_{\\mathrm{tot}}) -\\frac{E_i}{T},\\]\n\nbecause \\(\\partial S_{\\mathrm R}/\\partial E_{\\mathrm R}=1/T\\). Exponentiating and normalizing gives \\(p_i=e^{-\\beta E_i}/Z\\). The approximation expresses the reservoir’s effectively constant temperature; finite-reservoir corrections arise from higher-order terms. (homepage.univie.ac.at)\n\nAn alternative derivation maximizes the Gibbs entropy\n\n\\[S=-k_{\\mathrm B}\\sum_i p_i\\ln p_i\\]\n\nsubject to normalization and a prescribed mean energy. Lagrange multipliers yield the same exponential distribution, with the energy multiplier identified as \\(\\beta\\). Fixing the mean energy in this derivation is not equivalent to requiring every state to have that energy. (morrisongroup.nsm.uh.edu)"
    },
    {
      "heading": "Classical and quantum formulations",
      "text": "Classical phase space\n\nIn classical mechanics, a microscopic state is a point in phase space, specified by positions and momenta. For \\(N\\) identical particles in three spatial dimensions, the conventional classical partition function is\n\n\\[Z_N= \\frac{1}{N!h^{3N}} \\int d^{3N}q\\,d^{3N}p\\, e^{-\\beta H(q,p)}.\\]\n\nHere \\(H\\) is the Hamiltonian and \\(h\\) is the Planck constant. The integration respects the system’s spatial boundaries. The factor \\(h^{3N}\\) makes the state-counting measure dimensionless, while \\(N!\\) corrects the overcounting caused by assigning labels to identical particles in the classical dilute-gas regime. Distinguishable particles require different counting. (damtp.cam.ac.uk)\n\nQuantum density operator\n\nIn quantum mechanics, the canonical state is represented by the density operator\n\n\\[\\hat\\rho=\\frac{e^{-\\beta\\hat H}}{Z}, \\qquad Z=\\operatorname{Tr}\\!\\left(e^{-\\beta\\hat H}\\right),\\]\n\nwhere \\(\\hat H\\) is the Hamiltonian operator. An observable \\(\\hat A\\) has expectation value\n\n\\[\\langle\\hat A\\rangle =\\operatorname{Tr}(\\hat\\rho\\hat A).\\]\n\nIn the energy eigenbasis, this reproduces the discrete Boltzmann probabilities. (damtp.cam.ac.uk)\n\nFor a fixed-\\(N\\) quantum gas, the trace is taken over the appropriate \\(N\\)-particle state space, including the symmetry requirements for identical particles. Thus the canonical framework applies to both bosonic and fermionic systems; it is not restricted to classical particle statistics. (damtp.cam.ac.uk)"
    },
    {
      "heading": "Thermodynamic relations",
      "text": "The principal connection to thermodynamics is the Helmholtz free energy:\n\n\\[F(N,V,T)=-k_{\\mathrm B}T\\ln Z.\\]\n\nFor a Hamiltonian with no explicit temperature dependence, the mean internal energy is\n\n\\[U=\\langle E\\rangle =-\\left(\\frac{\\partial\\ln Z}{\\partial\\beta}\\right)_{V,N}.\\]\n\nThe entropy satisfies\n\n\\[S=k_{\\mathrm B}(\\ln Z+\\beta U) =-\\left(\\frac{\\partial F}{\\partial T}\\right)_{V,N},\\]\n\nand therefore \\(F=U-TS\\). (penrose.uri.edu)\n\nFor a simple compressible system, the equilibrium pressure is\n\n\\[P=-\\left(\\frac{\\partial F}{\\partial V}\\right)_{T,N} =k_{\\mathrm B}T \\left(\\frac{\\partial\\ln Z}{\\partial V}\\right)_{T,N}.\\]\n\nThe chemical potential is\n\\(\\mu=(\\partial F/\\partial N)_{T,V}\\) in a thermodynamic description where particle number is treated as continuous. Even though a particular canonical ensemble has fixed \\(N\\), comparing partition functions at different particle numbers determines the free-energy cost of adding particles. (diposit.ub.edu)"
    },
    {
      "heading": "Energy fluctuations",
      "text": "Energy fluctuations follow directly from derivatives of \\(\\ln Z\\):\n\n\\[\\operatorname{Var}(E) =\\langle E^2\\rangle-\\langle E\\rangle^2 =\\frac{\\partial^2\\ln Z}{\\partial\\beta^2}.\\]\n\nTheir connection to the constant-volume heat capacity is\n\n\\[\\operatorname{Var}(E)=k_{\\mathrm B}T^2C_V, \\qquad C_V=\\left(\\frac{\\partial U}{\\partial T}\\right)_{V,N}.\\]\n\nThis relates an equilibrium fluctuation to a macroscopic thermal response. It also implies \\(C_V\\geq0\\) for the ordinary canonical ensemble under these assumptions. (damtp.cam.ac.uk)\n\nFor many extensive systems away from critical regimes, \\(U\\) and \\(C_V\\) are proportional to \\(N\\). The energy’s standard deviation then grows as \\(\\sqrt N\\), while its mean grows as \\(N\\), so relative fluctuations typically decrease as \\(N^{-1/2}\\). Macroscopic energy can therefore appear effectively constant even though it is not fixed microscopically. (damtp.cam.ac.uk)"
    },
    {
      "heading": "Example: a classical ideal gas",
      "text": "For a monatomic ideal gas of identical particles, neglecting internal excitations,\n\n\\[Z_N=\\frac{1}{N!} \\left(\\frac{V}{\\lambda_T^3}\\right)^N, \\qquad \\lambda_T=\\frac{h}{\\sqrt{2\\pi m k_{\\mathrm B}T}},\\]\n\nwhere \\(m\\) is the particle mass and \\(\\lambda_T\\) is the thermal de Broglie wavelength. The classical dilute-gas approximation requires\n\\(n\\lambda_T^3\\ll1\\), with \\(n=N/V\\). (damtp.cam.ac.uk)\n\nDifferentiating this partition function gives\n\n\\[PV=Nk_{\\mathrm B}T, \\qquad U=\\frac32Nk_{\\mathrm B}T, \\qquad C_V=\\frac32Nk_{\\mathrm B}.\\]\n\nThus both the gas’s equation of state and its thermal energy emerge from microscopic state counting. (damtp.cam.ac.uk)"
    },
    {
      "heading": "Relation to other ensembles",
      "text": "The microcanonical ensemble fixes \\(N\\), \\(V\\), and energy, describing an isolated system. The canonical ensemble instead fixes \\(N\\), \\(V\\), and \\(T\\), allowing energy fluctuations. The grand canonical ensemble fixes \\(V\\), \\(T\\), and chemical potential, allowing both energy and particle-number fluctuations. The appropriate ensemble depends on which quantities are controlled and which exchanges are permitted. (damtp.cam.ac.uk)\n\nFor many additive systems with short-range interactions, the ensembles yield equivalent bulk thermodynamic predictions in the thermodynamic limit, with temperature and energy chosen consistently. This equivalence does not make their probability distributions identical or eliminate finite-size differences. (damtp.cam.ac.uk)\n\nEquivalence is not universal. In some nonadditive systems with long-range interactions, microcanonical states can have negative heat capacity and no corresponding stable canonical equilibrium. An explicit example occurs in the infinite-range Blume–Emery–Griffiths model, where canonical and microcanonical phase diagrams differ in part of the parameter space. (arxiv.org)"
    },
    {
      "heading": "Computational use and limitations",
      "text": "Canonical averages are frequently estimated using Markov chain Monte Carlo. With symmetric trial proposals, the Metropolis algorithm accepts a move with energy change \\(\\Delta E\\) with probability\n\n\\[a=\\min\\!\\left(1,e^{-\\beta\\Delta E}\\right).\\]\n\nThe partition function cancels from the acceptance ratio. Detailed balance, together with suitable accessibility and convergence conditions, allows the resulting chain to sample the canonical distribution. (research.coe.drexel.edu)\n\nThe ensemble specifies equilibrium probabilities, not how rapidly a physical system reaches equilibrium. Likewise, a sampling procedure may have the correct stationary distribution yet explore it slowly. Insufficient equilibration or poor exploration of accessible states can therefore compromise numerical estimates without invalidating the ensemble itself. (websites.umich.edu)\n\nThe simple reservoir derivation also has a restricted domain: appreciable reservoir-temperature changes or substantial system–reservoir interaction energy prevent its assumptions from being applied directly. A finite or strongly coupled environment requires a treatment of the composite rather than an unqualified use of the isolated system’s Boltzmann weights. (homepage.univie.ac.at)"
    },
    {
      "heading": "Historical development",
      "text": "J. Willard Gibbs systematically developed the canonical ensemble within his ensemble formulation of statistical mechanics in Elementary Principles in Statistical Mechanics, published in 1902. His approach replaced exclusive attention to individual mechanical trajectories with distributions over hypothetical systems, providing a general framework for the statistical foundations of thermodynamics. (en.wikisource.org)"
    }
  ],
  "links": [
    "probability-distribution",
    "thermodynamic-equilibrium",
    "temperature",
    "energy",
    "statistical-mechanics",
    "boltzmann-constant",
    "partition-function",
    "boltzmann-distribution",
    "expected-value",
    "entropy",
    "classical-mechanics",
    "phase-space",
    "planck-constant",
    "quantum-mechanics",
    "density-matrix",
    "hamiltonian-operator",
    "thermodynamics",
    "helmholtz-free-energy",
    "internal-energy",
    "pressure",
    "chemical-potential",
    "heat-capacity",
    "ideal-gas",
    "equation-of-state",
    "microcanonical-ensemble",
    "grand-canonical-ensemble",
    "thermodynamic-limit",
    "markov-chain-monte-carlo",
    "detailed-balance"
  ],
  "sources": [
    {
      "title": "2 Canonical ensemble",
      "url": "https://homepage.univie.ac.at/Franz.Vesely/sp_english/sp/node19.html"
    },
    {
      "title": "Boltzmann statistics and entropy — NB2220 Statistical Physics",
      "url": "https://interactivetextbooks.tudelft.nl/NB2220/content/Exercise_set_4.html"
    },
    {
      "title": "Statistical Mechanics lecture notes",
      "url": "https://morrisongroup.nsm.uh.edu/content/5-courses/statmech.pdf"
    },
    {
      "title": "Microcanonical Origin of the Maximum Entropy Principle for Open Systems",
      "url": "https://arxiv.org/abs/1206.5888"
    },
    {
      "title": "Canonical partition functions: ideal quantum gases, interacting classical gases, and interacting quantum gases",
      "url": "https://arxiv.org/abs/1710.02819"
    },
    {
      "title": "Statistical mechanics notes",
      "url": "https://jila.colorado.edu/~ajsh/astr5110_13/notes/statmech.pdf"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}