The Partition Function Z

Divide, so that it sums to one

The previous piece took us as far as the probability going as e^{-\beta E}. Going as something is not yet a probability. The whole must sum to 1.

So consider the Boltzmann factor added over every state. Z = \displaystyle\sum_{i} e^{-\beta E_i}, which is called the partition function. Each bar in the figure is one Boltzmann factor, and the strip below is all of them laid end to end.

Divide by it and the probability is P_i = \dfrac{e^{-\beta E_i}}{Z}. Z appeared for no reason but to be divided by, a bare normalising constant. And yet that constant is about to take the leading part.

The slope of Z is the mean energy

Differentiate Z with respect to \beta. Each term of the sum brings down a -E_i, so \dfrac{\partial Z}{\partial \beta} = -\displaystyle\sum_{i} E_i e^{-\beta E_i}.

Divide that by Z and the right side is E_i weighted by its probability and summed, that is the mean energy. Put together, \langle E \rangle = -\dfrac{\partial \log Z}{\partial \beta}.

The figure draws \log Z as a function of \beta. Put a minus sign on the slope of its tangent and you have the mean energy on the spot. The work of counting state by state and averaging has become one derivative.

The free energy is the logarithm of Z

In thermodynamics the leading quantity for a system at fixed temperature was not the energy but the free energy F = E - TS. Let us see how that ties to Z.

The result first: F = -kT \log Z. The figure sets out, one line at a time, how the familiar thermodynamic quantities follow from that relation. Entropy and pressure both come out of differentiating F, and nothing more.

So if Z can be calculated, everything you might want to know about the system follows. Solving a problem in statistical mechanics is, more often than not, finding Z.

If the parts are independent, it multiplies

Suppose a system is made of two parts that have nothing to do with each other. The total energy is then a sum, E_i + E_j, and a sum in an exponent splits into a product.

The grid in the figure is that. One cell is one state of the whole, and its area is the weight. A cell's area is a width times a height. So adding every cell gives the sum of the widths times the sum of the heights.

That is Z = Z_1 Z_2. Take logarithms and \log Z = \log Z_1 + \log Z_2, so the free energy adds as well. With N independent particles, Z = z^{N}, and solving for one of them is enough.

Trying it out on a system with two levels

Check it on the smallest example there is: a system with only the energies 0 and \varepsilon. Z = 1 + e^{-\beta\varepsilon}, and that is all of it.

The mean energy follows the rule just laid down, differentiating \log Z with respect to \beta, and comes to \langle E \rangle = \dfrac{\varepsilon}{e^{\beta\varepsilon} + 1}. The curve in the figure is that, rising as the temperature goes up.

At low temperature it clings to 0, because nothing reaches the upper level. At high temperature it approaches \dfrac{\varepsilon}{2}, because kT far exceeds the gap and the two levels are used equally. The chapter on applications comes back to this system from the side of heat capacity and magnetisation.

Probability and large numbers
The microcanonical ensemble
The canonical ensemble
Applications
Phase transitions
Quantum statistics
Time and fluctuations