7 · Many particles: temperature, chance and the Boltzmann factor
So far we've looked at pairs of atoms. A glass of water has about 1025 molecules. Nobody tracks them one by one. Chemistry gets away with not tracking them using two ideas: temperature is jiggling, and things end up in the arrangements that have the most ways of happening, weighted by energy.
This is the chapter that turns the rest of chemistry from a list of facts into a list of consequences. Melting, boiling, dissolving, reaction speeds and equilibrium all come out of what follows.
Temperature is jiggling
A broad spread. Atoms constantly trade energy in collisions, so at any moment some are nearly still and a few are racing. Temperature fixes the shape of the spread, not anyone's individual speed. The histogram fills in to match the curve, the Maxwell–Boltzmann distribution. Try it as a gas and as a cold clump: for classical particles the speed distribution is the same at a given temperature whether they're solid, liquid or gas.
What we call temperature is a measure of the typical jiggling energy: each direction of motion carries on average ½kT of kinetic energy. The number to remember is kT at room temperature:
Compare it with the wells from earlier chapters. Argon's well (0.01 eV) is smaller than kT, so argon is a gas. The H–H bond (4.5 eV) is about 170 times kT, so hydrogen molecules never shake themselves apart at room temperature. Much of chemistry comes down to "is this energy big or small compared to 1/40 eV?"
This is the classical picture. At low temperatures quantum effects take over: molecular vibrations "freeze out" and stop holding their ½kT share. For everyday chemistry near room temperature, the classical jiggling picture is good enough for motion of whole molecules.
Spreading is just counting
Now switch off the stickiness, colour half the atoms blue and half orange, and start them sorted. Nothing in the rules prefers mixing. Every collision is reversible and there's no "mixing force". Watch anyway.
They mix because there are vastly more mixed arrangements than sorted ones. Treat each atom as just "left" or "right". Exactly one arrangement has all 20 blues on the left and all 20 oranges on the right, but about 3 × 1010 arrangements have a 10/10 split of each. If every arrangement is equally likely, you will essentially always see a mixed one.
Possible, but absurdly unlikely. No law forbids it. With 40 atoms the chance of catching a fully sorted moment is about 1 in 1012 (one arrangement out of 240). Double the atoms and that chance is squared: with 80 it's 1 in 1024. For the 1021 molecules in a drop of water, the odds are so small that "never" is the honest practical answer. The second law of thermodynamics is a statement about counting.
The number of arrangements, W, is huge, so we use its logarithm. That's entropy:
Here W counts microstates: the detailed arrangements that all look the same from outside. Entropy isn't "disorder" in any mystical sense. It counts how many ways there are to be what you are.
The Boltzmann factor: energy versus number of ways
Now combine the two ideas. In contact with surroundings at temperature T, a system doesn't visit every microstate equally. Low-energy states are favoured, by a precise factor:
That's the Boltzmann distribution, and it may be the most useful single formula in chemistry. Here it is on the smallest interesting system: two atoms that are either stuck (energy −ε, but only one way to be stuck) or free (energy 0, but many ways to be free, because there's lots of room to wander).
At low temperature the single deep state wins: energy dominates. At high temperature the many shallow states win: the number of ways dominates. The switch happens where the two free energies cross:
So F = E − TS is energy with entropy charged at a price, and T is the exchange rate. Cold: energy is expensive and entropy is cheap, so things settle into deep wells. Hot: entropy is worth a lot, so things spread out. Chemists, working at constant pressure, use the Gibbs free energy G = H − TS. Its form is the same, with enthalpy H in place of energy.
Real numbers: water boils where the liquid and gas free energies cross. The energy cost of pulling the molecules apart is ΔH = 40.7 kJ/mol, and the entropy gained is ΔS = 109 J/(mol·K). They balance at T = ΔH/ΔS ≈ 373 K, which is 100 °C. Ice melts by the same arithmetic: 6.01 kJ/mol ÷ 22.0 J/(mol·K) ≈ 273 K. You can see the same switch in the first simulation. Lower the temperature until the gas collapses into clumps. That's the crossover where energy starts beating entropy.
A handy rule at room temperature: every 5.7 kJ/mol of free-energy difference is a factor of 10 in population. A 17 kJ/mol advantage means 1000 to 1.
The Boltzmann distribution is a softmax with temperature: pi = softmax(−Ei/kT). The energies are negative logits. At low T it collapses to the argmax (the ground state); at high T it flattens toward uniform over microstates. Grouping microstates into levels adds ln g to the logit. That's the entropy term, and why "free energy" is the right logit for a coarse-grained state.
The normaliser is the partition function Z = Σ e−E/kT, and F = −kT ln Z is a log-sum-exp. For any trial distribution q, ⟨E⟩q − T S(q) ≥ F, with equality exactly at the Boltzmann distribution. That's the Gibbs variational principle, and the negative ELBO is the same inequality in ML clothing.
The ELBO matches the Helmholtz free energy F (fixed volume). Chemistry mostly uses Gibbs G (fixed pressure), which adds a pV term. And electrons, being fermions, follow Fermi–Dirac statistics rather than plain Boltzmann. Plain Boltzmann is fine for whole atoms and molecules at ordinary temperatures.
- Look
- Two clear glasses: one with cold water from the fridge, one with warm water from the tap. Let them sit until the water is completely still.
- Wonder
- "If we put one drop of food colouring in each glass at the same time, which one will spread out faster?"
- Try
- One drop in each, at the same moment. Don't stir! Watch for a minute.
- True sentence
- "The tiny pieces of water are always jiggling, even when the water looks perfectly still. In warm water they jiggle faster, so they bump the colour around faster. Warm means faster jiggling."
"Jiggling" is honest: thermal motion is random, not purposeful, so avoid "the colour wants to spread". The deeper reason it spreads (far more spread-out arrangements than bunched ones) can wait a few years. Use warm tap water, never boiling. Some of the faster spreading in the warm glass is also gentle currents in the water; the jiggling is still the root cause.
Play more
- Schroeder's molecular dynamics. Bigger boxes, graphs of energy and pressure.
- PhET: States of Matter and Gas Properties. Heat, cool and squeeze real substances.
- ThermoBounce. Energy and entropy drawn as the shape of a room particles bounce in. A lovely picture of exactly this chapter.
- Peter Atkins, The Laws of Thermodynamics: A Very Short Introduction. Keeler & Wothers, Why Chemical Reactions Happen, ch. 1.
- For the 6-year-old: PhET: States of Matter: Basics. Heat and cool a pot of atoms with a big slider.