Skip to content

Ensemble Formula Sheet

This page collects the equilibrium ensemble formulas used most often in many-body quantum mechanics. It is a lookup sheet, not a replacement for the canonical derivations:

Unless otherwise stated,

β=1kBT,\beta = \frac{1}{k_B T},

HH has no explicit temperature dependence, and all derivatives hold the variables displayed in their subscripts fixed.

EnsembleControlled quantitiesFluctuating quantitiesEquilibrium operator
microcanonicalEE, VV, NN within a stated windownone of the controlled extensive quantitiesnormalized projector onto the energy shell
canonicalTT, VV, NNenergye−βHN/ZNe^{-\beta H_N}/Z_N
grand canonicalTT, VV, μ\muenergy and particle numbere−β(H−μN)/Ξe^{-\beta(H-\mu N)}/\Xi

The controls identify the ensemble, but finite-size constraints and conserved sectors remain part of the specification.

For a fixed-particle-number Hilbert space HN\mathcal H_N,

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

with partition function

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

The trace is over the fixed-NN sector. For identical particles, that sector already has the required Bose or Fermi symmetry.

F(T,V,N,λ,…)=−kBTln⁡ZN=−1βln⁡ZN.F(T,V,N,\lambda,\ldots) = -k_B T\ln Z_N = -\frac{1}{\beta}\ln Z_N. ⟨A⟩β=Tr⁡(ρN,βA).\langle A\rangle_\beta = \operatorname{Tr} \left( \rho_{N,\beta}A \right).

If AA does not commute with HNH_N, this trace remains the correct equilibrium expectation value. Only its energy-basis evaluation contains off-diagonal matrix elements that vanish when ρ\rho is diagonal and the trace is taken.

For a β\beta-independent Hamiltonian,

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

Equivalently,

U=F−T(∂F∂T)V,N.U = F - T \left( \frac{\partial F}{\partial T} \right)_{V,N}. S=−kBTr⁡(ρN,βln⁡ρN,β).S = -k_B \operatorname{Tr} \left( \rho_{N,\beta}\ln\rho_{N,\beta} \right).

For the Gibbs state,

S=kB(ln⁡ZN+βU).S = k_B \left( \ln Z_N+\beta U \right).

The thermodynamic derivative is

S=−(∂F∂T)V,N.S = - \left( \frac{\partial F}{\partial T} \right)_{V,N}. CV=(∂U∂T)V,N.C_V = \left( \frac{\partial U}{\partial T} \right)_{V,N}.

For a temperature-independent Hamiltonian,

CV=kBβ2Var⁡(HN),C_V = k_B\beta^2 \operatorname{Var}(H_N),

where

Var⁡(HN)=⟨HN2⟩−⟨HN⟩2.\operatorname{Var}(H_N) = \langle H_N^2\rangle - \langle H_N\rangle^2.

Equivalently,

∂2∂β2ln⁡ZN=Var⁡(HN).\frac{\partial^2}{\partial\beta^2} \ln Z_N = \operatorname{Var}(H_N).

For a volume parameter with a well-defined thermodynamic derivative,

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

For a Hamiltonian parameter λ\lambda,

(∂F∂λ)T,V,N=⟨∂HN∂λ⟩.\left( \frac{\partial F}{\partial\lambda} \right)_{T,V,N} = \left\langle \frac{\partial H_N}{\partial\lambda} \right\rangle.

If the physical generalized force is defined by

Xλ=−∂HN∂λ,X_\lambda = - \frac{\partial H_N}{\partial\lambda},

then

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

The sign depends on how λ\lambda is coupled in the Hamiltonian.

For a simple system,

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

At strictly fixed integer NN in a finite system, the derivative with respect to NN is not literal. The chemical-potential term is a thermodynamic-limit or finite-difference statement.

Let NN be a conserved number operator satisfying

[H,N]=0.[H,N]=0.

Define the grand Hamiltonian

K≡H−μN.K \equiv H-\mu N.

The equilibrium density operator is

ρgc=e−βKΞ,\rho_{\mathrm{gc}} = \frac{e^{-\beta K}}{\Xi},

with grand partition function

Ξ(β,μ,V)=Tr⁡Fe−β(H−μN).\Xi(\beta,\mu,V) = \operatorname{Tr}_{\mathcal F} e^{-\beta(H-\mu N)}.

The trace is over the relevant Fock space or direct sum of number sectors.

Define the fugacity

z=eβμ.z = e^{\beta\mu}.

When HH preserves number,

Ξ=∑N=0∞zNZN.\Xi = \sum_{N=0}^{\infty} z^N Z_N.

Thus Ξ\Xi is a generating function for canonical partition functions. Convergence restricts the allowed μ\mu in some bosonic systems.

Ω(T,V,μ)=−kBTln⁡Ξ=−1βln⁡Ξ.\Omega(T,V,\mu) = -k_B T\ln\Xi = -\frac{1}{\beta}\ln\Xi.

For a homogeneous extensive system in the thermodynamic limit,

Ω=−PV.\Omega = -PV.

For a finite or inhomogeneous system, use the derivative definition

P=−(∂Ω∂V)T,μP = - \left( \frac{\partial\Omega}{\partial V} \right)_{T,\mu}

when a volume variation is well defined. The identity Ω=−PV\Omega=-PV requires homogeneity and extensivity; it is not a universal finite-system formula.

N‾≡⟨N⟩=1β(∂ln⁡Ξ∂μ)β,V.\overline N \equiv \langle N\rangle = \frac{1}{\beta} \left( \frac{\partial\ln\Xi}{\partial\mu} \right)_{\beta,V}.

Equivalently,

N‾=−(∂Ω∂μ)T,V\overline N = - \left( \frac{\partial\Omega}{\partial\mu} \right)_{T,V}

and

N‾=z∂ln⁡Ξ∂z.\overline N = z \frac{\partial\ln\Xi}{\partial z}.

For β\beta-independent HH, NN, and fixed μ\mu,

⟨K⟩=−(∂ln⁡Ξ∂β)μ,V.\langle K\rangle = - \left( \frac{\partial\ln\Xi}{\partial\beta} \right)_{\mu,V}.

Therefore

U≡⟨H⟩=−(∂ln⁡Ξ∂β)μ,V+μN‾.U \equiv \langle H\rangle = - \left( \frac{\partial\ln\Xi}{\partial\beta} \right)_{\mu,V} + \mu\overline N.

If the derivative is instead taken at fixed fugacity zz, then

U=−(∂ln⁡Ξ∂β)z,V.U = - \left( \frac{\partial\ln\Xi}{\partial\beta} \right)_{z,V}.

The distinction between fixed μ\mu and fixed zz matters because z=eβμz=e^{\beta\mu}.

S=−kBTr⁡(ρgcln⁡ρgc).S = -k_B \operatorname{Tr} \left( \rho_{\mathrm{gc}}\ln\rho_{\mathrm{gc}} \right).

For the grand-canonical Gibbs state,

S=kB[ln⁡Ξ+β(U−μN‾)].S = k_B \left[ \ln\Xi + \beta \left( U-\mu\overline N \right) \right].

Equivalently,

S=−(∂Ω∂T)V,μ.S = - \left( \frac{\partial\Omega}{\partial T} \right)_{V,\mu}. Var⁡(N)=⟨N2⟩−N‾ 2.\operatorname{Var}(N) = \langle N^2\rangle - \overline N^{\,2}.

The fluctuation identity is

Var⁡(N)=1β(∂N‾∂μ)T,V.\operatorname{Var}(N) = \frac{1}{\beta} \left( \frac{\partial\overline N}{\partial\mu} \right)_{T,V}.

In terms of fugacity,

Var⁡(N)=z∂N‾∂z.\operatorname{Var}(N) = z \frac{\partial\overline N}{\partial z}.

If n=N‾/Vn=\overline N/V and the isothermal compressibility is

κT=1n2(∂n∂μ)T,\kappa_T = \frac{1}{n^2} \left( \frac{\partial n}{\partial\mu} \right)_T,

then

Var⁡(N)=kBT Vn2κT.\operatorname{Var}(N) = k_B T\, Vn^2\kappa_T.

This relation assumes the derivative and thermodynamic variables use consistent volume and boundary conventions.

For fixed μ\mu,

∂2ln⁡Ξ∂β2=Var⁡(K),\frac{\partial^2\ln\Xi}{\partial\beta^2} = \operatorname{Var}(K),

with

Var⁡(K)=⟨(H−μN)2⟩−⟨H−μN⟩2.\operatorname{Var}(K) = \left\langle (H-\mu N)^2 \right\rangle - \left\langle H-\mu N \right\rangle^2.

This is not generally equal to Var⁡(H)\operatorname{Var}(H) because energy and particle number can be correlated.

For a simple homogeneous system,

dΩ=−S dT−P dV−N‾ dμ.d\Omega = -S\,dT - P\,dV - \overline N\,d\mu.

The Legendre relation is

Ω=U−TS−μN‾.\Omega = U-TS-\mu\overline N.

For definitions, entropy conventions, and isolated-system caveats, see Microcanonical Ensemble.

Choose an energy window

[E,E+ΔE][E,E+\Delta E]

inside a fixed-NN Hilbert space, and let ΠE,ΔE\Pi_{E,\Delta E} project onto the states in that window. Define

W(E,ΔE)=Tr⁡ΠE,ΔE.W(E,\Delta E) = \operatorname{Tr} \Pi_{E,\Delta E}.

The normalized microcanonical state is

ρmc=ΠE,ΔEW(E,ΔE).\rho_{\mathrm{mc}} = \frac{ \Pi_{E,\Delta E} }{ W(E,\Delta E) }.

Its shell entropy is

Smc=kBln⁡W(E,ΔE).S_{\mathrm{mc}} = k_B\ln W(E,\Delta E).

The window must be wide enough to contain many levels for thermodynamic use, yet narrow on macroscopic energy scales. Different entropy conventions use a shell count, integrated density of states, or smoothed density of states; the convention must be stated before differentiating.

When a differentiable thermodynamic entropy S(E,V,N)S(E,V,N) exists,

1T=(∂S∂E)V,N,\frac{1}{T} = \left( \frac{\partial S}{\partial E} \right)_{V,N},

and

PT=(∂S∂V)E,N.\frac{P}{T} = \left( \frac{\partial S}{\partial V} \right)_{E,N}.
PotentialNatural variablesDefinitionDifferential
internal energy UUS,V,NS,V,NUUdU=T dS−P dV+μ dNdU=T\,dS-P\,dV+\mu\,dN
enthalpy HthH_{\mathrm{th}}S,P,NS,P,NHth=U+PVH_{\mathrm{th}}=U+PVdHth=T dS+V dP+μ dNdH_{\mathrm{th}}=T\,dS+V\,dP+\mu\,dN
Helmholtz free energy FFT,V,NT,V,NF=U−TSF=U-TSdF=−S dT−P dV+μ dNdF=-S\,dT-P\,dV+\mu\,dN
Gibbs free energy GGT,P,NT,P,NG=U−TS+PVG=U-TS+PVdG=−S dT+V dP+μ dNdG=-S\,dT+V\,dP+\mu\,dN
grand potential Ω\OmegaT,V,μT,V,\muΩ=U−TS−μN\Omega=U-TS-\mu NdΩ=−S dT−P dV−N dμd\Omega=-S\,dT-P\,dV-N\,d\mu

The differentials assume the ordinary thermodynamic state variables exist and surface, long-range, finite-size, and nonextensive corrections are under control. Thermodynamic Potentials derives the table and explains when exact finite-system sums reduce to Legendre transforms.

For a β\beta-independent Hamiltonian,

∂nln⁡ZN∂βn=(−1)nκn(HN),\frac{\partial^n\ln Z_N}{\partial\beta^n} = (-1)^n \kappa_n(H_N),

where κn(HN)\kappa_n(H_N) is the nnth energy cumulant. In particular,

κ1(HN)=U,κ2(HN)=Var⁡(HN).\kappa_1(H_N) = U, \qquad \kappa_2(H_N) = \operatorname{Var}(H_N).

Using α=βμ\alpha=\beta\mu,

∂nln⁡Ξ∂αn=κn(N)\frac{\partial^n\ln\Xi}{\partial\alpha^n} = \kappa_n(N)

at fixed β\beta and VV. Thus

∂ln⁡Ξ∂α=N‾,∂2ln⁡Ξ∂α2=Var⁡(N).\frac{\partial\ln\Xi}{\partial\alpha} = \overline N, \qquad \frac{\partial^2\ln\Xi}{\partial\alpha^2} = \operatorname{Var}(N).

For a generalized Gibbs state

ρ∝exp⁡(−∑aλaQa),\rho \propto \exp \left( -\sum_a\lambda_a Q_a \right),

with mutually commuting conserved quantities QaQ_a,

−∂⟨Qa⟩∂λb=Cov⁡(Qa,Qb),-\frac{\partial\langle Q_a\rangle} {\partial\lambda_b} = \operatorname{Cov}(Q_a,Q_b),

where

Cov⁡(A,B)=⟨AB⟩−⟨A⟩⟨B⟩.\operatorname{Cov}(A,B) = \langle AB\rangle - \langle A\rangle\langle B\rangle.

For noncommuting operators, derivatives involve imaginary-time ordered or Kubo–Mori correlations rather than the naive covariance. Do not extend the commuting formula without checking the operator ordering.

If

H′=H+CI,H' = H+C I,

then

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

and

F′=F+C.F' = F+C.

The normalized state is unchanged:

ρ′=e−β(H+CI)e−βCZ=ρ.\rho' = \frac{ e^{-\beta(H+CI)} }{ e^{-\beta C}Z } = \rho.

Therefore expectation values of unchanged observables, entropy, heat capacity, and energy variance are invariant. The numerical internal energy shifts by CC.

Canonical, grand-canonical, and microcanonical ensembles often give the same local thermodynamic predictions when:

  • the thermodynamic limit exists;
  • interactions are sufficiently short ranged or additive;
  • the system is away from singular finite-size regimes;
  • the selected state lies in a stable phase;
  • conserved sectors and symmetry-breaking limits are handled consistently.

Equivalence can fail or require qualification for:

  • finite systems;
  • long-range nonadditive interactions;
  • phase coexistence and first-order transitions;
  • constrained, fragmented, or integrable sectors;
  • negative-temperature systems with bounded spectra;
  • observables dominated by global fluctuations;
  • limits taken in different orders.

Agreement of mean densities does not imply equality of fluctuation distributions.

See Ensemble Equivalence for the supporting-line and large-deviation tests, local quantum-state criterion, and finite-size and coexistence qualifications.

Use the microcanonical ensemble when total energy and particle number are sharply fixed and the energy shell is the natural macroscopic description.

Use the canonical ensemble when energy exchange establishes a temperature while particle number and external controls are fixed.

Use the grand-canonical ensemble when energy and particles can be exchanged, or when summing over number sectors is a controlled computational convenience and μ\mu is fixed by the desired mean number.

Before applying a formula, state:

  1. the Hilbert space or number sector traced over;
  2. the conserved quantities and imposed constraints;
  3. TT, VV, NN, μ\mu, and any generalized fields held fixed;
  4. whether HH depends explicitly on TT, μ\mu, or another differentiation variable;
  5. boundary conditions and finite-volume normalization;
  6. whether the thermodynamic limit is being used;
  7. whether the system is homogeneous and extensive;
  8. the order of zero-temperature, infinite-volume, and source-removal limits.
  • Omitting the number-sector restriction on the canonical trace.
  • Using Ω=−PV\Omega=-PV for a finite, trapped, or inhomogeneous system without qualification.
  • Taking a β\beta derivative while silently allowing HH or μ\mu to depend on β\beta.
  • Confusing fixed fugacity with fixed chemical potential.
  • Treating μ\mu as a one-particle energy rather than a thermodynamic conjugate.
  • Assuming a grand-canonical density operator implies number-changing unitary dynamics.
  • Using fluctuation identities when the relevant partition function does not converge.
  • Applying ordinary covariance formulas to noncommuting generalized charges.
  • Treating ensemble equivalence as exact for every finite system and every observable.
  • Ignoring surface terms, long-range interactions, or phase coexistence in thermodynamic derivatives.
  • Comparing entropies without stating the energy-window or density-of-states convention.
  • Forgetting that a temperature-dependent effective Hamiltonian adds derivative terms.
  1. R. K. Pathria and P. D. Beale, Statistical Mechanics, 3rd ed., Elsevier (2011).
  2. K. Huang, Statistical Mechanics, 2nd ed., Wiley (1987).
  3. L. D. Landau and E. M. Lifshitz, Statistical Physics, Part 1, 3rd ed., Butterworth-Heinemann (1980).
  4. M. Kardar, Statistical Physics of Particles, Cambridge University Press (2007).
  5. R. Balian, From Microphysics to Macrophysics, Volume I, Springer (1991).
  6. H. B. Callen, Thermodynamics and an Introduction to Thermostatistics, 2nd ed., Wiley (1985).
  1. Shift the energy zero. Show that shifting H↦H+CIH\mapsto H+CI leaves the canonical entropy and heat capacity unchanged.
Solution

The partition function becomes

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

so

ln⁡Z′=ln⁡Z−βC.\ln Z' = \ln Z-\beta C.

The internal energy shifts to

U′=−∂βln⁡Z′=U+C.U' = -\partial_\beta\ln Z' = U+C.

Using

S=kB(ln⁡Z+βU),S = k_B(\ln Z+\beta U),

gives

S′=kB[ln⁡Z−βC+β(U+C)]=S.\begin{aligned} S' &= k_B \left[ \ln Z-\beta C + \beta(U+C) \right] \\ &= S. \end{aligned}

Because CC is temperature independent,

CV′=∂(U+C)∂T=CV.C_V' = \frac{\partial(U+C)}{\partial T} = C_V.
  1. Energy fluctuations. Derive the canonical relation
CV=kBβ2Var⁡(H).C_V = k_B\beta^2 \operatorname{Var}(H).
Solution

For a temperature-independent Hamiltonian,

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

Differentiate once more:

∂U∂β=−∂2ln⁡Z∂β2=−Var⁡(H).\frac{\partial U}{\partial\beta} = -\frac{\partial^2\ln Z}{\partial\beta^2} = -\operatorname{Var}(H).

Since

dβdT=−1kBT2=−kBβ2,\frac{d\beta}{dT} = -\frac{1}{k_B T^2} = -k_B\beta^2,

the chain rule gives

CV=∂U∂T=∂U∂βdβdT=kBβ2Var⁡(H).C_V = \frac{\partial U}{\partial T} = \frac{\partial U}{\partial\beta} \frac{d\beta}{dT} = k_B\beta^2 \operatorname{Var}(H).
  1. Number fluctuations. Starting from N‾=β−1∂μln⁡Ξ\overline N=\beta^{-1}\partial_\mu\ln\Xi, derive the grand-canonical fluctuation identity.
Solution

At fixed β\beta,

∂N‾∂μ=1β∂2ln⁡Ξ∂μ2.\frac{\partial\overline N}{\partial\mu} = \frac{1}{\beta} \frac{\partial^2\ln\Xi}{\partial\mu^2}.

Differentiating the trace shows

∂2ln⁡Ξ∂μ2=β2(⟨N2⟩−⟨N⟩2).\frac{\partial^2\ln\Xi}{\partial\mu^2} = \beta^2 \left( \langle N^2\rangle - \langle N\rangle^2 \right).

Therefore

Var⁡(N)=1β(∂N‾∂μ)T,V.\operatorname{Var}(N) = \frac{1}{\beta} \left( \frac{\partial\overline N}{\partial\mu} \right)_{T,V}.

Because β−1=kBT\beta^{-1}=k_B T, larger compressibility produces larger equilibrium number fluctuations.

  1. Fixed fugacity versus fixed chemical potential. Explain why
U=−(∂βln⁡Ξ)zU = -\left(\partial_\beta\ln\Xi\right)_z

but

U−μN‾=−(∂βln⁡Ξ)μ.U-\mu\overline N = -\left(\partial_\beta\ln\Xi\right)_\mu.
Solution

Write the sector expansion

Ξ=∑N,rexp⁡[−βENr+βμN].\Xi = \sum_{N,r} \exp \left[ -\beta E_{Nr} + \beta\mu N \right].

At fixed μ\mu, differentiating the exponent gives

−ENr+μN,-E_{Nr}+\mu N,

so

−(∂βln⁡Ξ)μ=⟨H−μN⟩=U−μN‾.-\left(\partial_\beta\ln\Xi\right)_\mu = \langle H-\mu N\rangle = U-\mu\overline N.

At fixed z=eβμz=e^{\beta\mu}, the factor zNz^N is held constant while only e−βENre^{-\beta E_{Nr}} is differentiated. Therefore

−(∂βln⁡Ξ)z=U.-\left(\partial_\beta\ln\Xi\right)_z = U.
  1. Choose the ensemble. Select an ensemble for each situation: an isolated finite system with sharply fixed energy; a spin sample exchanging heat but not particles; and atoms in a subsystem exchanging particles and energy with a much larger cloud.
Solution
  • The isolated system with sharply fixed energy is naturally microcanonical, with a stated finite energy window.
  • The spin sample exchanging heat while its degrees of freedom remain fixed is naturally canonical.
  • The atomic subsystem exchanging both energy and particles is naturally grand canonical, with μ\mu determined by equilibrium with the larger cloud.

These choices describe the controls. A different ensemble can sometimes be used as a calculational device, but finite-size corrections and fluctuation predictions must then be checked.