Boltzmann Distribution and Partition Functions
Statistical thermodynamics explains macroscopic thermodynamic properties from molecular energy levels. Instead of beginning with heat engines or calorimeters, it asks how molecules distribute themselves over quantum states and how many microscopic arrangements correspond to the same observable state.
Atkins introduces the Boltzmann distribution and the molecular partition function as the central tools. Once the partition function is known, thermodynamic functions such as internal energy, entropy, Helmholtz energy, and equilibrium constants can be derived systematically.
Figure: Maxwell-Boltzmann distribution as a physical population model for thermal molecular states. Image: Wikimedia Commons, Pdbailey, Cryptic C62, and Lilyu, public domain.
Definitions
A configuration specifies how particles are distributed among available molecular states. If level has energy and degeneracy , the relative population at thermal equilibrium is given by the Boltzmann distribution:
where the molecular partition function is
The factor
is often useful, so
The partition function is a weighted count of thermally accessible states. States much higher than above the ground state contribute little; degenerate states contribute in proportion to their degeneracy.
For independent distinguishable molecules, the canonical partition function is
For independent indistinguishable molecules in a gas,
The factor corrects overcounting of permutations of identical particles and is essential for extensive entropy.
The Boltzmann entropy formula is
where is the number of microstates. In the canonical ensemble, the Helmholtz energy is
Key results
The probability of state is
The mean molecular energy is
For independent molecules,
when the zero of energy is separated as if needed.
The molecular entropy can be written as
for distinguishable localized particles, with modifications for gases through the canonical partition function and the correction.
For a two-level system with energies and , both nondegenerate,
The upper-state fraction is
At low temperature, ; at very high temperature, . If the upper level has degeneracy , then
and degeneracy can make the upper-state population important at lower temperatures than expected from energy alone.
The heat capacity follows from how mean energy changes with temperature:
For a two-level system, rises from zero, reaches a maximum when is comparable with the level spacing, and falls again at high temperature. This peak is a Schottky anomaly.
The Boltzmann distribution can be derived by maximizing multiplicity subject to fixed total energy and fixed particle number. The most probable distribution is overwhelmingly more probable than nearby alternatives for macroscopic , which is why equilibrium populations are reproducible. The Lagrange multiplier associated with energy becomes , connecting statistical counting to thermodynamic temperature. Temperature is therefore not merely average kinetic energy; it is the parameter that controls how rapidly probability decreases with energy.
The partition function deserves its name because it partitions population among states. If only the ground state is thermally accessible, is close to the ground-state degeneracy and the system has little thermal capacity to absorb energy. As temperature rises, more terms contribute and thermodynamic properties change. The derivative of with respect to temperature or measures how the population distribution shifts as energy becomes thermally available.
Degeneracy is an entropy effect at the level of individual energy levels. A level with high degeneracy represents many states of the same energy, so its total Boltzmann weight is . A moderately higher but highly degenerate level can compete with a lower nondegenerate level. This is important in electronic partition functions of atoms, rotational levels with degeneracy , and spin systems in magnetic fields.
The zero of energy affects but not observable energy differences if handled consistently. If every energy is shifted by a constant , then
This changes by , but derivatives that depend on energy differences remain consistent. In chemical equilibrium calculations, zero-point energies and reference electronic energies must be included consistently because different species have different offsets.
The canonical ensemble assumes a system can exchange energy with a reservoir while , , and are fixed. A single member of the ensemble fluctuates in energy, but the ensemble average is stable. This is why the canonical partition function includes all system microstates, not only a fixed-energy shell. The microcanonical, canonical, and grand canonical ensembles differ in constraints, but they give equivalent bulk thermodynamics for large systems when used properly.
The two-level system is a useful miniature model for many phenomena: spin populations in a magnetic field, electronic excitation, conformational two-state equilibria, and heat capacity anomalies. It shows that heat capacity is largest when temperature is comparable to the energy gap. At very low temperature, the excited level is inaccessible. At very high temperature, both levels are already nearly saturated in population, so adding heat changes populations only weakly.
Negative temperatures, discussed in advanced treatments, can occur only in systems with an upper energy bound, such as certain spin populations. They are not colder than zero; they are hotter than any positive temperature because population is inverted toward high energy. This idea is related to laser action, where stimulated emission requires an inversion rather than an ordinary Boltzmann distribution.
The partition-function approach also clarifies why molecular detail matters for macroscopic thermodynamics. Translational states dominate gas entropy, rotational states shape heat capacity, vibrational states contribute at higher temperatures, and electronic degeneracies affect high-temperature atoms and radicals. Physical chemistry repeatedly returns to the same calculation pattern: identify energy levels, build , derive probabilities and thermodynamic functions.
Visual
| Temperature regime | Boltzmann factor | Population pattern | Thermodynamic consequence |
|---|---|---|---|
| very small | ground state dominates | low entropy, low heat capacity | |
| moderate | excited states populated sensitively | heat capacity often large | |
| near 1 | levels populated by degeneracy | entropy approaches maximum | |
| high degeneracy | multiplied by | degenerate upper states amplified | entropy can favor excitation |
Worked example 1: Population ratio in a two-level system
Problem. A molecule has a nondegenerate excited state above a nondegenerate ground state. Find the excited-to-ground population ratio at .
Method. Use
When energy is given as a wavenumber , the dimensionless ratio is
with .
- Compute exponent:
- Population ratio:
- Excited fraction:
Checked answer. About of molecules are excited. Since the gap is almost , the excited state is populated but not heavily.
Worked example 2: Degeneracy in an electronic partition function
Problem. An atom has a ground level with degeneracy 2 at and an excited level with degeneracy 4 at . Calculate and the excited-state fraction at .
Method. Use
- Exponent:
- Boltzmann factor:
- Partition function:
- Excited fraction:
Checked answer. Nearly half the atoms are excited because the excited level has twice the degeneracy of the ground level and the gap is less than .
Code
import numpy as np
HC_OVER_K = 1.438776877 # K cm
def partition_wavenumbers(levels_cm, degeneracies, T):
levels_cm = np.array(levels_cm, dtype=float)
degeneracies = np.array(degeneracies, dtype=float)
weights = degeneracies * np.exp(-HC_OVER_K * levels_cm / T)
q = weights.sum()
return q, weights / q
levels = [0.0, 500.0]
deg = [2, 4]
for T in [100, 300, 1000, 3000]:
q, p = partition_wavenumbers(levels, deg, T)
print(f"T={T:5.0f} K q={q:8.4f} populations={p}")
Common pitfalls
- Forgetting degeneracy. A high-energy level with large can matter more than a nondegenerate level at similar energy.
- Using directly as joules. Convert through or use for dimensionless exponents.
- Calling a probability. It is a weighted sum; probabilities are weights divided by .
- Omitting for an ideal gas of identical particles when deriving entropy.
- Assuming all states are populated equally. Equal population is approached only when is much larger than all relevant spacings.
A reliable workflow is to draw or tabulate the energy levels before writing formulas. Mark the zero of energy, list degeneracies, and estimate for each level. Terms with usually contribute negligibly unless their degeneracy is enormous; terms with often matter. This quick scale analysis prevents both overcomplicated sums and accidental omission of thermally accessible states.
Be especially careful with spectroscopic units. Atkins often uses wavenumbers because spectroscopy measures them naturally. A wavenumber is not an energy by itself, but is. For dimensionless Boltzmann factors, the convenient conversion is , with . If is in , this constant keeps the exponent unitless.
Partition functions also depend on the physical question. A two-level electronic partition function for one atom, a molecular partition function for one gas molecule, and a canonical partition function for indistinguishable gas molecules are different objects. Using where is required can produce wrong entropy and chemical potential expressions even if population ratios look correct.