Skip to main content

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.

A Maxwell-Boltzmann distribution plot compares molecular speeds for several noble gases.

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 ii has energy ϵi\epsilon_i and degeneracy gig_i, the relative population at thermal equilibrium is given by the Boltzmann distribution:

NiN=gieϵi/kTq\frac{N_i}{N} =\frac{g_i e^{-\epsilon_i/kT}}{q}

where the molecular partition function is

q=igieϵi/kTq=\sum_i g_i e^{-\epsilon_i/kT}

The factor

β=1kT\beta=\frac{1}{kT}

is often useful, so

q=igieβϵiq=\sum_i g_i e^{-\beta\epsilon_i}

The partition function is a weighted count of thermally accessible states. States much higher than kTkT above the ground state contribute little; degenerate states contribute in proportion to their degeneracy.

For independent distinguishable molecules, the canonical partition function is

Q=qNQ=q^N

For independent indistinguishable molecules in a gas,

Q=qNN!Q=\frac{q^N}{N!}

The factor 1/N!1/N! corrects overcounting of permutations of identical particles and is essential for extensive entropy.

The Boltzmann entropy formula is

S=klnWS=k\ln W

where WW is the number of microstates. In the canonical ensemble, the Helmholtz energy is

A=kTlnQA=-kT\ln Q

Key results

The probability of state ii is

pi=gieβϵiqp_i=\frac{g_i e^{-\beta\epsilon_i}}{q}

The mean molecular energy is

ϵ=ipiϵi=(lnqβ)V\langle\epsilon\rangle =\sum_i p_i\epsilon_i =-\left(\frac{\partial\ln q}{\partial\beta}\right)_V

For NN independent molecules,

U=U(0)+NϵU=U(0)+N\langle\epsilon\rangle

when the zero of energy is separated as U(0)U(0) if needed.

The molecular entropy can be written as

Sm=Rlnq+RT(lnqT)VS_m=R\ln q+RT\left(\frac{\partial\ln q}{\partial T}\right)_V

for distinguishable localized particles, with modifications for gases through the canonical partition function and the N!N! correction.

For a two-level system with energies 00 and ϵ\epsilon, both nondegenerate,

q=1+eϵ/kTq=1+e^{-\epsilon/kT}

The upper-state fraction is

p1=eϵ/kT1+eϵ/kTp_1=\frac{e^{-\epsilon/kT}}{1+e^{-\epsilon/kT}}

At low temperature, p10p_1\to0; at very high temperature, p11/2p_1\to1/2. If the upper level has degeneracy gg, then

q=1+geϵ/kTq=1+g e^{-\epsilon/kT}

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:

CV=(UT)VC_V=\left(\frac{\partial U}{\partial T}\right)_V

For a two-level system, CVC_V rises from zero, reaches a maximum when kTkT 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 NN, which is why equilibrium populations are reproducible. The Lagrange multiplier associated with energy becomes β=1/kT\beta=1/kT, 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, qq 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 lnq\ln q with respect to temperature or β\beta 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 gieϵi/kTg_ie^{-\epsilon_i/kT}. 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 2J+12J+1, and spin systems in magnetic fields.

The zero of energy affects qq but not observable energy differences if handled consistently. If every energy is shifted by a constant ϵ0\epsilon_0, then

q=ie(ϵi+ϵ0)/kT=eϵ0/kTqq'=\sum_i e^{-(\epsilon_i+\epsilon_0)/kT} =e^{-\epsilon_0/kT}q

This changes A=kTlnqA=-kT\ln q by ϵ0\epsilon_0, 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 NN, VV, and TT are fixed. A single member of the ensemble fluctuates in energy, but the ensemble average is stable. This is why the canonical partition function QQ 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 qq, derive probabilities and thermodynamic functions.

Visual

Temperature regimeBoltzmann factor eϵ/kTe^{-\epsilon/kT}Population patternThermodynamic consequence
kTϵkT\ll\epsilonvery smallground state dominateslow entropy, low heat capacity
kTϵkT\approx\epsilonmoderateexcited states populated sensitivelyheat capacity often large
kTϵkT\gg\epsilonnear 1levels populated by degeneracyentropy approaches maximum
high degeneracymultiplied by ggdegenerate upper states amplifiedentropy can favor excitation

Worked example 1: Population ratio in a two-level system

Problem. A molecule has a nondegenerate excited state 600 cm1600\ \mathrm{cm^{-1}} above a nondegenerate ground state. Find the excited-to-ground population ratio at 300.0 K300.0\ \mathrm{K}.

Method. Use

N1N0=eϵ/kT\frac{N_1}{N_0}=e^{-\epsilon/kT}

When energy is given as a wavenumber ν~\tilde\nu, the dimensionless ratio is

ϵkT=hcν~kT=(hc/k)ν~T\frac{\epsilon}{kT}=\frac{hc\tilde\nu}{kT} =\frac{(hc/k)\tilde\nu}{T}

with hc/k=1.4388 K cmhc/k=1.4388\ \mathrm{K\ cm}.

  1. Compute exponent:
ϵkT=(1.4388 K cm)(600 cm1)300.0 K=2.8776\frac{\epsilon}{kT} =\frac{(1.4388\ \mathrm{K\ cm})(600\ \mathrm{cm^{-1}})}{300.0\ \mathrm{K}} =2.8776
  1. Population ratio:
N1N0=e2.8776=0.0563\frac{N_1}{N_0}=e^{-2.8776}=0.0563
  1. Excited fraction:
p1=0.05631+0.0563=0.0533p_1=\frac{0.0563}{1+0.0563}=0.0533

Checked answer. About 5.3%5.3\% of molecules are excited. Since the gap is almost 3kT3kT, 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 0 cm10\ \mathrm{cm^{-1}} and an excited level with degeneracy 4 at 500 cm1500\ \mathrm{cm^{-1}}. Calculate qq and the excited-state fraction at 1000 K1000\ \mathrm{K}.

Method. Use

q=g0+g1ehcν~/kTq=g_0+g_1e^{-hc\tilde\nu/kT}
  1. Exponent:
hcν~kT=(1.4388)(500)1000=0.7194\frac{hc\tilde\nu}{kT} =\frac{(1.4388)(500)}{1000} =0.7194
  1. Boltzmann factor:
e0.7194=0.4872e^{-0.7194}=0.4872
  1. Partition function:
q=2+4(0.4872)=2+1.9488=3.9488q=2+4(0.4872)=2+1.9488=3.9488
  1. Excited fraction:
p1=4(0.4872)3.9488=0.4935p_1=\frac{4(0.4872)}{3.9488} =0.4935

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

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 gig_i can matter more than a nondegenerate level at similar energy.
  • Using cm1\mathrm{cm^{-1}} directly as joules. Convert through hcν~hc\tilde\nu or use hc/khc/k for dimensionless exponents.
  • Calling qq a probability. It is a weighted sum; probabilities are weights divided by qq.
  • Omitting 1/N!1/N! for an ideal gas of identical particles when deriving entropy.
  • Assuming all states are populated equally. Equal population is approached only when kTkT 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 ϵi/kT\epsilon_i/kT for each level. Terms with ϵi/kT>10\epsilon_i/kT\gt 10 usually contribute negligibly unless their degeneracy is enormous; terms with ϵi/kT<1\epsilon_i/kT\lt 1 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 ν~\tilde\nu is not an energy by itself, but hcν~hc\tilde\nu is. For dimensionless Boltzmann factors, the convenient conversion is (hc/k)ν~/T(hc/k)\tilde\nu/T, with hc/k1.4388 K cmhc/k\approx1.4388\ \mathrm{K\ cm}. If ν~\tilde\nu is in cm1\mathrm{cm^{-1}}, 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 NN indistinguishable gas molecules are different objects. Using qq where QQ is required can produce wrong entropy and chemical potential expressions even if population ratios look correct.

Connections