Skip to content
Mental Models

Entropy & the Second Law

Counting the Ways: Microstates & Macrostates

The statistical definition of entropy from zero — multiplicity W counts the arrangements behind a big-picture state, S = k ln W turns that count into a number, and disorder wins not by force but because messy states can happen vastly more ways.

14 min Updated Jul 12, 2026

The introduction promised a startling claim: the “running down” of everything — cooling coffee, spreading gas, a room turning messy — is not a force. Nothing pulls things toward disorder. This lesson makes good on that promise by handing you the machinery behind it, and it turns out to be the most mundane machinery imaginable: counting. Disorder wins because there are simply more ways to be disordered than to be tidy, and a system shuffled at random lands in whatever it can land in the most ways. That’s the whole engine. Everything else in this course is that one idea, dressed for different occasions.

To make it precise we need two words that sound similar and mean opposite things — microstate and macrostate — plus one number that connects them, the multiplicity WW. Get those three ideas and you can derive the second law instead of merely believing it.

Before you read — take a guess

Before we start — take a guess. A gas fills its whole container instead of huddling in one corner. Why?

Macrostate vs microstate: the blurry photo and the sharp one

Start with an analogy you already live inside. Imagine describing a jigsaw puzzle dumped on a table. You could say “the pieces are scattered all over” — that’s a big-picture description. Or you could specify the exact position and angle of every single piece — that’s the complete description. The first is coarse and forgiving; countless different tabletops match it. The second is exact; only one tabletop matches it.

That distinction is the heart of statistical mechanics.

  • A macrostate is the big-picture description you can actually measure or eyeball: the temperature of the coffee, “3 heads out of 4 coins,” “the gas fills the box,” “the puzzle is scattered.” It names a category of situations, not one situation.
  • A microstate is one exact, fully-specified arrangement of every component: the precise position and velocity of every molecule, the specific heads-or-tails of each individual coin, the exact spot of every puzzle piece. It pins down everything.

Think of the macrostate as a blurry photo and a microstate as one of the many sharp photos that would blur down to it. “3 heads out of 4” is blurry — it doesn’t say which coin is tails. HHHT, HHTH, HTHH, and THHH are four different sharp photos that all blur to the same “3 heads” description.

Info:

The one line to hold onto

A macrostate is what you know (the summary you can measure); a microstate is the full truth (every detail nailed down). Many microstates can wear the same macrostate as a disguise — and how many is the number that runs this whole course.

Multiplicity: the number of ways, WW

That “how many” has a name. The multiplicity WW of a macrostate is the number of microstates consistent with it — how many distinct exact arrangements would all look like the same big-picture description.

W=(number of microstates that realise a given macrostate)W = \big(\text{number of microstates that realise a given macrostate}\big)

Multiplicity is just a count of ways. “All 4 coins heads” has multiplicity W=1W = 1: there’s exactly one way (HHHH). “Exactly 3 heads” has W=4W = 4: four ways, as we just listed. The tidier, more specific a macrostate is, the fewer ways realise it and the smaller its WW. The vaguer, more spread-out a macrostate is, the more ways realise it and the bigger its WW. Hold that asymmetry — it is the seed of the entire second law.

Here is the pivot the rest of the course swings on: a system shuffled by random motion visits microstates blindly, one after another, with no preference among them. If every microstate is equally likely, then the macrostate you’ll find the system in is simply the one that owns the most microstates — the one with the biggest WW. Not because it’s favoured. Because it’s bigger. A macrostate with a trillion times more microstates is a trillion times more likely to turn up, for the same reason a lottery with a trillion tickets on one number and one ticket on another “prefers” the popular number. There’s no preference. There’s just counting.

Work it by hand: four coins

Analogies are nice; let’s get our hands dirty with the smallest system where the counting is still visible. Flip four fair coins. Each coin is either heads (H) or tails (T), so there are 24=162^4 = 16 equally-likely microstates in total — sixteen distinct sharp photos, each as likely as any other.

Now group them by macrostate, where the macrostate is just “how many heads.” The multiplicity of “exactly kk heads” is the number of ways to choose which kk of the 4 coins show heads — the binomial coefficient W=(4k)W = \binom{4}{k}.

Before you read the table, predict it yourself.

Try to list them. How many ways can 4 coins show exactly 2 heads? Write them out: HHTT, HTHT, HTTH, THHT, THTH, TTHH — that’s 6. And exactly 1 head? HTTT, THTT, TTHT, TTTH — that’s 4. Exactly 0 heads? Only TTTT — that’s 1. So the counts run 1, 4, 6, 4, 1, which add to 16, exactly the total number of microstates. Those are the numbers in row 4 of Pascal’s triangle — binomial coefficients, (4k)\binom{4}{k}. The counting is combinatorics.

Macrostate (kk heads)Microstates that realise itMultiplicity W=(4k)W = \binom{4}{k}Probability
0 headsTTTT11/16
1 headHTTT, THTT, TTHT, TTTH44/16
2 headsHHTT, HTHT, HTTH, THHT, THTH, TTHH66/16
3 headsHHHT, HHTH, HTHH, THHH44/16
4 headsHHHH11/16

Read the shape of that column. The extreme, “tidy” macrostates — all-heads or all-tails — each have W=1W = 1: one lonely way. The balanced macrostate, 2 heads and 2 tails, has W=6W = 6: it hogs six of the sixteen microstates, more than any other. Even with a puny four coins, the even split is already six times more likely than either perfectly-ordered extreme. The peak sits in the middle, at the “most mixed” macrostate, and it’s the tallest column purely because more sharp photos blur to it.

From the four-coin table: how many times more likely is the “2 heads, 2 tails” macrostate than the “all 4 heads” macrostate?

Same counting, now a gas: particles in a box

Coins are a toy, but swap “coin shows heads” for “particle sits in the left half of the box” and you have a real gas. Divide a container down the middle into a left half and a right half. Each of NN molecules is, at any instant, either on the left or on the right — exactly like a coin being H or T. A microstate says precisely which side each numbered molecule is on. A macrostate just says how many are on the left, nleftn_{\text{left}} — the coarse thing you could actually measure as density or pressure.

The multiplicity is identical in form to the coins: the number of ways to choose which nleftn_{\text{left}} of the NN molecules are on the left,

W=(Nnleft).W = \binom{N}{n_{\text{left}}}.

Take a tiny gas of N=10N = 10 molecules and tabulate it:

Macrostate (nleftn_{\text{left}} of 10)Multiplicity W=(10nleft)W = \binom{10}{n_{\text{left}}}Share of all 210=10242^{10} = 1024 microstates
0 (all on the right)10.1%
1101.0%
2454.4%
312011.7%
421020.5%
5 (even split)25224.6%
621020.5%
712011.7%
8454.4%
9101.0%
10 (all on the left)10.1%

Look at the two ends versus the middle. “All 10 molecules on the left” has W=1W = 1 — a single microstate, the same lonely one-in-a-thousand status as all-heads. “Five on each side” has W=252W = 252 — the fat peak. Even at a laughable ten molecules, the roughly-even spreads (say 4–6 on the left) already own about 66% of every possible arrangement, while “all crammed on one side” is a 0.1% curiosity.

Now play it out. This is exactly the picture the sandbox below draws: start every particle bunched on the left (the lonely W=1W = 1 macrostate), let them jostle at random, and watch the count of microstates — the entropy — climb as the system wanders into the vastly more numerous spread-out arrangements. That drift from the W=1W = 1 corner to the W=252W = 252 middle, happening for no reason but arithmetic, is a gas filling its container.

Entropy lab

Watch counting become diffusion

Every particle starts crammed into the left half, then just drifts. Watch it fill the whole box — not because anything pushes it, but because "spread out" is overwhelmingly the most likely arrangement. Push the particle count up to see how much harder it becomes to ever run backwards.

Entropy S = ln W

0%

Split
40 left · 0 right
Odds of returning to the start (all on the left)
1 in 10^12

40 on the left, 0 on the right. Entropy is 0% of its maximum. Chance of spontaneously re-bunching on the left: 1 in 10^12.

Every particle starts bunched on the left — the lonely W = 1 macrostate. Hit Play and they drift to fill the box, not because anything pushes them, but because there are far more microstates with the particles spread out. The entropy bar shows S = ln W climbing to its peak at the even split. The 'odds of returning to the start' stat is literally 1 in 2^N — the chance random shuffling puts every particle back on the left at once. Try Rewind: the reverse is allowed by every law of motion, it's just astronomically improbable.

The reason the box never spontaneously un-mixes isn’t that reversal is forbidden. Every collision is perfectly reversible; the molecules would happily retrace their steps. It’s that the “everyone back on the left” macrostate is one microstate out of 2N2^{N}, so the odds of stumbling into it are 1 in 2N2^{N}. With just N=40N = 40 particles that’s already 1 in a trillion. Fill the box with a real gas and the number becomes so vast the universe will end first. Reversal isn’t outlawed; it’s outvoted.

Boltzmann’s bridge: S=klnWS = k \ln W

We’ve been trading in raw multiplicities, but WW is an unwieldy monster — for a real gas it’s a number with more digits than there are atoms in your body. In the 1870s Ludwig Boltzmann tamed it with an equation so central it’s carved on his tombstone. Define entropy SS as

S=klnW,S = k \ln W,

where WW is the multiplicity of the macrostate, "ln\ln" is the natural logarithm, and kk is Boltzmann’s constant (k1.38×1023k \approx 1.38 \times 10^{-23} joules per kelvin) — a tiny conversion factor whose only job is to put entropy into the units physicists already used for it (energy per degree of temperature). For building intuition you can practically ignore kk; the soul of the equation is SlnWS \sim \ln W: entropy is (essentially) the logarithm of the number of ways.

Why bury a clean count of ways inside a logarithm? Two reasons, and the second is gorgeous.

  1. It cuts monsters down to size. WW for everyday systems is around 10(1023)10^{(10^{23})} — untypable. Its logarithm is a friendly, human-sized number you can add and compare. The log is a pressure valve on the arithmetic.
  2. It turns multiplying into adding — and that’s the whole point. Here’s the deep bit, and it ties straight to the compounding you met earlier. Put two independent systems side by side. System A has WAW_A ways to arrange itself and system B has WBW_B ways. How many ways does the combined system have? For each of A’s arrangements, B can be in any of its own — so the counts multiply: Wtotal=WA×WBW_{\text{total}} = W_A \times W_B. Multiplicities compound multiplicatively, exactly like independent probabilities or compounding returns.

The logarithm converts that multiplication into an addition:

Stotal=kln(WAWB)=klnWA+klnWB=SA+SB.S_{\text{total}} = k \ln(W_A \, W_B) = k \ln W_A + k \ln W_B = S_A + S_B.

So entropy adds up across independent parts — two identical boxes of gas have twice the entropy of one, which is exactly the sensible, “extensive” behaviour we want from a physical quantity. That neat additivity is not a coincidence; it’s the logarithm rescuing us from the fact that the underlying ways multiply. Whenever you see a log in physics or information theory, suspect there’s a pile of independent things whose possibilities were multiplying underneath.

Tip:

Read the equation out loud

S=klnWS = k \ln W says: entropy is a measure of how many microscopic ways a macrostate can be realised. High entropy = many ways = spread-out, mixed, probable. Low entropy = few ways = concentrated, ordered, rare. The second law — “entropy tends to increase” — is then almost a tautology: a random walk through equally-likely microstates drifts toward the macrostate that has the most of them. Things move from few-ways to many-ways because many-ways is, definitionally, where most of the ways are.

Two independent boxes of gas have entropies S_A and S_B. Because entropy is defined with a logarithm of the multiplicity, the entropy of the combined system is:

More particles, sharper law: why big systems are always maxed out

Four coins already lean toward the even split, but only mildly — all-heads still turns up 1 time in 16, often enough to see on a lazy afternoon. The magic is what happens as NN grows: the peak at the even split doesn’t just win, it annihilates the competition.

The governing fact is that relative fluctuations shrink like 1/N1/\sqrt{N}. For NN coins or particles, the typical wobble away from a perfect 50/50 split is about N\sqrt{N} in absolute terms — but as a fraction of NN that’s N/N=1/N\sqrt{N}/N = 1/\sqrt{N}, which marches to zero as NN explodes. Watch it bite:

NNTypical % away from 50/50 (100/N\approx 100/\sqrt{N})Odds of finding everything on one side (1/2N1/2^{N})
10~32%1 in about 1000
100~10%1 in about 103010^{30}
10 000~1%1 in about 10300010^{3000}
102010^{20}~0.0000001%1 in a number with ~101910^{19} digits

For a real gas, NN is around 102310^{23}. The split is pinned to 50/50 so tightly that a deviation big enough to measure — a few percent — is less likely than picking one specific atom in the observable universe by blind luck, repeatedly. The system isn’t usually near maximum entropy; it is essentially always there, glued to the peak, because every other macrostate has been statistically exterminated. This razor-sharpening with size is precisely why the second law feels like an ironclad law for anything you can see or touch, even though it’s “only” a statement about probabilities. Probabilities this lopsided are laws.

That sharpening is also the seed of irreversibility — the arrow of time we tackle next lesson. A four-coin system flickers back to all-heads now and then, so its “past” and “future” look alike. A 102310^{23}-particle system, having drifted to its peak, will never in the lifetime of the cosmos be caught heading back. The one-way street of the second law is just the 1/N1/\sqrt{N} law taken to astronomical NN.

Entropy lab

Drag N up and watch reversal die

Every particle starts crammed into the left half, then just drifts. Watch it fill the whole box — not because anything pushes it, but because "spread out" is overwhelmingly the most likely arrangement. Push the particle count up to see how much harder it becomes to ever run backwards.

Entropy S = ln W

0%

Split
120 left · 0 right
Odds of returning to the start (all on the left)
1 in 10^36

120 on the left, 0 on the right. Entropy is 0% of its maximum. Chance of spontaneously re-bunching on the left: 1 in 10^36.

Same sandbox, second look — now use the particle-count slider. At small N the split jitters visibly and 'returning to the start' is merely unlikely. Crank N up and the split locks near 50/50, the entropy bar pins to its maximum, and the return-odds (1 in 2^N) collapse past astronomical. The irreversibility you feel in the real world is this slider pushed to N ≈ 10^23.

The big misconception: entropy is not eyeball-messiness

Now the trap, because it snares nearly everyone who learns the word “entropy” from pop science. It is tempting to define entropy as “how messy something looks,” and to imagine some macrostates are high-entropy because they’re visually chaotic. That is wrong, and the error will wreck your reasoning later in the course (a freezing pond and separating oil both look more ordered while their entropy rises).

Entropy is not a property you can eyeball. It is a count of microstates — a property of the macrostate, defined by how many exact arrangements realise it, not by how it strikes your eye. Three corrections to nail this down:

  • A messy-looking state isn’t high-entropy because it looks messy — it’s high-entropy because a huge number of microstates produce that kind of configuration. The messiness is a symptom of high multiplicity in most everyday cases, not the definition. When the two come apart (crystals, freezing, chemical separation), always trust the counting, never the eyeball.
  • A single microstate is never “high entropy.” Entropy belongs to the macrostate, full stop. Pick any one exact arrangement of a gas — a specific sharp photo — and ask “what’s its entropy?” The question is malformed. That single arrangement is just one microstate; entropy measures how many microstates share its macrostate. One photo can’t be blurry.
  • A tidy arrangement isn’t “improbable” because it’s special to you — it’s improbable because few microstates realise it. “All molecules on the left” and “molecules 1–20 on the left, the rest on the right” are equally improbable as specific microstates (both 1 in 2N2^N). The first only feels special because we gave it a tidy name. Nature counts microstates; it doesn’t read our labels.
Warning:

The mantra that fixes it

Don’t ask “does this look disordered?” Ask “how many microstates realise this macrostate?” Every time your intuition and the counting disagree — and in this course they will — the counting is right and your eyes are wrong. Entropy is bookkeeping, not aesthetics.

Sort each statement by whether it describes a HIGHER-multiplicity (higher-entropy) macrostate or a LOWER-multiplicity (lower-entropy) one.

Place each item in the right group.

  • A well-shuffled deck in no particular order
  • All 100 coins showing heads
  • Cream fully stirred through the coffee
  • “Roughly half the coins heads” for a big pile of coins
  • A deck fresh from the factory, in perfect suit-and-rank order
  • Cream sitting in one unmixed blob on top of the coffee
  • A gas evenly filling the whole box
  • Every molecule crammed into the left half of the box

A worked example with real-ish numbers: the shuffled deck

Put a number on it. Take a standard 52-card deck. Every ordering is one microstate, and there are 52!8×106752! \approx 8 \times 10^{67} of them — a colossus with 68 digits, comfortably more than the estimated number of atoms in our galaxy.

Now define two macrostates:

  • “Perfect factory order” (all suits sorted, ace-to-king): the multiplicity is W=1W = 1. Exactly one ordering counts as this. Its entropy ln1=0\propto \ln 1 = 0.
  • “Some shuffled order with no discernible pattern”: essentially all of the 8×1067\sim 8 \times 10^{67} orderings look like this. Its multiplicity is basically the whole 52!52!, and its entropy ln(52!)156\propto \ln(52!) \approx 156 — a giant compared with zero.

Here’s the sharp lesson. When you shuffle, any specific final order you get is exactly as improbable as any other — including the factory order. Deal out a random shuffle and you have, right there in your hands, an arrangement so rare it has almost certainly never occurred before in the history of card-playing. Yet it feels utterly unremarkable. Why? Because it’s one of the astronomically many orders that wear the macrostate label “shuffled.” The factory order feels miraculous only because it’s the lone member of a macrostate we named. Nature isn’t impressed by your labels; it counts microstates, and there are 52!52!-minus-one more ways to be “messy” than to be “sorted.”

The same arithmetic runs the gas. Let a gas double its volume — open a valve so it expands from one chamber into two. Each of the NN molecules now has twice as many places to be, so the number of arrangements multiplies by 2N2^N, and the entropy rises by ΔS=kln(2N)=Nkln2\Delta S = k \ln(2^N) = N k \ln 2. For a mole of gas (N6×1023N \approx 6 \times 10^{23}) that’s a hefty, thoroughly measurable increase — and it is why gas rushes out to fill new space the instant you let it, and never spontaneously crams back into half the box. More room means more ways; more ways means higher entropy; and higher entropy is simply where nearly all the microstates live.

You shuffle a deck and get some specific order X. Your friend says “wow, that exact order is incredibly improbable — about 1 in 10^68!” Are they right, and does it mean anything special happened?

Second-law preview: why this counting is the arrow of time

Zoom out and admire what we’ve built. We never invoked a force, a fluid pulling toward chaos, or a cosmic will to decay. We invoked arithmetic: a system shuffling among equally-likely microstates spends essentially all its time in the macrostate with the most of them, and for macroscopic NN that peak is so dominant that departures from it are effectively impossible. Restated, that is the second law of thermodynamics: the entropy of an isolated system tends to increase, until it sits — pinned by the 1/N1/\sqrt{N} sharpening — at its maximum.

  • Coffee cools because there are vastly more ways to spread its energy among all the room’s molecules than to keep it hoarded in the cup. (Next course-arc: energy has microstates too, not just position.)
  • The gas fills the box because “spread out” outnumbers “bunched” by 2N2^N to one.
  • The deck stays shuffled because “ordered” is one label on a rounding-error’s worth of the 52!52! possibilities.

None of these needs a pusher. Each is the same sentence: the system is found where the microstates are, and the microstates are overwhelmingly in the spread-out, mixed, high-WW macrostate. That’s the counting argument, and it’s the load-bearing wall under everything else you’ll learn here.

When to reach for it

Pull out microstate-counting whenever something disperses, mixes, equalises, or “runs down” on its own and you want to know why — without hand-waving about forces or fate. The move is always the same three steps:

  1. Name the macrostates. What are the coarse, measurable categories? (Which side is the gas on? How many heads? How is the energy split?)
  2. Count the ways. Which macrostate is realised by dramatically more microstates? Reach for W=(Nk)W = \binom{N}{k} whenever components independently pick between two options.
  3. Bet on the big count. The system will be found in the high-WW macrostate, and the bigger NN is, the more certain that bet becomes.

It’s a startlingly general lens: it explains why heat flows from hot to cold, why perfumes fill rooms, why ordered systems need constant maintenance, why a database tends toward corruption without error-correction, and why “un-mixing” always costs work. Anywhere a system has many interchangeable parts that shuffle at random, the high-multiplicity macrostate wins — not by force, but by sheer weight of numbers.

Success:

Key takeaways

  • A macrostate is the big-picture, measurable description (temperature, “3 heads out of 4,” “gas fills the box”); a microstate is one exact arrangement of every component. Many microstates blur down to the same macrostate.
  • The multiplicity WW is the number of microstates consistent with a macrostate. For components that each pick between two options, W=(Nk)W = \binom{N}{k}.
  • Tidy macrostates have tiny WW (all-heads, all-on-the-left: W=1W = 1); spread-out, mixed macrostates have enormous WW (the even split is the peak). Since a randomly shuffling system visits equally-likely microstates, it’s found in the highest-WW macrostate — not by force, but by counting.
  • Boltzmann: S=klnWS = k \ln W. The log tames astronomically large counts and turns the multiplying multiplicities of independent parts into adding entropies — the compounding link (WAWBSA+SBW_A W_B \Rightarrow S_A + S_B).
  • Bigger NN, sharper law: relative fluctuations shrink like 1/N1/\sqrt{N}, so macroscopic systems are essentially always glued to maximum entropy. That’s the seed of irreversibility and the arrow of time (next lesson).
  • Misconception to kill: entropy is not eyeball-messiness. It’s a count of microstates belonging to a macrostate. A single microstate has no entropy of its own, and a specific “shuffled” order is exactly as rare as the sorted one — there are just vastly more orders wearing the “shuffled” label.

Next up: with counting in hand, we turn it into time’s arrow — why you can spot a film running backwards in an instant, why the past was lower-entropy, and why “you can’t un-break an egg” is the second law wearing yet another costume.

Mark lesson as complete