Visual walkthrough — Free energy from partition function
We only assume you can add, multiply, and read a bar chart. Everything else — Boltzmann weights, the partition function, entropy, the logarithm trick — is built in front of you.
Step 1 — A system is a list of energy levels
WHAT. Picture a tiny system. It cannot hold any energy it likes — it can only sit in one of a fixed set of microstates, each with its own energy. Label them and call their energies We draw them as rungs on a ladder: low rung = low energy, high rung = high energy.
WHY. Before we can count or weight anything, we need the thing being counted. The ladder of levels is the raw material of all of statistical mechanics.
PICTURE. Look at the ladder below. The height of each rung is its energy . Nothing has been weighted yet — this is just the menu.
Step 2 — Cold systems prefer low rungs: the Boltzmann weight
WHAT. The system touches a large heat bath at temperature . The bath lets the system borrow or dump energy. The chance the system sits on rung is proportional to the Boltzmann weight Term by term: is the exponential (it turns adding in the exponent into multiplying — we'll cash that in later); is the rung's energy; is "coldness" (big = cold, small = hot); is Boltzmann's constant, the tiny number that converts temperature into energy.
WHY use and not, say, ? Because we want a rule where energies add but weights multiply. If two independent pieces have energies and , the joint energy is , and splits cleanly into a product. Only the exponential does this. That single property drives the whole derivation.
PICTURE. The weight is a falling curve: tall for low rungs, shrinking as you climb. Cold (large ) = steep fall, only the bottom rungs matter. Hot (small ) = gentle fall, all rungs roughly equal.
Step 3 — Add up the weights: that sum IS
WHAT. Add every rung's weight into one number, the partition function: Here means "sum over all rungs." is a single number that depends on (and on through the energies).
WHY. Two reasons. (1) To turn weights into honest probabilities we must divide by their total — that total is . (2) secretly stores everything: once we have we never touch individual rungs again. It is the "master number" the parent note promised.
PICTURE. Stack the weight-bars end to end. The full length of the stack is . The fraction of the stack owned by rung is its probability is "what share of the stack is rung " — and shares always add to .
This connects to Boltzmann distribution and microstates, where the shape is derived by maximising entropy.
Step 4 — Average energy is the slope of
WHAT. The internal energy is the average rung height, each rung weighted by its share:
Now a small piece of calculus. A derivative answers: "if I nudge the coldness a hair, how fast does this quantity change?" We use it because differentiating the exponential pulls the energy down in front: That is exactly the we needed! Summing over : Divide by and recognise (the chain rule: the slope of is times the slope of ):
WHY. We replaced a messy weighted sum over all rungs with one derivative of one function. This is the entire payoff of statistical mechanics: differentiate , never re-count microstates.
PICTURE. Plot against . It slopes downward (more coldness fewer accessible rungs smaller ). The steepness of that downhill slope, made positive by the minus sign, is .
Step 5 — Entropy is "how spread out" the shares are
WHAT. Entropy measures how spread across many rungs the probability is. The Gibbs definition: Term by term: is the share of rung ; is a large negative number for a tiny share; the overall minus and make a positive energy-per-temperature.
Substitute what we already know: from Step 3, , so Plug in: The first bracket is (Step 4), the second is (shares sum to one). Using :
WHY. We deliberately used so that the term would break loose — it is that loose piece that will become the free energy in the next step.
PICTURE. One share is drawn as tall spike (ordered, low ); many equal shares as a flat plateau (spread out, high ). Below each we show the size of .
See Entropy — Gibbs and Boltzmann definitions for why collapses to when all shares are equal.
Step 6 — Assemble and watch vanish
WHAT. The Helmholtz free energy is defined as (its natural variables are ; see Helmholtz vs Gibbs free energy). Substitute the Step 5 result for : The terms are equal and opposite — they annihilate:
WHY it must cancel. is supposed to depend on through alone; the leftover average energy has no business being there. The cancellation is the theory telling us the bookkeeping is consistent.
PICTURE. Two stacked bars, from internal energy and hidden inside , cancel to zero; the surviving strip is the lavender .
Step 7 — Why a logarithm: joining systems
WHAT. Take two independent systems, and . A joint microstate is " on rung AND on rung ", with energy . Then Partition functions multiply. But real thermodynamic quantities like energy and free energy must be extensive — join two identical tanks of gas and should double, not square. The cure is the logarithm: turns the product into a sum, so adds. That is the entire reason is and not .
WHY here. This is the missing "why the log" from the boxed formula — the property that makes , not , the natural thermodynamic potential.
PICTURE. Left: two boxes side by side, weights multiplying (). Right: after , the two contributions lie end to end, adding ().
Edge & limiting cases — the two-level system checks every corner
WHAT. Test the machinery on the simplest system: two rungs at and .
WHY. A formula you trust must survive the extremes. Two limits:
- Cold, (): , so . The system freezes into the ground rung. ✓
- Hot, (): , so — both rungs equally likely, average height is the midpoint. ✓
- Degenerate : the two rungs merge, , — pure entropy of a two-way coin flip, zero energy. ✓
PICTURE. The energy curve rises smoothly from to the plateau ; the two dashed asymptotes are the cold and hot limits.
The one-picture summary
WHAT. The whole derivation compressed into a single flow: ladder of levels Boltzmann weights sum them into from pull out (slope) and (spread) assemble cancels . The logarithm on the side note explains extensivity.
Recall Feynman retelling of the whole walkthrough
Picture a ladder where each rung is an energy the system can have. A warm bath outside makes low rungs comfy and high rungs unlikely — the "comfiness" of rung is the falling number . Add up all the comfinesses and you get one grand total, . Divide any rung's comfiness by that total and you get its honest probability — its share of the ladder. Two things live inside . First, if you ask "how fast does drop as I cool the system?", the answer is the average energy — no need to re-add rung by rung. Second, "how spread across many rungs are the shares?" is the entropy , and when you work it out you find . Now build the free energy : the from the energy and the hiding inside are equal and opposite, so they wipe each other out, and all that survives is . Why the log? Glue two systems together and their comfiness-totals multiply; but the free energy of two tanks should add. The logarithm is the machine that turns multiplying into adding — that's the whole reason nature hands us instead of .
Active recall
- What single number stores all thermodynamics once you have the energy ladder? ::: The partition function .
- How do you get from without summing rung by rung? ::: (the downhill slope of vs ).
- In , what happens to ? ::: It cancels exactly against the piece inside , leaving .
- Why a logarithm and not just ? ::: Independent systems multiply ; turns the product into a sum so is extensive (additive).
- Two-level system as : what is ? ::: — both rungs equally likely, average is the midpoint.
- Two-level system as : what is ? ::: — the system freezes into the ground rung.