---
title: "The Boltzmann Factor and the Partition Function"
description: "At positive temperature in thermal equilibrium, each microstate has weight exp(-E/(k_B T)). Summing these weights gives the partition function, which normalizes probabilities and gives mean energy. Le"
canonical: https://lightmysky.com/learn/science/the-boltzmann-factor-and-the-partition-function-mt_u9MSoTgJkF
source: https://lightmysky.com/learn/science/the-boltzmann-factor-and-the-partition-function-mt_u9MSoTgJkF.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# The Boltzmann Factor and the Partition Function

At positive temperature in thermal equilibrium, each microstate has weight exp(-E/(k_B T)). Summing these weights gives the partition function, which normalizes probabilities and gives mean energy. Level populations also depend on degeneracy.

Subject: Science · Area: Thermal & Statistical Physics · Ages 20 to 22
Page: https://lightmysky.com/learn/science/the-boltzmann-factor-and-the-partition-function-mt_u9MSoTgJkF

## Ready when they can

- Writes the Boltzmann factor for a two-level system and finds the ratio of populations
- Sums the factors to build a partition function for a small set of states
- Gets the mean energy of a system from its partition function

## Lesson: Weighing states: Boltzmann factor and partition function

For thermal equilibrium at T>0, a microstate of energy E has weight exp(-E/(k_B T)); k_B is Boltzmann's constant. For two levels with one state each and gap D>0, upper/lower = exp(-D/(k_B T)). If k_B T is much smaller than D, nearly all particles occupy the lower level. With degeneracies g_upper and g_lower, multiply the ratio by g_upper/g_lower.

The partition function Z sums exp(-E/(k_B T)) over all microstates. A level with g states contributes g times its factor. At T>0, E=0 has factor 1 and E>0 has factor below 1. Sum weights, not energies. For infinitely many nondegenerate levels E_n=nD, n=0,1,... and D>0, successive weights have ratio r=exp(-D/(k_B T)). At T>0, 0<r<1, so the geometric-series rule gives Z=1/(1-r).

A state's probability is its weight divided by Z. All state probabilities must sum to 1. For example, weights 1 and 1/3 give Z=4/3, so the probabilities are 3/4 and 1/4. Weights may be rescaled together for probability calculations, but distinguish those relative weights from the raw factors used to define Z.

**Example.** Take states at energies 0 and 2 energy units, with raw weights 1 and 1/4. Then Z=5/4 and the mean energy is (0 times 1 + 2 times 1/4)/(5/4)=0.4 energy units. In general, sum E times its probability. Equivalently, with beta=1/(k_B T), mean energy is -d ln Z/d beta when the energy levels are fixed.

For two fixed levels with one state each, k_B T much larger than the gap makes their populations nearly equal. Each individual state has probability approaching 1/2. Unequal level degeneracies change this limit: level populations approach the ratio of their numbers of states.

Heating changes the weights because the fixed gap divided by k_B T gets smaller. Thus exp(-D/(k_B T)) approaches 1. The gap need not shrink, and the states need not disappear. Equal high-temperature populations apply to a finite set of equally degenerate levels, not automatically to an infinite spectrum.

Leaving a positive-weight state out of Z gives an incomplete denominator. Dividing retained weights by that denominator describes a restricted set, not the full system. To find the full probabilities and mean energy, include every allowed state. Only a stated approximation can justify neglecting very small weights.

**Recap.** Sum exp(-E/(k_B T)) over microstates for Z. Divide weights by Z for probabilities, then weight energies to find the mean. Level populations also depend on degeneracy.

*Original lesson, questions and flashcards written for this learning dataset.*

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [The exponential function and the number e](https://lightmysky.com/learn/mathematics/the-exponential-function-and-the-number-e-mt_2hyjN4JfJJ)
- [Microstates, Multiplicity and Boltzmann's Entropy](https://lightmysky.com/learn/science/microstates-multiplicity-and-boltzmanns-entropy-mt_55I3VvYMc6)
- [Infinite Series and the Geometric Series](https://lightmysky.com/learn/mathematics/infinite-series-and-the-geometric-series-mt_EPE-ERFFQt)

## Opens up

- [Fluctuations, Linear Response and the Fluctuation-Dissipation Relation](https://lightmysky.com/learn/science/fluctuations-linear-response-and-the-fluctuation-dissipation-relation-mt_Ibsvdyx7uP)
- [Free Energy and the Direction of Spontaneous Change](https://lightmysky.com/learn/science/free-energy-and-the-direction-of-spontaneous-change-mt_ww43eqzupN)
