---
title: "The Boltzmann Factor and the Partition Function"
description: "The chance of a state falls exponentially with its energy divided by kT, and summing those factors over all states gives the partition function. Once it is known, the thermal properties follow by diff"
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-09-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

The chance of a state falls exponentially with its energy divided by kT, and summing those factors over all states gives the partition function. Once it is known, the thermal properties follow by differentiation.

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

The chance of a state falls exponentially with its energy divided by kT: that weight is the Boltzmann factor. Lower states win at cold temperatures, while heat levels the field. The two-level system is the perfect lab. The population ratio of upper to lower is the exponential of minus the gap over kT. Cold means nearly all below, hot means nearly even. Every laser, magnet, and chemical equilibrium leans on this ratio.

**Example.** Take two states, E equal to 0 with factor 3 and E equal to 2 with factor 1. The partition function Z sums the factors over every state, so Z equals 4. State odds are each factor over Z: three quarters below, one quarter above. Mean energy weights each energy by its odds: (0 times 3 plus 2 times 1) over 4 gives 0.5. Build Z first and the rest is arithmetic.

Temperature is the price of energy in the marketplace of microstates. As kT grows past the gaps, every exponential nears one and the odds even out, which is exactly the hot leveling you saw. Once Z is known, the thermal properties follow by differentiation: free energy and heat capacity come from the same total with one more derivative each.

**Tip.** Run every thermal question through one pipeline. Write the gap over kT and exponentiate for the population ratio. Sum every factor for Z, never just one state. Divide for odds, weight for mean energy. Check the ends: freezing cold piles everything below, blazing hot splits nearly even.

**Recap.** States weigh in by exp(-E/kT), Z sums the weights into odds, and mean energy follows by weighting.

## 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)
