2.4.10 · D2Thermodynamics & Statistical Mechanics (Advanced)

Visual walkthrough — Canonical ensemble — partition function Z

1,981 words9 min readBack to topic

We will earn, in order: microstate, reservoir, entropy, temperature, the exponential weight, the normalizer , and why is a master key.


Step 1 — What is a "microstate"? Draw the box.

WHAT. Picture a tiny system — say a single atom — that can be in one of several distinct configurations. Each precise configuration is a microstate. We label them and each one carries an amount of energy we call (read: "the energy of microstate ").

WHY. Before we can ask "how likely is the system to be here?", we must agree on what "here" means. "Here" = one microstate. The whole theory is a rule for assigning a probability to each labelled box.

PICTURE. Below: three boxes stacked by height = energy. The bottom box is the lowest energy (the ground state), higher boxes cost more energy. The red arrow points at the one microstate we will track.


Step 2 — The system is NOT alone: add the reservoir.

WHAT. Our small system is glued to a huge object — a heat reservoir (the "bath") — so big that giving or taking a little energy barely changes it. Together, system + reservoir form one isolated super-object whose total energy never changes.

WHY. A system alone at fixed energy is boring (that's the Microcanonical ensemble). Real things sit in an environment at a fixed temperature. The only way energy leaves the system is into the bath — so to know the system, we must watch the bath.

PICTURE. A small red circle (system, energy ) embedded in a giant black region (reservoir, energy ). The dashed outer line is the isolating wall: no energy crosses it.


Step 3 — Equal-likelihood: probability = counting the bath's ways.

WHAT. The fundamental postulate: for an isolated super-object at fixed total energy, every accessible microstate of the whole is equally likely. So the chance the system sits in box is proportional to the number of ways the reservoir can arrange itself while holding the leftover energy . Call that count .

WHY. The system's own box is a single fixed choice once we pick . All the freedom — all the "ways" — lives in the giant reservoir. More ways ⇒ more likely.

PICTURE. Two scenarios side by side. Left: system takes a little energy → reservoir keeps most → many black dots (many arrangements). Right: system takes a lot → reservoir starved → few dots. The red bar is the system's slice.


Step 4 — Switch to entropy, because is astronomically large.

WHAT. is a number like — impossible to Taylor-expand directly. Its logarithm is smooth and manageable. Define entropy , so that .

WHY this tool (the logarithm)? We need to expand for small . A raw exponential-of-huge changes by factors of — hopeless. But (i.e. ) changes gently and linearly over the tiny range . The log turns a runaway product into a tame straight line we can approximate. That is the entire reason entropy enters here.

PICTURE. Left axis: shoots up like a cliff (unusable). Right axis: is a smooth gentle curve. The red tangent line is what we will use in Step 5.


Step 5 — Taylor-expand: a straight line is enough.

WHAT. Because is tiny next to , we only need the reservoir's entropy at plus a small linear correction — the first term of a Taylor expansion (approximate a curve near a point by its tangent line):

WHY. Higher-order terms carry powers of , which are effectively zero because the bath is enormous. The tangent line is the physics.

PICTURE. Zoom of the entropy curve near . The red tangent line hugs the curve; its downward step over the width is the whole correction.


Step 6 — Temperature appears; the Boltzmann factor is born.

WHAT. Substitute the slope into Step 5, then exponentiate back (): Define (the "coldness"). The constant drops out of any comparison:

WHY. The subtraction of inside the exponent became a multiplying factor outside. Higher ⇒ smaller factor ⇒ exponentially rarer state. Low (big ) ⇒ steep decay ⇒ system hugs the ground state.

PICTURE. The weight plotted against for two temperatures: a steep red curve (cold, big ) and a gentle black curve (hot, small ).


Step 7 — Normalize: the sum over states IS .

WHAT. A probability list must add to . We have ; to make it an equality we divide by the sum of all the weights. That sum has a name — the partition function:

WHY. is not itself a probability — it is the total weight, the denominator that rescales every raw Boltzmann factor so they sum to 1. (Its German name Zustandssumme = "sum over states" is literally the definition.)

PICTURE. Bars of height for each microstate. Their total height stacked = (red brace). Each bar divided by gives the probability slice.


Step 8 — Why is the master key: differentiate to pull down energy.

WHAT. Because multiplies every inside , differentiating with respect to brings down a factor of on each term — exactly the ingredient of an energy average:

WHY this tool (the -derivative)? We want , a weighted average of energies. The derivative is the machine that inserts a factor into each term for free. No new physics — just calculus harvesting information already stored in .

PICTURE. A curve of versus ; its downhill slope (red tangent) at any point equals . Steeper slope = more average energy.


Edge & degenerate cases (never leave the reader stranded)


The one-picture summary

Everything above is one causal chain: equal-likelihood of the isolated whole → count the bath's ways → log it into entropy → tangent line → temperature enters → exponential weight → sum it into → differentiate for thermodynamics.

Recall Feynman retelling (say it in plain words)

Imagine a marble (our system) sitting in a giant sandbox (the bath). The sandbox and marble together are sealed in a box with a fixed amount of energy. Nature is fair: every allowed arrangement of the whole sealed box is equally likely. Now — if the marble greedily takes a lot of energy, the sandbox has less energy left, and a low-energy sandbox has far fewer ways to arrange its grains. So the marble taking lots of energy is a rare arrangement. Counting the sandbox's arrangements is unwieldy (numbers like ), so we take the logarithm and call it entropy; its gentle slope with energy is what we define as (temperature). Sliding the marble's energy up by slides the sandbox's entropy down by , and un-logging that turns the "down by " into a multiplying factor — the Boltzmann factor. To turn these raw weights into honest probabilities we add them all up; that grand total is , the partition function. And here's the magic: because the coldness multiplies every energy inside , poking with a derivative in shakes out the average energy — and a few more pokes give heat capacity, entropy, free energy. One sum ; the whole of thermodynamics falls out. That's why it's the master key. (See also Equipartition theorem, Heat capacity and fluctuations, and the Gibbs paradox.)