Partition Functions
A partition function is a basis-independent trace of an equilibrium statistical weight. In the fixed-particle-number canonical ensemble,
In the grand-canonical ensemble,
These quantities normalize density operators, but normalization is only their first role. Their logarithms generate connected fluctuations, thermodynamic potentials, and responses. Their factorization records independence. Their analytic and asymptotic structure encodes spectra, phases, and low-energy physics.
This page is the canonical home for partition functions as mathematical and physical generating objects. The Canonical Ensemble and Grand-Canonical Ensemble pages own the thermodynamics of their respective control variables.
Why a Trace?
Section titled “Why a Trace?”Let be any orthonormal basis of the relevant Hilbert space. Then
If is unitary and
then cyclicity of the trace gives
The partition function is therefore independent of the basis used to evaluate it. The energy basis is convenient, not fundamental.
Spectral State Sum
Section titled “Spectral State Sum”For
functional calculus gives
Taking the trace,
where
is the degeneracy of energy .
Dropping is equivalent to discarding states. If energy labels are repeated once per independent eigenvector, the same formula can be written
Normalization of the Gibbs State
Section titled “Normalization of the Gibbs State”The canonical density operator is
Its unit trace follows immediately:
The same logic gives
in the grand-canonical ensemble.
Dimension and Units
Section titled “Dimension and Units”The exponential must have a dimensionless argument:
is dimensionless because
The trace of is dimensionless, so and are dimensionless.
A classical phase-space partition function requires a reference cell such as to make the integral dimensionless. In quantum mechanics, the Hilbert-space trace supplies the state count directly.
Existence and Convergence
Section titled “Existence and Convergence”In finite dimension,
for every finite real .
In infinite dimension, the operator
must be trace class. Equivalently,
for a discrete spectrum counted with multiplicity.
A Hamiltonian bounded below is not by itself sufficient. The number of states below energy must not grow too rapidly relative to the Boltzmann suppression.
Positive inverse temperature
Section titled “Positive inverse temperature”For , low energies are favored. Confined systems with spectra growing sufficiently rapidly often have finite .
Infinite temperature
Section titled “Infinite temperature”At ,
This is finite only in finite dimension.
Negative inverse temperature
Section titled “Negative inverse temperature”For , high energies are favored. A finite partition function then generally requires a spectrum bounded above or another explicit cutoff.
Infinite volume
Section titled “Infinite volume”Even when a finite-volume partition function exists, the total usually grows exponentially with volume. The bulk object is often
or the associated free-energy density, not a finite infinite-volume trace.
Energy-Zero Shifts
Section titled “Energy-Zero Shifts”Shift the Hamiltonian by a constant:
Then
The normalized density operator is unchanged:
The Helmholtz free energy shifts by
as expected when every energy is shifted by . Probabilities and energy differences are invariant.
Partition Functions Generate Moments
Section titled “Partition Functions Generate Moments”Assume has no explicit dependence. Differentiating gives
Therefore
A second derivative gives
Thus
The convexity of in is a variance statement.
Moment-Generating Interpretation
Section titled “Moment-Generating Interpretation”Within the canonical state at inverse temperature , consider
Because commutes with every function of itself,
whenever both traces converge.
The cumulant-generating function of energy is
Consequently,
For example,
and
Higher derivatives generate higher connected energy fluctuations.
Source-Dependent Partition Functions
Section titled “Source-Dependent Partition Functions”Introduce a source coupled to an observable :
Define
The first derivative is
This remains true even if
The derivative of a noncommuting operator exponential is handled by the Duhamel formula, and cyclicity of the trace reduces the first derivative to the thermal expectation value.
The second derivative requires more care. For noncommuting and , it produces an imaginary-time or Kubo–Mori correlation rather than simply
The ordinary variance is recovered when the relevant operators commute. Fluctuations and Susceptibilities develops the Kubo–Mori covariance, static response interpretation, and thermodynamic examples.
Parameter Derivatives and Generalized Forces
Section titled “Parameter Derivatives and Generalized Forces”Let
Then
The Helmholtz free energy
satisfies
If the generalized force is defined by
then
Explicit or temperature dependence in an effective Hamiltonian adds derivative terms and must be stated.
Grand Partition Function as a Number Generator
Section titled “Grand Partition Function as a Number Generator”Assume
Fock space decomposes as
The grand partition function is
With fugacity
this becomes
Thus is an ordinary generating function for the fixed- canonical partition functions.
The probability of particle number is
Coefficient Extraction
Section titled “Coefficient Extraction”If is analytic around the origin,
where denotes the coefficient of .
Equivalently,
where encloses the origin inside the domain of analyticity.
This contour formula is exact. Saddle-point evaluation at large connects fixed-number and fixed-chemical-potential descriptions.
Number Cumulants
Section titled “Number Cumulants”It is convenient to define
Then
and
More generally,
Keeping , , or fixed while differentiating with respect to are different operations. The variable held fixed must be stated.
Factorization for Independent Subsystems
Section titled “Factorization for Independent Subsystems”Suppose
and
The two terms commute, so
Using
one obtains
Therefore
The logarithm is additive because it generates connected, extensive thermodynamic quantities.
When Factorization Fails
Section titled “When Factorization Fails”Naive factorization fails when:
- the Hamiltonian contains interactions between and ;
- the Hilbert space does not factor into independent tensor factors;
- a global constraint couples otherwise independent subsystems;
- identical-particle symmetrization links particle labels;
- gauge or superselection constraints restrict the physical subspace;
- the trace is projected onto one total-charge sector.
Weak interactions can sometimes be treated perturbatively, but
is the generic interacting case.
Single-Particle Versus Many-Body Partition Functions
Section titled “Single-Particle Versus Many-Body Partition Functions”Let the one-particle Hamiltonian act on a one-particle space , with energies . Define
The symbol is a one-particle partition function. It is not automatically the partition function of identical quantum particles.
The same one-particle spectrum leads to different many-body partition functions depending on the Hilbert space and number constraint. Exchange symmetry and the sum over particle-number sectors are structural choices, not optional correction factors.
Distinguishable Noninteracting Particles
Section titled “Distinguishable Noninteracting Particles”For labeled, noninteracting particles,
and
The partition function factorizes:
This formula counts permutations of one-particle occupations as distinct labeled states.
Identical Bosons and Fermions
Section titled “Identical Bosons and Fermions”For identical particles, the trace is restricted to the symmetric or antisymmetric subspace:
The plus sign denotes bosons and the minus sign fermions. In general,
For noninteracting identical particles, an exact recurrence is
with
The terms with are exchange corrections.
Maxwell–Boltzmann Limit
Section titled “Maxwell–Boltzmann Limit”In the dilute, nondegenerate regime, exchange corrections become small and the identical-particle canonical partition function approaches
The factor prevents classical overcounting of particle labels. This is an approximation to the quantum bosonic or fermionic result, not an exact formula at arbitrary density.
Classical Limit of Quantum Statistics derives the controlling parameter , the low-fugacity cycle expansion, and the leading Bose and Fermi virial corrections.
Noninteracting Modes in Fock Space
Section titled “Noninteracting Modes in Fock Space”Suppose
The grand partition function factorizes over modes.
For bosons,
provided
for every mode.
For fermions,
Taking logarithms turns products into sums:
and
Example: Two One-Particle Levels
Section titled “Example: Two One-Particle Levels”Let
and define
The one-particle partition function is
Two distinguishable particles
Section titled “Two distinguishable particles”For two labeled particles,
The coefficient counts which labeled particle occupies the excited level.
Two identical bosons
Section titled “Two identical bosons”The allowed occupation states are
Therefore
Two identical spinless fermions
Section titled “Two identical spinless fermions”Pauli exclusion allows only
Hence
The three answers differ despite sharing the same one-particle spectrum.
Density-of-States Representation
Section titled “Density-of-States Representation”Define
Then
The partition function is the Laplace transform of the density of states.
For a discrete spectrum,
and the integral reduces to the spectral sum.
Formally, the inverse transform is
where the vertical contour lies in a domain of convergence. Inverse Laplace transforms are often numerically ill-conditioned; formal invertibility does not guarantee stable reconstruction from noisy data.
Microcanonical and Canonical Information
Section titled “Microcanonical and Canonical Information”If
then
In a regular thermodynamic limit, the dominant energy satisfies
Thus the partition function packages microcanonical state counting into a fixed-temperature generating object. The Microcanonical Ensemble page owns shell definitions and entropy conventions.
High-Temperature Expansion
Section titled “High-Temperature Expansion”In finite dimension,
Therefore
where
As ,
In infinite dimension, this expansion need not define a trace because may diverge.
Low-Temperature Expansion
Section titled “Low-Temperature Expansion”Let the ground energy be with degeneracy , and let the next distinct energy be
Then
At large positive ,
The leading exponential reveals the ground energy, while the constant term reveals its degeneracy.
Finite Systems and Analyticity
Section titled “Finite Systems and Analyticity”For a finite spectrum,
is analytic for finite real and strictly positive there. Consequently,
has no real-axis singularity at finite system size.
Sharp thermodynamic phase transitions require a limit in which system size diverges. In the complex plane, finite-system partition functions can have zeros. Families of such zeros can approach the physical real axis in a thermodynamic limit, producing nonanalytic bulk free energies.
Imaginary-Time Representation
Section titled “Imaginary-Time Representation”The trace
is an evolution trace over imaginary time of length
For
the Trotter product divides the interval into slices. In the limit,
with Euclidean action
The trace imposes periodic endpoint identification on coordinate paths.
This formula is a preview. Finite-Temperature QM Overview places the thermal trace in the wider KMS, Matsubara, spectral, and path-integral toolkit. Path Integrals for Statistical Mechanics develops the cyclic measure, normalization, exchange sectors, ring-polymer representation, and thermal oscillator determinant. Euclidean and Imaginary-Time Path Integrals retains the open-kernel and Wick-rotation construction.
Identical Particles in the Path Integral
Section titled “Identical Particles in the Path Integral”For identical particles, the trace over symmetric or antisymmetric states can be represented schematically as
Bosons sum permutations with positive sign. Fermions include permutation parity.
In coherent-state thermal path integrals, bosonic fields are periodic and fermionic Grassmann fields are antiperiodic in imaginary time. Coherent-State Path Integrals Preview derives these conditions from the trace and checks the corresponding Gaussian determinants. The distinction from first-quantized permutation closure is made explicit in Path Integrals for Statistical Mechanics.
Numerical Evaluation
Section titled “Numerical Evaluation”Log-sum-exp stabilization
Section titled “Log-sum-exp stabilization”Directly summing
can underflow at low temperature. Let be the smallest retained energy. Then
Every exponential in the remaining sum is at most one for .
Work with logarithms
Section titled “Work with logarithms”For independent modes or large lattices, compute or directly rather than forming exponentially large products.
For example,
is more stable than multiplying all factors.
Check truncation
Section titled “Check truncation”If a spectral sum is truncated, vary the energy cutoff until and target observables are stable. A cutoff adequate at low temperature may fail as temperature increases.
Respect sectors
Section titled “Respect sectors”Compute traces in the intended Hilbert space. A full-space trace can differ exponentially from a fixed-charge or fixed-symmetry trace.
Validate limits
Section titled “Validate limits”Check:
known noninteracting limits, and exact small-system results.
Canonical Boundaries
Section titled “Canonical Boundaries”This page owns:
- basis-independent trace and spectral-sum definitions;
- convergence and trace-class conditions;
- moment, cumulant, source, and number-generating interpretations;
- exact factorization criteria;
- the distinction among one-particle, distinguishable-particle, bosonic, fermionic, canonical, and grand partition functions;
- density-of-states transforms;
- high- and low-temperature asymptotics;
- imaginary-time trace and path-integral preview;
- numerical stabilization.
Other pages own:
- fixed- free energies, energy fluctuations, and reservoir interpretation: Canonical Ensemble;
- fixed- thermodynamics, convergence in particle-number sectors, and compressibility: Grand-Canonical Ensemble;
- equilibrium static response, ensemble dependence, and Kubo–Mori covariance: Fluctuations and Susceptibilities;
- the regime and accuracy of the Maxwell–Boltzmann approximation: Classical Limit of Quantum Statistics;
- energy shells and entropy derivatives: Microcanonical Ensemble;
- natural variables and Legendre transforms among potentials: Thermodynamic Potentials;
- Bose–Einstein and Fermi–Dirac occupations: Quantum Statistics and Ideal Gases;
- full path-integral derivations: Quantum Dynamics;
- compact lookup identities: Ensemble Formula Sheet.
Common Mistakes
Section titled “Common Mistakes”Forgetting the trace space
Section titled “Forgetting the trace space”and define different ensembles.
Dropping degeneracies
Section titled “Dropping degeneracies”An energy value with degeneracy contributes
Calling the one-particle sum the many-body partition function
Section titled “Calling the one-particle sum the many-body partition function”becomes only for labeled noninteracting particles. Exchange symmetry changes the state count.
Dividing by the factorial outside its regime
Section titled “Dividing by the factorial outside its regime”is the Maxwell–Boltzmann approximation for dilute identical particles, not the exact Bose or Fermi answer at arbitrary density.
Factoring an interacting trace
Section titled “Factoring an interacting trace”Independent terms and a tensor-product trace are required for .
Ignoring convergence
Section titled “Ignoring convergence”A formal trace that diverges does not normalize a density operator.
Holding the wrong variable fixed
Section titled “Holding the wrong variable fixed”Fixed fugacity, fixed , and fixed chemical potential are not interchangeable under derivatives.
Replacing quantum susceptibility by an ordinary variance
Section titled “Replacing quantum susceptibility by an ordinary variance”For noncommuting observables, second source derivatives generate imaginary-time correlations.
Evaluating large products directly
Section titled “Evaluating large products directly”Use logarithms and shifted energies to avoid overflow and underflow.
Exercises
Section titled “Exercises”Basis independence
Section titled “Basis independence”Let be unitary. Show that
Solution
Functional calculus gives
Using cyclicity,
The partition function depends on the spectrum with multiplicity, not on the chosen basis.
Energy-shift invariance
Section titled “Energy-shift invariance”For , derive , , and .
Solution
Because commutes with ,
Therefore
The normalized state is
Finally,
Energy cumulants
Section titled “Energy cumulants”Starting from
show that the first two cumulants are the mean and variance of .
Solution
The first derivative at is
The second derivative is
Direct differentiation gives
Hence
Two particles in two levels
Section titled “Two particles in two levels”For one-particle energies and , compute the two-particle partition function for distinguishable particles, identical bosons, and identical spinless fermions.
Solution
Set
For labeled particles,
For bosons, the occupations , , and have energies , , and , so
For two spinless fermions, both available orbitals must be occupied, giving total energy :
Recover fixed-number sectors
Section titled “Recover fixed-number sectors”For two fermionic modes with one-particle energies and , expand
and identify , , and .
Solution
Expanding,
Comparing with
gives
and
The sector has one state because Pauli exclusion forces both modes to be occupied.
Factorization test
Section titled “Factorization test”Let
For which value of does exact factorization follow immediately? Explain why commutation of with the uncoupled Hamiltonian is not by itself enough to give .
Solution
At
the Hamiltonian is a sum of operators on independent tensor factors, so
If and commutes with the uncoupled Hamiltonian, then
with the tensor factors understood on the full space. The extra operator generally couples the trace over and , so its trace does not split into .
Commutation simplifies the exponential but does not remove the interaction or restore a product state count.
Cross-Links
Section titled “Cross-Links”- Statistical Ensembles Overview
- Microcanonical Ensemble
- Thermal Density Operators
- Canonical Ensemble
- Grand-Canonical Ensemble
- Thermodynamic Potentials
- Ensemble Equivalence
- Ensemble Formula Sheet
- Green Functions and Density of States
- Trace-Class and Hilbert–Schmidt Operators
- Tensor Products
- Fock Space and Occupation Number
- Quantum Statistics Overview
- Maxwell–Boltzmann Limit
- Bose–Einstein Statistics
- Fermi–Dirac Statistics
- Ideal Bose Gas
- Ideal Fermi Gas
- Euclidean and Imaginary-Time Path Integrals
- Statistical Mechanics Checklist
References
Section titled “References”- R. K. Pathria and P. D. Beale, Statistical Mechanics, 4th ed., Elsevier (2021), chapters 3–8.
- K. Huang, Statistical Mechanics, 2nd ed., Wiley (1987), chapters 7–12.
- M. Kardar, Statistical Physics of Particles, Cambridge University Press (2007), chapters 2–6.
- L. D. Landau and E. M. Lifshitz, Statistical Physics, Part 1, 3rd ed., Butterworth–Heinemann (1980), sections 31–56.
- A. L. Fetter and J. D. Walecka, Quantum Theory of Many-Particle Systems, Dover (2003), chapters 1 and 2.
- R. P. Feynman and A. R. Hibbs, Quantum Mechanics and Path Integrals, emended ed., Dover (2010), chapters 2 and 10.
- H. Kleinert, Path Integrals in Quantum Mechanics, Statistics, Polymer Physics, and Financial Markets, 5th ed., World Scientific (2009), chapters 2 and 7.
- C. N. Yang and T. D. Lee, “Statistical Theory of Equations of State and Phase Transitions. I. Theory of Condensation”, Physical Review 87, 404–409 (1952).