Partition Functions and Thermodynamic Properties
The partition function is the central quantity in statistical mechanics. Once you know it for a system, you can derive virtually every equilibrium thermodynamic property from it. This section covers how partition functions are defined, how to calculate them for simple systems, and how to extract quantities like internal energy, entropy, and free energy from them.
Partition function in statistical mechanics
The partition function, denoted , is defined as a sum over all possible states of a system, each weighted by its Boltzmann factor:
- is the energy of microstate
- is the Boltzmann constant
- is the absolute temperature
Each term in the sum represents the relative statistical weight of a particular state. States with lower energy contribute more to at a given temperature, while high-energy states are exponentially suppressed. At very high temperatures, many states contribute significantly; at low temperatures, only the lowest-energy states matter.
The reason is so powerful is that it encodes all the statistical information about the system. Every equilibrium thermodynamic quantity can be written as a derivative or simple function of (or ). It's the bridge between the microscopic picture (a list of energy levels) and the macroscopic properties you measure in the lab.
Partition function and thermodynamic properties
Once you have , you extract thermodynamic quantities through these key relationships. It's common to use the shorthand .
- Internal energy :
This gives the average energy of the system. The derivative picks out the mean of the energy distribution encoded in .
- Helmholtz free energy :
This is the most direct connection. tells you the maximum useful work extractable from the system at constant temperature and volume. Many textbooks start here and derive the other quantities from .
- Entropy :
You can also get this from , which is equivalent. Entropy quantifies the spread of probability across microstates.
These three formulas are worth memorizing. Every problem in this unit ultimately comes back to them.

Partition function calculations for simple systems
Two-level system (e.g., spin-1/2 in a magnetic field)
This is the simplest nontrivial system: just two energy levels separated by a gap .
- Energy levels: and
- The partition function is just the sum of two Boltzmann factors:
At low temperature (), the system sits almost entirely in the ground state and . At high temperature (), both states are equally populated and .
Quantum harmonic oscillator
- Energy levels: , where
- The partition function is an infinite geometric series:
The key step is recognizing the geometric series for . This closed-form result makes all subsequent derivatives straightforward.
Thermodynamic properties from partition functions
Here's how the general formulas play out for the two-level system. This is a good model problem to practice on.
Starting from :
- Internal energy: Take
At low , (the system is in the ground state). At high , and (equal population of both levels, so the average energy sits at the midpoint).
- Helmholtz free energy: Apply directly.
- Entropy: Use or the derivative formula.
At low , (only one state occupied, consistent with the third law). At high , (both states equally likely, maximum disorder for a two-state system).
The same procedure works for any system. Once you have in closed form, take the appropriate derivatives. For the harmonic oscillator, the algebra is a bit longer but the steps are identical: compute , differentiate with respect to or , and simplify. The physical interpretation at the limiting temperatures is always a good check on your answer.