Skip to content

Use these formulas to move between equilibrium probabilities, thermodynamic potentials, and fluctuations. The trace space and the variables held fixed matter as much as the partition function itself: a fixed-number state has no number fluctuations, whereas a grand-canonical state generally does.

Required background. Statistical ensembles compares physical controls; thermal density operators constructs Gibbs states; partition functions explains the state sums used here.

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.

Ensemble Controlled quantities Fluctuating quantities Equilibrium operator
microcanonical EE, VV, NN within a stated window energy may vary within the shell; NN is fixed normalized projector onto the energy shell
canonical TT, VV, NN energy e−βHN/ZNe^{-\beta H_N}/Z_N
grand canonical TT, VV, μ\mu energy and particle number e−β(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).

In an energy eigenbasis this is ⟨A⟩=∑npnAnn\langle A\rangle=\sum_n p_n A_{nn}, whether or not [A,HN]=0[A,H_N]=0. Off-diagonal elements matter in products and time-dependent correlations, but do not enter this one-point trace.

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}.
Potential Natural variables Definition Differential
internal energy UU S,V,NS,V,N UU dU=T dS−P dV+μ dNdU=T\,dS-P\,dV+\mu\,dN
enthalpy HthH_{\mathrm{th}} S,P,NS,P,N Hth=U+PVH_{\mathrm{th}}=U+PV dHth=T dS+V dP+μ dNdH_{\mathrm{th}}=T\,dS+V\,dP+\mu\,dN
Helmholtz free energy FF T,V,NT,V,N F=U−TSF=U-TS dF=−S dT−P dV+μ dNdF=-S\,dT-P\,dV+\mu\,dN
Gibbs free energy GG T,P,NT,P,N G=U−TS+PVG=U-TS+PV dG=−S dT+V dP+μ dNdG=-S\,dT+V\,dP+\mu\,dN
grand potential Ω\Omega T,V,μT,V,\mu Ω=U−TS−μN\Omega=U-TS-\mu N dΩ=−S dT−P dV−N dμd\Omega=-S\,dT-P\,dV-N\,d\mu

These differentials require a differentiable equilibrium state function and the listed work variables. Extensivity is an additional assumption for Euler identities such as U=TS−PV+μNU=TS-PV+\mu N, not for the differential relations themselves. Include surface or other work terms when their parameters vary. 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.

For a temperature-independent scalar CC, 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. If CC depends on an external parameter, the corresponding free-energy derivative also changes by the derivative of CC; an omitted constant is then not harmless for forces.

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;
  • entropy branches that lack the supporting-line condition, including possible nonconcave branches in bounded-spectrum systems;
  • observables dominated by global fluctuations;
  • limits taken in different orders.

Agreement of mean densities does not imply equality of fluctuation distributions. Negative temperature alone does not cause ensemble inequivalence: an additive bounded-spectrum system can have a concave entropy branch with negative slope.

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

  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. 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.

  • R. Balian, From Microphysics to Macrophysics, Volume I, Springer (1991).
  • 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).