PHYSICAL CHEMISTRY 2 • STATISTICAL THERMODYNAMICS

Partition Function

The central bridge between quantum energy levels and macroscopic thermodynamic properties of matter.

Historical Context & Motivation

By the late nineteenth century, physicists faced a profound gap between two successful but seemingly disconnected frameworks: the microscopic world of atoms and molecules governed by mechanics, and the macroscopic world of heat engines and chemical equilibria described by classical thermodynamics. The question of how the measurable properties of bulk matter—temperature, pressure, entropy—emerge from the behavior of an astronomical number of individual particles demanded a rigorous mathematical bridge. It was precisely this challenge that motivated the development of statistical mechanics, and at the heart of this new discipline lay a single, remarkably powerful construct: the partition function.

The German term Zustandssumme—literally "sum over states"—captures the essence of the partition function: it encodes how a system's total probability is partitioned among all accessible quantum states. Once known, virtually every equilibrium thermodynamic quantity can be derived from it through straightforward differentiation or algebraic manipulation. The intellectual journey from Boltzmann's kinetic theory to Planck's quantization and finally to the modern formulation of the partition function represents one of the most elegant unifications in all of physical science.

1877
Boltzmann's Statistical Entropy
Ludwig Boltzmann introduces the statistical interpretation of entropy, S = kB ln W, connecting the number of microstates W to a macroscopic observable and laying the conceptual groundwork for the partition function.
1900
Planck's Quantum Hypothesis
Max Planck derives the black-body radiation law by assuming energy is absorbed and emitted in discrete quanta, ε = hν. His derivation implicitly uses a sum over quantized oscillator states—a precursor to the canonical partition function.
1902
Gibbs' Ensemble Theory
J. Willard Gibbs publishes "Elementary Principles in Statistical Mechanics," formalizing the canonical, microcanonical, and grand canonical ensembles and establishing the partition function as the central generating function of equilibrium thermodynamics.
1924–1926
Quantum Statistics Emerge
Bose, Einstein, Fermi, and Dirac develop quantum-mechanical distribution laws for indistinguishable particles. These refinements replace classical Boltzmann counting with Bose–Einstein and Fermi–Dirac statistics, modifying the partition function for bosons and fermions respectively.
1930s–Present
Modern Applications
The partition function becomes the cornerstone of computational chemistry, molecular simulations, and spectroscopy. Advances in ab initio methods enable direct evaluation of molecular partition functions from first principles, connecting quantum chemistry to thermodynamic prediction.

The central question that the partition function answers is deceptively simple: given a system with a known set of quantum energy levels, how is the total population distributed among those levels at thermal equilibrium? From this single piece of information, one can extract internal energy, entropy, Helmholtz free energy, heat capacity, and chemical equilibrium constants—all without ever returning to the language of heat and work that characterizes classical thermodynamics.

Core Principles & Definitions

The partition function is best understood as a thermodynamic generating function—a single mathematical object from which an entire suite of equilibrium properties can be extracted. Before deriving its explicit form, it is essential to grasp the foundational principles upon which it rests. These ideas connect the microscopic quantum description of matter to the probabilistic framework of statistical mechanics.

1

Boltzmann Distribution

At thermal equilibrium, the probability of a system occupying a microstate with energy Ei is proportional to exp(−Ei / kBT). The partition function serves as the normalization constant ensuring all probabilities sum to unity.
2

Sum Over States

The canonical partition function Q (or Z) is defined as the sum of Boltzmann factors over all microstates: Q = Σ exp(−Ei / kBT). Each term measures the statistical weight of a given state relative to the ground state.
3

Factorization of Independent Modes

When a molecule's degrees of freedom are independent, the total partition function factors into a product: qtotal = qtrans × qrot × qvib × qelec. This separability is a direct consequence of the Hamiltonian being a sum of independent terms.
4

Connection to Thermodynamic Potentials

The Helmholtz free energy connects directly to Q through A = −kBT ln Q. From A, all other thermodynamic functions (U, S, P, CV) follow via standard thermodynamic identities.
KEY TAKEAWAY
Think of the partition function as a Rosetta Stone for thermodynamics. Just as the Rosetta Stone allowed scholars to translate between three scripts, the partition function translates between the language of quantum energy levels and the language of macroscopic observables. Once you know how to "read" Q—by taking logarithms, derivatives, or ratios—you can decode internal energy, entropy, pressure, and equilibrium constants without any additional experimental input. A large partition function indicates many thermally accessible states, reflecting high entropy; a small partition function means the system is effectively confined to its ground state.

Visual Explanation — Energy Levels & the Boltzmann Distribution

The partition function acquires physical meaning most clearly when visualized as a weighted sum over an energy level ladder. The following diagram illustrates a system with discrete quantum states at increasing energies. The horizontal bar widths represent the Boltzmann weight exp(−Ei / kBT) of each level at two different temperatures. At low temperature, the population is concentrated in the ground state; at high temperature, the population spreads more evenly across many levels—directly reflected in a larger value of the partition function.

Left panel: at low temperature, the Boltzmann weight drops sharply with increasing energy, so nearly all population resides in E0 and q ≈ 1. Right panel: at high temperature, higher energy levels become significantly populated, spreading the probability and yielding a larger q. The partition function literally counts the effective number of thermally accessible states.

Notice that q can be interpreted as the effective number of thermally accessible states. When T → 0, only the ground state is populated and q → g0 (the degeneracy of the ground level). When T → ∞, all states become equally probable and q approaches the total number of states. This intuition is essential: a large partition function signals high disorder and many available microstates, while a small partition function signals a system frozen into a few low-lying states.

Mathematical Framework

We now formalize the partition function and derive the key thermodynamic relations that flow from it. Consider a system in thermal contact with a heat bath at temperature T. The canonical partition function Q for the entire N-particle system, and the molecular partition function q for a single molecule, are the two central quantities. For a system of N independent, distinguishable particles, Q = qN; for indistinguishable particles (the usual case for identical molecules in a gas), Q = qN / N! to correct for overcounting permutations.

MOLECULAR PARTITION FUNCTION
q = Σᵢ gᵢ exp(−εᵢ / k_BT)
where gᵢ is the degeneracy of level i, εᵢ is the energy of level i (measured from the ground state), kB is Boltzmann's constant (1.381 × 10⁻²³ J K⁻¹), and T is the absolute temperature. The sum runs over all distinct energy levels.
HELMHOLTZ FREE ENERGY
A = −k_BT ln Q
This is the fundamental bridge equation. For N indistinguishable particles: A = −NkBT ln q + kBT ln N! (using Stirling's approximation for the factorial).
INTERNAL ENERGY
U = k_BT² (∂ ln Q / ∂T)_V = −(∂ ln Q / ∂β)_V
where β = 1/(kBT) is the thermodynamic beta. The β-derivative form is often more convenient for analytical work.
ENTROPY
S = k_B ln Q + k_BT (∂ ln Q / ∂T)_V = k_B ln Q + U/T
Combining the expressions for A and U recovers the familiar relation S = (U − A)/T. This expression automatically satisfies the Third Law: as T → 0, Q → g0 and S → kB ln g0, which is zero for a non-degenerate ground state.
📝 Notation Convention
Different textbooks use different symbols: q or z for the molecular partition function, Q or Z or ZN for the canonical partition function, and Ξ for the grand canonical version. Atkins and McQuarrie use q (molecular) and Q (canonical), which we adopt here. Always check the conventions of your course.

Factorization into Molecular Degrees of Freedom

One of the most powerful features of the partition function is its factorizability. When the molecular Hamiltonian can be written as a sum of independent contributions—translational, rotational, vibrational, and electronic—the molecular partition function factors into a product of partition functions for each mode. This separability drastically simplifies computation and provides physical insight into which degrees of freedom are "active" at a given temperature.

The molecular partition function factors into translational, rotational, vibrational, and electronic contributions. Each mode has a characteristic temperature (Θ) that determines whether that degree of freedom is thermally active at a given T. When T ≫ Θ, the mode contributes its full classical share to thermodynamic properties; when T ≪ Θ, it is "frozen out."
Summary of molecular partition function contributions and their classical heat capacity limits
ModeModelPartition Function ExpressionClassical C_V Contribution
TranslationParticle in a 3D box(2πmkBT / h²)3/2 V³⁄₂ R per mol
Rotation (linear)Rigid rotorT / (σΘrot) at high TR per mol
Vibration (per mode)Quantum harmonic oscillator1 / (1 − exp(−Θvib/T))R per mol (when T ≫ Θvib)
ElectronicSpectroscopic term valuesg0 + g1exp(−ε1/kBT) + …≈ 0 at moderate T

Worked Example — Vibrational Partition Function of CO

Let us calculate the vibrational partition function, the fraction of molecules in the first excited vibrational state, and the vibrational contribution to the internal energy for carbon monoxide at 1000 K. The fundamental vibrational frequency of CO is ν̃ = 2170 cm⁻¹, corresponding to a characteristic vibrational temperature Θvib = hcν̃/kB = 3122 K.

Vibrational Partition Function and Population of CO at 1000 K
1
Step 1 — Identify given values and characteristic temperatureWe are given ν̃ = 2170 cm⁻¹ for CO. The characteristic vibrational temperature is Θvib = hcν̃/kB = (6.626 × 10⁻³⁴)(2.998 × 10¹⁰)(2170) / (1.381 × 10⁻²³) = 3122 K. The temperature is T = 1000 K, so Θvib/T = 3122/1000 = 3.122.
Θvib/T = 3.122
2
Step 2 — Evaluate the vibrational partition functionUsing the harmonic oscillator result with energies measured from the ground state (zero-point energy excluded from q): qvib = 1 / (1 − exp(−Θvib/T)) = 1 / (1 − exp(−3.122)) = 1 / (1 − 0.04406) = 1 / 0.9559 = 1.0461.
q_vib = 1.046
3
Step 3 — Calculate the population of the first excited state (v = 1)The probability of being in vibrational level v is pv = exp(−vΘvib/T) / qvib. For v = 1: p1 = exp(−3.122) / 1.046 = 0.04406 / 1.046 = 0.04213.
p₁ = 4.21% of molecules in v = 1
4
Step 4 — Compute the vibrational contribution to internal energyThe vibrational contribution to U per mole (excluding zero-point energy) is Uvib = RΘvib / (exp(Θvib/T) − 1) = (8.314)(3122) / (exp(3.122) − 1) = 25,948 / (22.70 − 1) = 25,948 / 21.70 = 1196 J mol⁻¹.
U_vib = 1.20 kJ mol⁻¹
5
Step 5 — Interpret the resultsBecause qvib ≈ 1.05, barely exceeding unity, the vibrational mode of CO at 1000 K is largely frozen out—most molecules reside in v = 0. The vibrational contribution to U (1.20 kJ mol⁻¹) is much less than the classical limit of RΘvib → RT = 8.314 kJ mol⁻¹ at this temperature. Only at temperatures well above 3122 K would the vibrational mode contribute its full R to CV.

Strengths, Limitations & Approximations

The partition function framework is extraordinarily powerful, but like any theoretical construct, it rests on assumptions that define its domain of validity. Understanding these strengths and limitations is essential for applying the partition function correctly and recognizing when more sophisticated methods are needed.

Strengths and limitations of the canonical partition function approach
AspectStrengthsLimitations
GeneralityApplies to any system with well-defined energy levels—atoms, molecules, crystals, photon fieldsRequires knowledge of the complete energy spectrum, which may be unknown for complex systems
FactorizabilitySeparable Hamiltonians allow multiplication of independent q values, enormously simplifying calculationsCoupling between modes (e.g., vibration-rotation interaction, anharmonicity) breaks factorizability
Classical limitsHigh-T approximations yield closed-form expressions (e.g., q_rot ≈ T/σΘ_rot), enabling rapid estimationClassical limit fails at low T (e.g., for H₂ rotation below 90 K) where discrete quantum sums are required
Equilibrium focusProvides exact equilibrium thermodynamics without solving equations of motionCannot describe kinetic processes, non-equilibrium distributions, or transport properties without extensions
IndistinguishabilityThe 1/N! correction accurately accounts for particle identity in the dilute (classical) gas regimeAt very low T or high density, Bose–Einstein and Fermi–Dirac statistics must replace Boltzmann counting
KEY TAKEAWAY
The partition function is analogous to a moment-generating function in probability theory: it is not a directly measurable quantity itself, but its derivatives encode all of the system's equilibrium statistics. Its factorizability is like decomposing a joint probability distribution into independent marginals—convenient when valid, but the approximation breaks down when correlations between modes become significant (anharmonic coupling, centrifugal distortion, etc.).

Connection to Advanced Statistical Mechanics

The canonical partition function Q is the workhorse of closed-system statistical thermodynamics, but it is only one member of a family of ensemble partition functions that correspond to different thermodynamic boundary conditions. Understanding how Q relates to its generalizations is essential for tackling open systems, phase equilibria, and quantum gases. The table below summarizes the key ensembles and their associated partition functions, along with the thermodynamic potential each connects to most naturally.

Comparison of statistical ensembles and their partition functions
EnsembleFixed VariablesPartition FunctionThermodynamic Potential
MicrocanonicalN, V, EΩ(N, V, E) — number of microstatesS = kB ln Ω
CanonicalN, V, TQ(N, V, T) = Σ exp(−Ei/kBT)A = −kBT ln Q
Grand Canonicalμ, V, TΞ = ΣN exp(βμN) Q(N, V, T)PV = kBT ln Ξ
Isothermal–IsobaricN, P, TΔ = Σ exp(−βPV) Q(N, V, T) dVG = −kBT ln Δ

In the thermodynamic limit (N → ∞), all ensembles yield identical predictions for intensive properties, a reassuring consistency result. The grand canonical partition function Ξ becomes indispensable when treating systems that exchange particles with a reservoir—for instance, adsorption on surfaces, chemical equilibria in solution, or quantum gases where the Bose–Einstein and Fermi–Dirac distribution functions arise naturally from Ξ. The isothermal–isobaric partition function Δ connects directly to the Gibbs free energy, making it the natural choice for constant-pressure chemistry. Each of these generalizations retains the core philosophy: sum the appropriate Boltzmann-like factor over all accessible states, then extract thermodynamics by differentiation.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain physically why the partition function q → g0 (the ground-state degeneracy) as T → 0, and why q increases without bound as T → ∞. What does this tell you about the connection between q and entropy?
PROBLEM 2BASIC CALCULATION
A hypothetical molecule has three non-degenerate energy levels at 0, 200 cm⁻¹, and 500 cm⁻¹. Calculate the molecular partition function at T = 300 K. (Use kBT/hc = 208.5 cm⁻¹ at 300 K.)
PROBLEM 3INTERMEDIATE
For ³⁵Cl₂ gas (ν̃ = 560 cm⁻¹, B̃ = 0.244 cm⁻¹, σ = 2, mass = 70.0 g mol⁻¹), calculate qrot and qvib at 500 K using the high-temperature rotational approximation and the harmonic oscillator vibrational formula.
PROBLEM 4APPLIED
Using the partition function, derive an expression for the equilibrium constant Kp of the dissociation reaction I₂(g) ⇌ 2 I(g) in terms of molecular partition functions qI and qI₂, and explain the role of the dissociation energy D0.
PROBLEM 5CRITICAL THINKING
The harmonic oscillator model predicts that qvib → T/Θvib at very high temperatures, implying an infinite number of accessible vibrational states. Discuss why this is physically unreasonable and how anharmonicity modifies the partition function. What consequence does this have for predicting dissociation equilibria at high T?

Summary — The Partition Function

The partition function q = Σ gᵢ exp(−εᵢ/kBT) is the central generating function of statistical thermodynamics, encoding how probability is distributed among quantum energy levels at thermal equilibrium. It connects to the Helmholtz free energy through A = −kBT ln Q, from which internal energy, entropy, heat capacity, and equilibrium constants are obtained by differentiation.

For molecules with independent degrees of freedom, the molecular partition function factors into translational, rotational, vibrational, and electronic contributions, each governed by a characteristic temperature that determines whether the mode is thermally active. The canonical partition function Q generalizes to the grand canonical and isothermal–isobaric ensembles for open and constant-pressure systems, maintaining the same philosophy: sum the Boltzmann-like weights, then differentiate to extract thermodynamics.

Varsity Tutors • Physical Chemistry 2 • Partition Function