partition function
/ par-TISH-un FUNK-shun /
Think of a city with hotels at every price. If you want to know how spread-out travellers will be across cheap, mid-range and luxury rooms, you first add up the 'availability' of every option, each weighted by how attractive it is. That grand total is the partition function: a single running tally of all the energy states a system can occupy, each counted by how reachable it is at the current temperature.
More precisely, the partition function (symbol Z or q) is the sum over every state of its Boltzmann factor — the e to the minus E over kT for that state. Low-lying states contribute close to one; high states contribute almost nothing. The result is roughly the number of states that are realistically within thermal reach. Divide any single Boltzmann factor by this total and you get the probability of finding the system in that state.
Why it matters: the partition function is the master key of statistical thermodynamics. Once you have it, every bulk property — energy, entropy, pressure, free energy, equilibrium constants — drops out by simple operations on Z. The honest caveat is that writing Z down exactly is usually hard; the entire craft lies in approximating it well for real molecules.
For a molecule with just two states, a ground state at zero energy and an excited state at energy E, the partition function is simply 1 + e to the minus E over kT. When the system is cold this is barely above 1 (only the ground state counts); when it is very hot it climbs toward 2 (both states are equally in play).
A two-level partition function rises from 1 (cold) toward 2 (hot).
There are two flavours: the molecular partition function q for a single molecule, and the canonical partition function Z for a whole system in contact with a heat bath. For independent particles the two are simply related.