Partition functions are the central tool of statistical mechanics, connecting microscopic energy levels to macroscopic thermodynamic quantities. By summing over all possible microstates of a system, the partition function lets you predict bulk properties like energy, entropy, and free energy without needing to know which specific microstate the system occupies.
This makes partition functions indispensable for studying everything from ideal gases to quantum oscillators. Once you can write down for a system, you can extract nearly every equilibrium property through derivatives and logarithms.
Partition function for systems
Definition and properties of the partition function
The partition function encodes the statistical properties of a system in thermodynamic equilibrium. It's defined as the sum of Boltzmann factors over all microstates:
where , is the Boltzmann constant, is the absolute temperature, and is the energy of the -th microstate.
A few key properties to keep in mind:
- is dimensionless. It depends on temperature and the system's energy spectrum, but not on which microstate the system currently occupies.
- It acts as a normalization constant for the Boltzmann distribution, ensuring that probabilities over all microstates sum to one.
- It bridges microscopic information (energy levels, degeneracies) and macroscopic thermodynamic quantities. Nearly every equilibrium property can be extracted from or its derivatives.
Partition function for discrete energy levels
When energy levels are discrete, you often find that multiple microstates share the same energy. The degeneracy counts how many microstates have energy , and the partition function becomes:
The degeneracy factor gives each energy level its proper statistical weight. Without it, you'd undercount the contribution of levels that correspond to many distinct microstates.
Example: Two-level system. Consider energy levels (non-degenerate, ) and (doubly degenerate, ). The partition function is:
At low temperature (), the exponential term is negligible and , meaning the system sits almost entirely in the ground state. At high temperature (), , and all three microstates are roughly equally populated.
Example: Distinguishable spin system. For distinguishable particles each with two states (spin-up and spin-down), the number of microstates with exactly particles excited is the binomial coefficient . This degeneracy factor appears naturally when you write the partition function grouped by energy level rather than by individual microstate.
Partition function and thermodynamics
Relation between partition function and thermodynamic quantities
The real power of is that you can extract thermodynamic quantities through derivatives and logarithms. Here are the three most important relationships:
- Internal energy:
This gives the average energy of the system. The derivative with respect to effectively weights each energy level by its Boltzmann probability.
- Helmholtz free energy:
This is the most direct connection between and thermodynamics. Since , the partition function simultaneously encodes both energetic and entropic contributions.
- Entropy:
You can also derive this from , which is often easier in practice.
Deriving other thermodynamic quantities from the partition function
Once you have , additional quantities follow by taking further derivatives:
- Pressure:
- Heat capacity at constant volume:
- Chemical potential:
The pattern here is worth noticing: is the generating function, and different partial derivatives pull out different physical quantities. If you can compute analytically, you have access to the full thermodynamics of the system.
![Definition and properties of the partition function, Statistical Mechanics [The Physics Travel Guide]](https://storage.googleapis.com/static.prod.fiveable.me/search-images%2F%22Partition_function_definition_properties_statistical_mechanics_Boltzmann_factors_microstates_thermodynamic_equilibrium_image%22-image_20171011_153609.png%3Fw%3D920%26tok%3D21633e.png)
Partition function calculations
Ideal gas partition function
For identical, non-interacting particles in a volume , the partition function factorizes:
where is the single-particle partition function. The two factors deserve separate attention:
- Single-particle partition function: Integrating the Boltzmann factor over all momenta and positions for a free particle in a box gives , where is the thermal de Broglie wavelength:
Here is Planck's constant and is the particle mass. At higher temperatures, shrinks, meaning each particle has access to more quantum states and grows.
- The factor corrects for the indistinguishability of identical particles. Swapping two identical particles doesn't create a new microstate, so without dividing by you'd overcount configurations. This is the Gibbs factor, and omitting it leads to the Gibbs paradox (a non-extensive entropy).
The factorization into single-particle contributions only works because the particles don't interact. For real gases with intermolecular forces, the partition function no longer separates so cleanly.
Harmonic oscillator partition function
The quantum harmonic oscillator has evenly spaced energy levels:
To compute , you sum the Boltzmann factors over all :
-
Write out the sum:
-
Factor out the zero-point energy term:
-
Recognize the remaining sum as a geometric series with ratio : the sum equals
-
Combine to get the closed-form result:
where .
For a system of independent oscillators (all with the same frequency), the total partition function is simply . This factorization applies because the oscillators don't interact with each other.
This model is directly relevant to molecular physics: the vibrational modes of a diatomic molecule are well-approximated as quantum harmonic oscillators, each with a characteristic frequency determined by the bond stiffness and reduced mass.
Equilibrium properties from partition function
Calculating average quantities
Once you have , equilibrium averages follow systematically.
The average energy is:
The second expression makes the physical meaning clear: it's a weighted average of energies, with each microstate weighted by its Boltzmann probability.
The heat capacity can be obtained from energy fluctuations:
where . This is an instance of the fluctuation-dissipation theorem: the size of spontaneous energy fluctuations in equilibrium is directly tied to the system's heat capacity, which measures how the system responds to a temperature change. Larger fluctuations mean a larger heat capacity.
Equilibrium occupation probabilities and phase transitions
The Boltzmann distribution gives the probability of finding the system in microstate :
The partition function appears in the denominator as the normalization factor, ensuring .
Example: Two-level system with and (both non-degenerate). The occupation probabilities are:
At , (system freezes into the ground state). As , both probabilities approach (equal population).
Phase transitions can also be studied through the partition function. The key idea is that non-analytic behavior in (or more precisely, in per particle in the thermodynamic limit) signals a phase transition. For example, the Ising model for ferromagnetism sums over all spin configurations on a lattice with nearest-neighbor interactions. Below a critical temperature , the system spontaneously magnetizes (ferromagnetic phase); above , thermal fluctuations destroy long-range order (paramagnetic phase). The partition function encodes this transition through a singularity in the free energy at .