Grand Partition Function

The canonical partition function has one stubborn defect: it insists on a fixed number of particles. Try to compute the properties of an ideal quantum gas canonically and you hit a wall — the constraint ∑knk=N\sum_k n_k = N ties every single-particle level to every other, and the sum over occupation numbers refuses to factorize. The grand partition function Ξ\Xi dissolves that wall by a single, almost cavalier, move: stop fixing NN. Let the system exchange particles with a reservoir at chemical potential μ\mu, weight each microstate by the Gibbs factor e−β(E−μN)e^{-\beta(E-\mu N)}, and sum over all particle numbers at once. The payoff is spectacular. Because the number constraint is gone, the grand sum factorizes level by level, Ξ=∏kΞk\Xi=\prod_k \Xi_k, and each mode is handled independently. Out of a single scalar Ξk\Xi_k — a two-term sum for fermions, a geometric series for bosons — the entire architecture of quantum statistics falls: the Fermi–Dirac occupation ⟨nk⟩=1/(eβ(εk−μ)+1)\langle n_k\rangle = 1/(e^{\beta(\varepsilon_k-\mu)}+1), the Bose–Einstein occupation 1/(eβ(εk−μ)−1)1/(e^{\beta(\varepsilon_k-\mu)}-1), and the classical Maxwell–Boltzmann limit, all as derivatives ⟨nk⟩=z ∂zln⁡Ξk\langle n_k\rangle = z\,\partial_z\ln\Xi_k of the same object with a single sign flip. The price is that NN now fluctuates. But in the thermodynamic limit those fluctuations vanish as N−1/2N^{-1/2}, so grand-canonical and canonical predictions agree — you gain the calculational power for free. This article defines Ξ\Xi, works the fugacity expansion, derives BE and FD as one formula with a sign, and computes the boson/fermion/classical occupation numbers you can read off a plot. Every numeric and sign claim here is python-verified.

Key takeaways
  • The grand partition function Ξ=∑N∑ie−β(Ei(N)−μN)=∑NzNZN\Xi=\sum_{N}\sum_i e^{-\beta(E_i^{(N)}-\mu N)}=\sum_N z^N Z_N sums the Gibbs factor over all microstates and all particle numbers; z=eβμz=e^{\beta\mu} is the fugacity.
  • Relaxing the fixed-NN constraint lets Ξ\Xi factorize over single-particle levels, Ξ=∏kΞk\Xi=\prod_k\Xi_k — the decisive advantage over the canonical ensemble.
  • Each mode gives Ξk=(1−ze−βεk)−1\Xi_k = (1-ze^{-\beta\varepsilon_k})^{-1} (bosons) or 1+ze−βεk1+ze^{-\beta\varepsilon_k} (fermions); one is a geometric series, the other truncates at one particle (Pauli).
  • Mean occupation is a derivative: ⟨nk⟩=z ∂zln⁡Ξk=1/(eβ(εk−μ)∓1)\langle n_k\rangle = z\,\partial_z\ln\Xi_k = 1/(e^{\beta(\varepsilon_k-\mu)}\mp1) — Bose–Einstein (−-) and Fermi–Dirac (++) from one formula, plus the classical ze−βεkze^{-\beta\varepsilon_k} at small zz.
  • Total number is ⟨N⟩=z ∂zln⁡Ξ=∑k⟨nk⟩\langle N\rangle = z\,\partial_z\ln\Xi = \sum_k\langle n_k\rangle, and ln⁡Ξ=βPV\ln\Xi=\beta PV for a homogeneous system.
  • Key idea: drop the fixed-NN constraint and weight each state by e−β(E−μN)e^{-\beta(E-\mu N)}; the normalization Ξ=∑NzNZN\Xi=\sum_N z^N Z_N then factorizes over modes, and one scalar Ξk\Xi_k generates the Bose–Einstein, Fermi–Dirac, and classical occupation numbers with a single sign flip.
The core insight

The grand partition function Ξ=∑NzNZN=∏kΞk\Xi=\sum_N z^N Z_N=\prod_k\Xi_k trades a fixed but awkward particle number for a fluctuating but factorizable one. From the single-mode scalar Ξk\Xi_k, the mean occupation ⟨nk⟩=z ∂zln⁡Ξk=1/(eβ(εk−μ)∓1)\langle n_k\rangle=z\,\partial_z\ln\Xi_k=1/(e^{\beta(\varepsilon_k-\mu)}\mp1) generates Bose–Einstein, Fermi–Dirac, and Maxwell–Boltzmann statistics with one sign flip — the quantum origin of the ∓\mp (boson symmetry vs fermion exclusion) is developed later in Quantum Statistics.

Where this lives today

The grand partition function is the workhorse of quantum many-body physics and computational statistical mechanics. Every calculation of an ideal quantum gas — the electron gas in a metal, the neutron gas in a neutron star, the photon gas of blackbody radiation, the phonon gas of a solid, the cold-atom Bose gases in optical-lattice experiments — starts from ln⁡Ξ=∓∑kln⁡(1∓z e−βεk)\ln\Xi=\mp\sum_k\ln(1\mp z\,e^{-\beta\varepsilon_k}) and reads off the equation of state PV=kBTln⁡ΞPV=k_BT\ln\Xi and the occupation numbers. Bose–Einstein condensation is diagnosed as the breakdown of the grand-canonical ground-state term when μ→ε0\mu\to\varepsilon_0; the Fermi surface and degeneracy pressure of compact stars follow from the fermion case. The grand ensemble is not a convenience here — it is the only tractable framework, because the fixed-NN constraint that cripples the canonical ensemble is exactly what Ξ\Xi removes. Beyond ideal gases, the grand-canonical formalism underlies modern simulations. Grand Canonical Monte Carlo (GCMC) inserts and removes particles at fixed μ\mu, VV, and TT to compute adsorption isotherms in porous materials (zeolites, metal–organic frameworks) and fluid phase equilibria. In lattice quantum chromodynamics, the "chemical potential" is the baryon chemical potential, and the grand partition function of quarks and gluons is the object whose sign problem currently blocks first-principles study of dense nuclear matter. In condensed matter the electronic chemical potential is the Fermi level, so semiconductor devices, electrochemistry, and battery modeling all rest on equalizing μ\mu across junctions. Wherever particle number is set by a bath rather than fixed by hand, Ξ\Xi is the right starting point.

The physical picture

Picture a small imaginary box drawn inside a vast gas. Molecules drift across its boundary in both directions, and energy flows too. The surrounding gas — the reservoir — fixes two "prices": the price of energy, set by the temperature TT, and the price of admitting one more particle, set by the chemical potential μ\mu. The grand partition function is the complete ledger of the box: it tallies every possible content — every particle number NN and every internal configuration — each entry weighted by how favorable it is against those two prices, through the Gibbs factor e−β(E−μN)e^{-\beta(E-\mu N)}. The fugacity z=eβμz=e^{\beta\mu} is the "chemical gain knob." A configuration containing NN particles carries a weight zNz^N, so increasing zz biases the distribution toward larger particle numbers — exactly as raising a voltage drives more charge onto a plate. That is why Ξ=∑NzNZN\Xi=\sum_N z^N Z_N reads as a power series in zz whose coefficients are the ordinary canonical partition functions ZNZ_N: the grand ensemble is a fugacity-weighted stack of canonical ensembles.

Figure
The grand ensemble: a small open box exchanges energy (through T) and particles (through μ) with a reservoir. The fugacity z = e^(βμ) is the chemical gain that sets how favorable it is to hold more particles.
reservoir: fixed T, μ open system particle in (μ) particle out energy in/out (T) state weight ∝ e^(−β(E−μN)) = z^N e^(−βE)

The deeper reason the grand ensemble is so powerful is combinatorial. In the canonical ensemble, the sum over occupation numbers {nk}\{n_k\} must respect ∑knk=N\sum_k n_k = N — a Kronecker delta that couples every level to every other and blocks any factorization. Free NN from that constraint and each level becomes an independent subsystem, occupied at its own leisure. The grand sum then factorizes, Ξ=∏kΞk\Xi=\prod_k\Xi_k, and a many-body problem collapses into single-mode arithmetic. This is the whole reason ideal quantum gases are tractable at all. The punchline is what a single scalar Ξk\Xi_k delivers. Sum the mode over its allowed occupations — a two-term sum {0,1}\{0,1\} for fermions (Pauli truncates it) or an infinite geometric series {0,1,2,… }\{0,1,2,\dots\} for bosons — take the logarithm, differentiate, and you get the mean occupation ⟨nk⟩\langle n_k\rangle. The three fundamental occupation distributions of statistical physics emerge from this one derivative with nothing more than a sign change. As the plot below shows, the boson curve lies above the classical Maxwell–Boltzmann limit (bunching), the fermion curve is capped at one (Pauli exclusion), and both reduce to the Maxwell–Boltzmann distribution when ε−μ≫kBT\varepsilon-\mu\gg k_BT.

Figure
Occupation ⟨n⟩ vs (ε−μ)/kT for one level. Bosons (blue) rise above; fermions (red) are capped at 1; classical Maxwell–Boltzmann (amber, dashed) sits between. At ε−μ = kT the three read 0.582, 0.368, 0.269 — verified numbers.
(ε − μ)/k_BT⟨n⟩ 1 0.5 bosons (bunching) classical (MB) fermions (capped at 1) ε−μ=k_BT 0.582 0.368 0.269

The core equations

The grand partition function sums the Gibbs factor over every microstate in every particle-number sector. Written as a fugacity series, its coefficients are the ordinary canonical partition functions, which is why Ξ\Xi "contains" the whole canonical hierarchy at once:

Ξ(T,V,μ)=∑N=0∞∑ie−β(Ei(N)−μN)=∑N=0∞zN ZN(T,V),z=eβμ(1)\Xi(T,V,\mu)=\sum_{N=0}^{\infty}\sum_{i}e^{-\beta(E_i^{(N)}-\mu N)}=\sum_{N=0}^{\infty}z^{N}\,Z_N(T,V),\qquad z=e^{\beta\mu} \qquad (1)

where: Ξ\Xi — grand partition function (dimensionless); β=1/kBT\beta=1/k_BT; μ\mu — chemical potential set by the reservoir; Ei(N)E_i^{(N)} — energy of microstate ii in the NN-particle sector; zz — fugacity; ZNZ_N — canonical partition function for NN particles. The N=0N=0 term is z0Z0=1z^0 Z_0=1 (the empty system). The grand-canonical probability of a microstate weights it by its energy and its particle content, then normalizes by Ξ\Xi. This is the Gibbs distribution — the direct generalization of the Boltzmann distribution to open systems:

PN,i=1Ξ e−β(Ei(N)−μN)(2)P_{N,i}=\frac{1}{\Xi}\,e^{-\beta(E_i^{(N)}-\mu N)} \qquad (2)

where: PN,iP_{N,i} — probability of finding microstate ii with NN particles. Raising μ\mu (hence zz) increases the weight of high-NN states; the sign is E−μNE-\mu N, so adding a particle "costs" μ\mu and is rewarded when μ\mu is large. Mean particle number is a logarithmic derivative with respect to the fugacity — the same generating-function trick that gave energy from ln⁡Z\ln Z, now applied to zz:

⟨N⟩=z ∂ln⁡Ξ∂z=kBT(∂ln⁡Ξ∂μ)T,V(2′)\langle N\rangle=z\,\frac{\partial\ln\Xi}{\partial z}=k_BT\left(\frac{\partial\ln\Xi}{\partial\mu}\right)_{T,V} \qquad (2')

where: ⟨N⟩\langle N\rangle — ensemble-averaged number. Because z ∂zz\,\partial_z acting on zNz^N returns N zNN\,z^N, this derivative pulls the factor NN down into the sum and produces ∑NN PN=⟨N⟩\sum_N N\,P_N=\langle N\rangle. The decisive structural fact is factorization. When the energy is a sum over independent single-particle levels and the particle number is N=∑knkN=\sum_k n_k, the grand partition function factorizes as Ξ=∏kΞk\Xi=\prod_k\Xi_k because there is no longer a global constraint ∑knk=N\sum_k n_k=N coupling the occupation numbers:

Ξ=∏kΞk,Ξk=∑nk(z e−βεk)nk(3)\Xi=\prod_{k}\Xi_k,\qquad \Xi_k=\sum_{n_k} \left(z\,e^{-\beta\varepsilon_k}\right)^{n_k} \qquad (3)

where: Ξk\Xi_k — single-mode grand partition function; nkn_k — occupation of level kk. For fermions nk∈{0,1}n_k\in\{0,1\}; for bosons nk∈{0,1,2,… }n_k\in\{0,1,2,\dots\}. This one line is the whole reason the grand ensemble is used for quantum gases. Evaluating the single-mode sum gives the two quantum cases, and differentiating ln⁡Ξk\ln\Xi_k gives the mean occupation — one formula with a sign that distinguishes the two statistics:

Ξk={11−z e−βεkbosons1+z e−βεkfermions⟨nk⟩=1eβ(εk−μ)∓1(4)\Xi_k=\begin{cases}\dfrac{1}{1-z\,e^{-\beta\varepsilon_k}} & \text{bosons}\\[2mm] 1+z\,e^{-\beta\varepsilon_k} & \text{fermions}\end{cases}\qquad \langle n_k\rangle=\frac{1}{e^{\beta(\varepsilon_k-\mu)}\mp1} \qquad (4)

where: the upper sign (−1-1) is Bose–Einstein, the lower sign (+1+1) is Fermi–Dirac. The boson sum is geometric (convergent only for z e−βεk<1z\,e^{-\beta\varepsilon_k}<1, i.e. μ<min⁡kεk\mu<\min_k\varepsilon_k); the fermion sum stops at nk=1n_k=1 because Pauli exclusion forbids double occupancy. At small zz both reduce to the classical ⟨nk⟩→z e−βεk\langle n_k\rangle\to z\,e^{-\beta\varepsilon_k}.

Derivation AFrom one single-mode scalar to Bose-Einstein, Fermi-Dirac, and Maxwell-Boltzmann

This is the article's owned structural result: a single scalar, the single-mode grand partition function Ξk\Xi_k, generates all three fundamental occupation statistics — Bose–Einstein, Fermi–Dirac, and classical Maxwell–Boltzmann — as one derivative ⟨nk⟩=z ∂zln⁡Ξk\langle n_k\rangle=z\,\partial_z\ln\Xi_k with nothing but a sign flip separating the boson and fermion cases. The goal is to evaluate Ξk\Xi_k for each occupation rule, differentiate to get ⟨nk⟩\langle n_k\rangle, rewrite with z=eβμz=e^{\beta\mu}, and confirm the classical limit. The strategy is a geometric series for bosons, a two-term sum for fermions, and a small-zz expansion for the classical limit — the same scalar handled three ways.

Step 1. Fermion mode. Pauli allows nk∈{0,1}n_k\in\{0,1\}, so ΞkFD=1+z e−βεk\Xi_k^{\text{FD}}=1+z\,e^{-\beta\varepsilon_k} — just two terms. Why: a fermion level is either empty or singly occupied; the sum has exactly two entries, and there is no series to converge.

Step 2. Boson mode. Bosons allow nk=0,1,2,…n_k=0,1,2,\dots, giving a geometric series ΞkBE=∑n=0∞(z e−βεk)n=(1−z e−βεk)−1\Xi_k^{\text{BE}}=\sum_{n=0}^\infty (z\,e^{-\beta\varepsilon_k})^n=(1-z\,e^{-\beta\varepsilon_k})^{-1}, convergent for z e−βεk<1z\,e^{-\beta\varepsilon_k}<1. Why: unlimited occupancy is a geometric series in the ratio x=z e−βεkx=z\,e^{-\beta\varepsilon_k}; convergence requires x<1x<1, i.e. μ<εk\mu<\varepsilon_k, which is the physical condition that no level over-fills.

Step 3. Differentiate. The mean occupation is ⟨nk⟩=z ∂zln⁡Ξk\langle n_k\rangle=z\,\partial_z\ln\Xi_k. For fermions this gives z e−βεk1+z e−βεk\dfrac{z\,e^{-\beta\varepsilon_k}}{1+z\,e^{-\beta\varepsilon_k}}; for bosons z e−βεk1−z e−βεk\dfrac{z\,e^{-\beta\varepsilon_k}}{1-z\,e^{-\beta\varepsilon_k}} — identical except for the sign in the denominator. Why: z ∂zz\,\partial_z is the generating-function operator that extracts the mean of nkn_k (it brings down a factor nkn_k inside the sum), and it acts on ln⁡Ξk\ln\Xi_k to give the average directly.

Step 4. Rewrite with z=eβμz=e^{\beta\mu}. Divide numerator and denominator by z e−βεkz\,e^{-\beta\varepsilon_k} and use 1/z=e−βμ1/z=e^{-\beta\mu}: ⟨nk⟩=1eβ(εk−μ)∓1\langle n_k\rangle=\dfrac{1}{e^{\beta(\varepsilon_k-\mu)}\mp1}, the Bose–Einstein (−1-1) and Fermi–Dirac (+1+1) distributions. Why: the substitution collects the exponentials into the single combination β(εk−μ)\beta(\varepsilon_k-\mu), the energy of the level measured from the chemical potential — the only variable the occupation depends on.

Step 5. Classical limit. When z e−βεk≪1z\,e^{-\beta\varepsilon_k}\ll1 (dilute, or εk≫μ\varepsilon_k\gg\mu), the ∓1\mp1 in the denominator is negligible against the exponential, and ⟨nk⟩→z e−βεk=e−β(εk−μ)\langle n_k\rangle\to z\,e^{-\beta\varepsilon_k}=e^{-\beta(\varepsilon_k-\mu)} — the Maxwell–Boltzmann factor. Both quantum distributions collapse to the same classical exponential. Why: quantum statistics only matter when levels are appreciably occupied (⟨nk⟩\langle n_k\rangle not ≪1\ll1); when occupations are tiny, the difference between "can't share" and "loves to share" is invisible and everything looks classical. *The results ΞkBE=(1−ze−βε)−1\Xi_k^{\text{BE}}=(1-ze^{-\beta\varepsilon})^{-1}, ΞkFD=1+ze−βε\Xi_k^{\text{FD}}=1+ze^{-\beta\varepsilon}, and ⟨nk⟩=z∂zln⁡Ξk=1/(eβ(ε−μ)∓1)\langle n_k\rangle=z\partial_z\ln\Xi_k=1/(e^{\beta(\varepsilon-\mu)}\mp1) hold for both signs, and both quantum distributions reduce to the classical z→0z\to0 limit as shown above.*

Go deeper · Derivation B · 1 minThe reservoir derivation of the Gibbs weight and Ξ
Derivation BThe reservoir derivation of the Gibbs weight and Ξ

The goal is to derive the grand-canonical weight e−β(E−μN)e^{-\beta(E-\mu N)} and the normalization Ξ\Xi from first principles, by treating the system-plus-reservoir as an isolated microcanonical whole and Taylor-expanding the reservoir entropy in both energy and particle number. The strategy mirrors the canonical derivation (where only energy was exchanged), now carried out in two variables at once, and the key is that the small system's EE and NN are tiny compared with the reservoir's totals.

Step 1. Equal a priori probabilities of the isolated universe. The probability that the small system S is in microstate (N,i)(N,i) is proportional to the number of reservoir microstates compatible with it: PN,i∝ΩR(E0−Ei(N), N0−N)P_{N,i}\propto\Omega_R(E_0-E_i^{(N)},\,N_0-N), where E0,N0E_0,N_0 are the fixed totals. Why: the universe (S + reservoir) is microcanonical, so every joint microstate is equally likely; counting the reservoir's ways of absorbing the rest gives S's weight.

Step 2. Expand the reservoir entropy. Since E,N≪E0,N0E,N\ll E_0,N_0, Taylor-expand SR=kBln⁡ΩRS_R=k_B\ln\Omega_R to first order: ln⁡ΩR(E0−E,N0−N)≈ln⁡ΩR(E0,N0)−EkB∂SR∂E−NkB∂SR∂N\ln\Omega_R(E_0-E,N_0-N)\approx\ln\Omega_R(E_0,N_0)-\frac{E}{k_B}\frac{\partial S_R}{\partial E}-\frac{N}{k_B}\frac{\partial S_R}{\partial N}. Why: the small system barely perturbs the vast reservoir, so a linear expansion is exact in the reservoir limit; the second-order terms scale as the system-to-reservoir size ratio and vanish.

Step 3. Identify the reservoir's intensive parameters. By the thermodynamic definitions, ∂SR/∂E=1/T\partial S_R/\partial E=1/T and ∂SR/∂N=−μ/T\partial S_R/\partial N=-\mu/T. Why: these are precisely how temperature and chemical potential are defined as entropy derivatives — the reservoir imposes its TT and μ\mu on the system.

Step 4. Assemble and normalize. Exponentiating, PN,i∝e−(Ei(N)−μN)/kBT=e−β(Ei(N)−μN)P_{N,i}\propto e^{-(E_i^{(N)}-\mu N)/k_BT}=e^{-\beta(E_i^{(N)}-\mu N)}, and demanding ∑N,iPN,i=1\sum_{N,i}P_{N,i}=1 fixes the normalization Ξ=∑N,ie−β(Ei(N)−μN)\Xi=\sum_{N,i}e^{-\beta(E_i^{(N)}-\mu N)}. Why: the constant reservoir term ΩR(E0,N0)\Omega_R(E_0,N_0) is common to all states and drops into the normalization; what survives is the Gibbs factor, and Ξ\Xi is simply its sum. *The two-variable expansion reproduces the coefficients −β-\beta (of EE) and +βμ+\beta\mu (of NN), and the two-mode fermion example confirms the identity Ξ=∑NzNZN=∏k(1+ze−βεk)\Xi=\sum_N z^N Z_N=\prod_k(1+ze^{-\beta\varepsilon_k}).*

Limiting cases

The grand partition function specializes cleanly in each regime:

CaseResultMeaning
Fixed particle numberΞ=∑NzNZN→zNZN\Xi=\sum_N z^N Z_N\to z^N Z_NProjecting onto one NN recovers the canonical ZNZ_N (up to the fugacity factor zNz^N).
Classical / dilute (z≪1z\ll1)⟨nk⟩≈z e−βεk\langle n_k\rangle\approx z\,e^{-\beta\varepsilon_k}Both quantum distributions collapse to Maxwell–Boltzmann; occupations ≪1\ll1.
Bosonsln⁡Ξ=−∑kln⁡(1−z e−βεk)\ln\Xi=-\sum_k\ln(1-z\,e^{-\beta\varepsilon_k})Bose–Einstein statistics; the ground-state occupation becomes macroscopic as μ→ε0\mu\to\varepsilon_0 (BEC).
Fermionsln⁡Ξ=+∑kln⁡(1+z e−βεk)\ln\Xi=+\sum_k\ln(1+z\,e^{-\beta\varepsilon_k})Fermi–Dirac statistics; each level capped at ⟨nk⟩≤1\langle n_k\rangle\le1 by Pauli.
Thermodynamic limit⟨ΔN2⟩/⟨N⟩∼N−1/2→0\sqrt{\langle\Delta N^2\rangle}/\langle N\rangle\sim N^{-1/2}\to0Number fluctuations negligible; grand-canonical ≡\equiv canonical.

Worked examples

1 · Three statistics at one level: read the numbers off the plot

A single-particle level sits at energy ε\varepsilon with the chemical potential μ\mu chosen so that ε−μ=kBT\varepsilon-\mu = k_BT (the level is one thermal unit above μ\mu). Compute the mean occupation ⟨n⟩\langle n\rangle for a boson, a fermion, and a classical particle, and check the ordering.

Step 1. Set the variable. With ε−μ=kBT\varepsilon-\mu=k_BT, the exponent is β(ε−μ)=1\beta(\varepsilon-\mu)=1, so eβ(ε−μ)=e=2.71828e^{\beta(\varepsilon-\mu)}=e=2.71828. Equivalently x≡z e−βε=e−β(ε−μ)=e−1=0.36788x\equiv z\,e^{-\beta\varepsilon}=e^{-\beta(\varepsilon-\mu)}=e^{-1}=0.36788.

Step 2. Boson (Bose–Einstein): ⟨n⟩BE=1eβ(ε−μ)−1=1e−1=11.71828=0.5820\langle n\rangle_{\text{BE}}=\dfrac{1}{e^{\beta(\varepsilon-\mu)}-1}=\dfrac{1}{e-1}=\dfrac{1}{1.71828}=\mathbf{0.5820}.

Step 3. Fermion (Fermi–Dirac): ⟨n⟩FD=1eβ(ε−μ)+1=1e+1=13.71828=0.2689\langle n\rangle_{\text{FD}}=\dfrac{1}{e^{\beta(\varepsilon-\mu)}+1}=\dfrac{1}{e+1}=\dfrac{1}{3.71828}=\mathbf{0.2689}.

Step 4. Classical (Maxwell–Boltzmann): ⟨n⟩MB=e−β(ε−μ)=e−1=0.3679\langle n\rangle_{\text{MB}}=e^{-\beta(\varepsilon-\mu)}=e^{-1}=\mathbf{0.3679}. The ordering 0.5820>0.3679>0.26890.5820 > 0.3679 > 0.2689 says it all: bosons bunch (occupation above classical, they like to share the level), fermions anti-bunch (occupation below classical, Pauli keeps them apart), and the classical value sits exactly in between — the same level, three statistics, one grand-canonical formula with a sign.

2 · The Langmuir adsorption isotherm from a single site (exam level)

A surface has MM independent adsorption sites, each either empty (energy 0) or holding one molecule (binding energy −ϵ-\epsilon, so occupied energy −ϵ-\epsilon). The surface equilibrates with a gas at chemical potential μ\mu. Find the fractional coverage θ=⟨N⟩/M\theta=\langle N\rangle/M, and evaluate it when z eβϵ=1z\,e^{\beta\epsilon}=1.

Step 1. One site is its own grand ensemble with two states: empty (n=0n=0, weight 1) and occupied (n=1n=1, energy −ϵ-\epsilon, weight z eβϵz\,e^{\beta\epsilon}). So the single-site grand partition function is ξ=1+z eβϵ\xi=1+z\,e^{\beta\epsilon} (note the +ϵ+\epsilon: binding lowers the energy, raising the weight).

Step 2. The sites are independent, so Ξ=ξM\Xi=\xi^M and the mean coverage per site is θ=⟨n⟩=z ∂zln⁡ξ=z eβϵ1+z eβϵ\theta=\langle n\rangle=z\,\partial_z\ln\xi=\dfrac{z\,e^{\beta\epsilon}}{1+z\,e^{\beta\epsilon}}.

Step 3. Since z=eβμ∝Pz=e^{\beta\mu}\propto P for an ideal gas in contact (chemical-potential matching gives z∝Pz\propto P), this is the Langmuir isotherm θ=P/(P+P0)\theta=P/(P+P_0) with P0P_0 set by ϵ\epsilon and TT — the coverage saturates at 1 as P→∞P\to\infty.

Step 4. At z eβϵ=1z\,e^{\beta\epsilon}=1 (the half-saturation point, where the gas pressure equals P0P_0): θ=11+1=0.5\theta=\dfrac{1}{1+1}=\mathbf{0.5}. Half the sites are filled exactly when the fugacity balances the binding — a one-line result that the canonical ensemble would reach only through an awkward constrained sum, and the reason the grand ensemble is the natural language for adsorption, catalysis, and surface science.

Origins · 1 mingrand partition function and how this was discovered
GP
grand partition function
statistical-mechanics concept · Gibbs 1902

The grand partition function Ξ\Xi — sometimes written Z\mathcal{Z} or QQ — is the master generating function for open systems, introduced by J. Willard Gibbs alongside his "grand ensemble" in the 1902 Elementary Principles in Statistical Mechanics, the book that gave statistical mechanics its ensemble language. Gibbs's insight was that a system free to exchange particles with a reservoir is described by weighting each microstate with e−β(E−μN)e^{-\beta(E-\mu N)} and summing over all particle numbers; the normalization Ξ\Xi then encodes everything, with the grand potential Ω=−kBTln⁡Ξ=−PV\Omega=-k_BT\ln\Xi=-PV as its thermodynamic face. What made Ξ\Xi indispensable only became clear two decades later: because relaxing the fixed-NN constraint lets the partition sum factorize over single-particle levels, Ξ\Xi is the natural home of quantum statistics. The Bose–Einstein distribution (Bose 1924, Einstein 1924–25) and the Fermi–Dirac distribution (Fermi 1926, Dirac 1926) both fall out of Ξ\Xi in two lines — a derivation impossible in the canonical ensemble. Today Ξ\Xi underlies the theory of ideal quantum gases, degenerate matter in white dwarfs and metals, adsorption and catalysis, and lattice-gauge and grand-canonical Monte Carlo simulations. It is the ensemble you reach for the moment particle number is allowed to breathe.

History
1875
— Gibbs introduces the chemical potential in On the Equilibrium of Heterogeneous Substances.
1902
— Gibbs's Elementary Principles in Statistical Mechanics defines the grand ensemble and the grand partition function.
1924
— Bose derives Planck's law by a new counting of photon states, sent to Einstein.
1925
— Einstein extends Bose's method to material particles, predicting condensation.
1926
— Fermi and Dirac independently give the exclusion-obeying distribution for half-integer-spin particles.

Going further

References. Pathria & Beale, Statistical Mechanics, 3rd ed., Ch. 4 & 6 · Kardar, Statistical Physics of Particles, Ch. 4 & 7 · Reif, Fundamentals of Statistical and Thermal Physics, Ch. 6 & 9 · Sethna, Statistical Mechanics: Entropy, Order Parameters, and Complexity, Ch. 6 · Landau & Lifshitz, Statistical Physics Part 1, §35–38 · Gibbs, Elementary Principles in Statistical Mechanics (1902). Key results: the fermion two-mode identity Ξ=∏k(1+ze−βεk)=∑NzNZN\Xi=\prod_k(1+ze^{-\beta\varepsilon_k})=\sum_N z^N Z_N; the boson geometric series Ξk=(1−ze−βεk)−1\Xi_k=(1-ze^{-\beta\varepsilon_k})^{-1}; the occupations ⟨nk⟩=z∂zln⁡Ξk=1/(eβ(εk−μ)∓1)\langle n_k\rangle=z\partial_z\ln\Xi_k=1/(e^{\beta(\varepsilon_k-\mu)}\mp1) for both signs; the classical limit z→0z\to0; and the numerical values boson 0.5820, classical 0.3679, fermion 0.2689 at ε−μ=kBT\varepsilon-\mu=k_BT, and Langmuir coverage 0.5 at half-saturation. Historical dates: Bose 1924, Einstein 1924–25, Fermi 1926, Dirac 1926. The quantum origin of the ∓\mp (boson symmetry vs fermion exclusion) is developed in the Quantum Statistics chapter, not here.

Builds on: Canonical Ensemble · Gibbs Factor and Chemical Potential · Canonical Partition Function · Boltzmann Factor. Leads to: Grand Canonical Ensemble · Grand Potential · Thermodynamic Quantities from the Partition Function · Factorization of the Partition Function.

Why do we sum over all particle numbers instead of fixing N like in the canonical ensemble?

Because for many real systems NN genuinely is not fixed: a small region of a gas exchanges molecules with its surroundings, an adsorbing surface exchanges molecules with the vapor above it, and — most importantly — an ideal quantum gas is most naturally described by letting each single-particle level exchange particles with a common reservoir. Fixing NN imposes the constraint ∑knk=N\sum_k n_k = N, which couples every level to every other and makes the partition sum refuse to factorize. Summing over all NN (weighted by the fugacity zNz^N) removes that constraint, so each level becomes independent and Ξ=∏kΞk\Xi=\prod_k\Xi_k. You pay for this with a fluctuating NN, but in the thermodynamic limit those fluctuations are ∼N−1/2\sim N^{-1/2} — utterly negligible — so the grand-canonical answer matches the canonical one while being far easier to compute. It is a genuine free lunch: calculational power at no physical cost.

What exactly is the fugacity z, and why is it useful?

The fugacity is z=eβμz=e^{\beta\mu}, a dimensionless repackaging of the chemical potential. It is useful for three reasons. First, it turns the grand partition function into a clean power series Ξ=∑NzNZN\Xi=\sum_N z^N Z_N, where the coefficient of zNz^N is just the ordinary canonical partition function for NN particles — so Ξ\Xi transparently "stacks" the canonical ensembles. Second, mean particle number is the neat logarithmic derivative ⟨N⟩=z ∂zln⁡Ξ\langle N\rangle=z\,\partial_z\ln\Xi, and occupations are ⟨nk⟩=z ∂zln⁡Ξk\langle n_k\rangle=z\,\partial_z\ln\Xi_k. Third, zz is the natural expansion parameter for dilute systems: at small zz the gas is classical (⟨nk⟩≈z e−βεk\langle n_k\rangle\approx z\,e^{-\beta\varepsilon_k}), and the virial and cluster expansions are organized as power series in zz. Physically, zz measures how "eager" the reservoir is to push particles in: z≪1z\ll1 means a dilute, classical gas; z→1z\to1 (from below) for bosons signals the onset of Bose–Einstein condensation; and for a classical ideal gas z=nλ3z=n\lambda^3, the phase-space density.

How can one formula give both bosons and fermions just by changing a sign?

Because the only physical difference between the two is how many particles a single level may hold, and that enters the mode sum Ξk=∑nk(z e−βεk)nk\Xi_k=\sum_{n_k}(z\,e^{-\beta\varepsilon_k})^{n_k} as the range of nkn_k. Bosons allow nk=0,1,2,…n_k=0,1,2,\dots, an infinite geometric series that sums to (1−x)−1(1-x)^{-1} with x=z e−βεkx=z\,e^{-\beta\varepsilon_k}. Fermions allow only nk=0,1n_k=0,1 (Pauli exclusion), a two-term sum 1+x1+x. When you differentiate z ∂zln⁡Ξkz\,\partial_z\ln\Xi_k, the geometric case gives x/(1−x)x/(1-x) and the truncated case gives x/(1+x)x/(1+x) — identical except for the sign in the denominator, which becomes the ∓1\mp1 in ⟨nk⟩=1/(eβ(ε−μ)∓1)\langle n_k\rangle=1/(e^{\beta(\varepsilon-\mu)}\mp1). So the "sign flip" is not a trick; it is the arithmetic shadow of "unlimited sharing" versus "at most one," the two possibilities allowed by quantum indistinguishability. Why nature only offers those two possibilities (and which particles get which) is a quantum-mechanical fact — the spin–statistics connection — developed in the Quantum Statistics chapter; the grand ensemble simply does the bookkeeping once you know the rule.

Why does the boson grand partition function diverge, and what does that divergence mean?

The boson single-mode sum Ξk=∑n(z e−βεk)n\Xi_k=\sum_n(z\,e^{-\beta\varepsilon_k})^n is a geometric series that only converges when z e−βεk<1z\,e^{-\beta\varepsilon_k}<1, i.e. μ<εk\mu<\varepsilon_k. The tightest constraint comes from the lowest level, the ground state ε0\varepsilon_0: as μ→ε0\mu\to\varepsilon_0 from below, the ground-state term (1−z e−βε0)−1(1-z\,e^{-\beta\varepsilon_0})^{-1} blows up. This is not a failure of the theory — it is the signal of Bose–Einstein condensation. A diverging ⟨n0⟩\langle n_0\rangle means the ground state is acquiring a macroscopic occupation, a finite fraction of all the particles collapsing into a single quantum state. The correct treatment separates the ground-state term out and handles it explicitly (it holds the condensate), while the excited states are summed as an integral. So the "divergence" is really the mathematics warning you that a phase transition has occurred and the naive continuum approximation for the ground state must be repaired. Fermions never have this problem: their Ξk=1+z e−βεk\Xi_k=1+z\,e^{-\beta\varepsilon_k} is a finite two-term sum for any zz, because Pauli forbids macroscopic occupation of any single level.

If N fluctuates in the grand ensemble, why do we get the same answers as the fixed-N canonical ensemble?

Because the fluctuations are tiny. The variance of the particle number, ⟨ΔN2⟩=kBT ∂⟨N⟩/∂μ\langle\Delta N^2\rangle=k_BT\,\partial\langle N\rangle/\partial\mu, grows only linearly with system size (∝N\propto N) while ⟨N⟩∝N\langle N\rangle\propto N, so the relative fluctuation is ⟨ΔN2⟩/⟨N⟩∼N−1/2\sqrt{\langle\Delta N^2\rangle}/\langle N\rangle\sim N^{-1/2} — about 10−1210^{-12} for a mole. Although Ξ\Xi formally averages over every NN, the particle-number distribution is a razor-sharp Gaussian spike at ⟨N⟩\langle N\rangle, and every intensive quantity computed grand-canonically agrees with the canonical result to leading order in 1/N1/N. This is ensemble equivalence: the ensembles differ only in how they treat negligible fluctuations, so for macroscopic systems you use whichever is more convenient — almost always the grand ensemble.

Why is the mean number a derivative with respect to the fugacity, ⟨N⟩ = z ∂ ln Ξ / ∂z?

It follows from the fugacity series Ξ=∑NzNZN\Xi=\sum_N z^N Z_N. The probability of holding exactly NN particles is PN=zNZN/ΞP_N=z^N Z_N/\Xi, so ⟨N⟩=∑NN PN=1Ξ∑NN zNZN\langle N\rangle=\sum_N N\,P_N=\frac{1}{\Xi}\sum_N N\,z^N Z_N. The operator z ∂zz\,\partial_z acting on zNz^N returns N zNN\,z^N — it "pulls down" the exponent — so z ∂zln⁡Ξ=1Ξ∑NN zNZN=⟨N⟩z\,\partial_z\ln\Xi=\frac{1}{\Xi}\sum_N N\,z^N Z_N=\langle N\rangle. This is the same generating-function logic that makes −∂βln⁡Z-\partial_\beta\ln Z the mean energy: ln⁡\ln of the partition function is a generating function whose derivatives are averages. Since z=eβμz=e^{\beta\mu}, this also reads ⟨N⟩=kBT(∂ln⁡Ξ/∂μ)T,V=−(∂Ω/∂μ)T,V\langle N\rangle=k_BT(\partial\ln\Xi/\partial\mu)_{T,V}=-(\partial\Omega/\partial\mu)_{T,V}, tying the microscopic average to the thermodynamic derivative of the grand potential.

Before this

Where this leads