Foundations — Average energy from partition function
Before we can even read the formula , we must earn every piece of it. Below, each symbol gets three things: plain words, a picture, and why the topic needs it. They are ordered so each one leans only on the ones above it.
1. A microstate, and the label
Picture. Think of a jar full of raffle tickets. Each ticket is one microstate. The index is just the number printed on the ticket — a name tag, nothing more.
Why the topic needs it. Everything we sum over is "all the microstates." Without a way to list them () we cannot write a sum at all.

2. Energy of a state,
Picture. Draw a vertical "energy axis" (higher = more energy). Each microstate is a horizontal shelf at height . This is the energy-level diagram you see everywhere in this chapter.
Why the topic needs it. The whole question — "what is the average energy?" — only makes sense once each state carries a number . These numbers are the values we will average.
3. Temperature and the heat bath
Picture. A small cup of water floating in a giant lake. The lake's temperature never budges; the cup keeps swapping energy with it and settles to the lake's temperature.
Why the topic needs it. "In contact with a heat bath at temperature " is the whole setting. is the knob that decides whether low-energy states dominate (cold) or all states are roughly equal (hot).
4. Boltzmann's constant
Picture. A currency exchange rate: kelvin on one side, joules on the other. Multiply temperature by and you get "the natural energy scale of jiggling at that temperature," namely .
Why the topic needs it. Energies live in joules; temperatures live in kelvin. To compare them (as we must, inside an exponent) we need to make units match.
5. Inverse temperature
Picture. A see-saw: as goes up, goes down, and vice versa. When is huge (cold), the exponent is a big negative number for high-energy states, crushing them.
Why the topic needs it. The final formula is — a derivative with respect to , not . Working in makes the algebra clean because multiplies directly in the exponent (no messy buried inside).
6. The exponential — the Boltzmann weight
Now we combine the pieces. Why an exponential, of all functions?
Picture. A curve that starts high and decays. Low-energy shelves get tall bars; high-energy shelves get tiny bars. Cold ( large) makes the curve plunge fast; hot ( small) flattens it.

Why the topic needs it. These weights are the raw material of everything. The partition function is their sum; the probabilities are them normalized; the average energy is a derivative of their sum.
7. The partition function
Picture. Take every bar from the previous figure and stack them end to end into one long bar. That total length is . As you warm the system, more bars grow, and increases.
Why the topic needs it. Two jobs at once:
- Normalizer — dividing each weight by turns scores into genuine probabilities (they add to 1).
- Generator — because contains every , differentiating reaches inside and pulls out the energies. This is the whole trick of the parent note.
8. Probability and the sum
Picture. Slice a pie chart. Each slice is a microstate; the slice's angle is . Big Boltzmann weight → fat slice. The whole pie is , so a slice's fraction of the pie is .
Why the topic needs it. The average energy is — literally "sum of value × probability." Both and must exist before that line means anything.
9. The average (expectation value)
Picture. Back to the energy-level shelves: put a weight on each shelf and find the balance point of the whole stack. That balance height is . Cold → balance sits near the lowest shelf; hot → it rises toward the middle of the pack.
Why the topic needs it. This is the quantity the entire topic computes. The magic is that it equals , so we never actually do the weighted sum by hand.
10. The derivative and the logarithm
These are the two tools the formula uses. State plainly why each tool and not another.
Why this tool? We need a factor of to appear next to each weight. Differentiating in manufactures exactly that factor: No other simple operation produces an out of thin air. That single fact is why a derivative — and specifically a derivative in — is the right instrument.
Why this tool? After differentiating we get — a "divide by , then differentiate" combo. The logarithm bundles that whole combo into one clean symbol . Bonus: is exactly the object that gives the Helmholtz free energy , so using it links energy and free energy for free.

How the pieces assemble into the formula
Reading the figure above left-to-right: microstates → energies → weights → their sum → its log → its slope in → flip the sign → average energy. Every arrow is one of the definitions above.
Prerequisite map
The map shows two roads to the same destination: the honest sum road () and the generator road (). The topic's whole point is that these two roads meet.
Where these foundations lead
- The weights themselves are the Boltzmann distribution.
- Their sum is the Partition function (canonical ensemble).
- Differentiating once → average energy (this topic); twice → Heat capacity and energy fluctuations.
- Apply it to specific systems: Two-level system / Schottky anomaly, Quantum harmonic oscillator — thermal, and the Equipartition theorem.
- The log itself is the free energy.
Return to the parent: 2.4.11 Average energy from the partition function.
Equipment checklist
Cover the right side and answer before revealing.
What is a microstate, in one sentence?
What does stand for?
What are the units of and what does it do?
Write in terms of and say which way it points.
Why must the state-weight be an exponential?
Write the partition function as a sum.
Give the two jobs performs.
Express the Boltzmann probability .
Define as a weighted sum.
What does equal, and why does it matter?
State the chain-rule identity that brings in .
Assemble the final formula for average energy.
Recall Fastest sanity check
If every , must be positive? ::: Yes — the minus sign in cancels the minus from the exponent, so a physically sensible positive average survives.