Physics
Universitystatistical-mechanics

Microstates, Macrostates, and Entropy

Why gas never spontaneously crowds into a corner of the room, even though nothing in Newton's laws forbids it — entropy is what counts the overwhelming odds against it.

Before this, you should know:

Every molecule of air in the room around you is obeying Newton's laws exactly, instant to instant. Those laws don't care about direction of time — reverse every velocity in a valid trajectory, and you get another perfectly valid trajectory, running backward. And yet you have never once walked into a room and found all the air molecules spontaneously crammed into one corner, leaving you gasping in a vacuum on the other side. Nothing in the underlying mechanics forbids it. It has simply never, in the history of the universe, happened by accident.

That's strange enough to deserve an explanation, not just a shrug. Why does a gas always spread out to fill a room, and never un-spread itself? Why does a hot cup of coffee always cool toward room temperature, and a room-temperature cup never spontaneously heats itself up while the room around it cools? These questions are the doorway into one of the deepest and most useful ideas in all of physics, and the surprising thing about the answer is that it isn't really about forces at all. It's about counting.

Microstate versus macrostate

Take the simplest version of "spread out versus crowded together": NN identical gas molecules in a box, mentally divided into a left half and a right half. Two different levels of description are available, and keeping them distinct is the whole key to everything that follows.

A microstate is the complete, exhaustive specification: which specific molecule sits in which specific position with which specific velocity, for every one of the NN molecules. It's more information than any human observer could ever measure or track.

A macrostate is the coarse description an observer actually cares about: how many molecules are in the left half versus the right half — nothing about which molecules, just the count. "12 molecules on the left, 8 on the right" is one macrostate. It says nothing about which 12.

Here is the fact that makes this distinction earn its keep: an enormous number of different microstates all correspond to the exact same macrostate. Swap any two molecules between two positions that are both already in the left half, and the microstate has changed (a different molecule now sits at a different point) while the macrostate has not (it's still "12 on the left"). The question that decides everything is: how many microstates correspond to each macrostate — and that number, it turns out, is wildly different from one macrostate to the next.

Counting microstates: the binomial coefficient reappears

This counting problem is exactly the one solved by the binomial distribution from probability and statistics. Treat each molecule as an independent coin flip: "heads" means it happens to be in the left half, "tails" means the right half. The number of distinct ways to choose which nn of the NN molecules end up on the left (with the rest on the right) is the binomial coefficient:

Ω(n)=(Nn)=N!n!(Nn)!\Omega(n) = \binom{N}{n} = \frac{N!}{n!(N-n)!}

Ω(n)\Omega(n) is the number of microstates corresponding to the macrostate "nn molecules on the left, NnN-n on the right." A gas molecule doesn't know or care which half it's "supposed" to be in — by symmetry, every individual microstate (every specific assignment of positions to molecules) is exactly as mechanically likely as every other one. That is the one new physical assumption this topic adds, and it's worth stating plainly, because everything else follows from it: every microstate consistent with the physics is equally probable. Given that, the probability of observing a particular macrostate is just proportional to how many microstates realize it — a macrostate with more microstates is simply more probable, for the mundane reason that there are more ways to roll it.

Now ask: which value of nn has the largest Ω(n)\Omega(n)? By the ordinary symmetry of the binomial coefficient, (Nn)\binom{N}{n} is maximized at n=N/2n=N/2 — the even split. And crucially, this maximum isn't just a little bit bigger than its neighbors; for large NN, the central limit theorem tells us the binomial distribution is extremely well approximated by a Gaussian sharply peaked at n=N/2n=N/2, with a width that grows only like N\sqrt N while the peak height grows like 2N2^N. The peak gets relatively narrower and narrower, in comparison to the full range of possible nn, as NN grows — and real gases have N1023N\sim10^{23}.

Left panel: three small grids of dots, each showing a different specific arrangement of the same six particles into a box split by a vertical line into left and right halves, all three arrangements having exactly three particles on each side, labeled as three different microstates of one macrostate. Right panel: a sharply peaked bell-shaped curve of the number of microstates Omega versus the number of particles on the left n, peaked at n equals N over 2, with the peak shaded purple and the far edge at n equals N shaded amber and labeled as overwhelmingly less likely.

Many microstates, one macrostate — and some macrostates have vastly more microstates than others. The even split isn't forbidden to leave; it's simply outnumbered by an astronomical margin.

Entropy: turning a count into a useful number

Ω(n)\Omega(n) itself is an unwieldy quantity — factorials of 102310^{23} are not numbers anyone wants to write down or multiply together. Boltzmann's decisive move was to take its logarithm, and define the entropy of a macrostate as:

S=kBlnΩS = k_B \ln\Omega

with kBk_B the same Boltzmann constant from the ideal gas law. The logarithm isn't a cosmetic convenience — it's what makes entropy the right quantity to reason with. If you have two independent subsystems, with Ω1\Omega_1 microstates available to the first and Ω2\Omega_2 available to the second, the number of joint microstates of the combined system is Ω1Ω2\Omega_1\Omega_2 (every arrangement of the first system can be paired with every arrangement of the second). Entropies, unlike the raw counts, simply add:

Stotal=kBln(Ω1Ω2)=kBlnΩ1+kBlnΩ2=S1+S2S_{\text{total}} = k_B\ln(\Omega_1\Omega_2) = k_B\ln\Omega_1 + k_B\ln\Omega_2 = S_1 + S_2

That additivity is exactly the behavior we want from a physical quantity meant to describe an extended system built out of independent parts — and it's a property the raw count Ω\Omega conspicuously does not have on its own.

The statistical seed of the second law

Put the two pieces together and something remarkable falls out, well before anyone writes down a law of thermodynamics by that name. Every microstate is equally probable. The number of microstates is overwhelmingly concentrated in the macrostate near n=N/2n=N/2 — the "spread out evenly" configuration — for any gas with a realistic number of molecules. So if a gas somehow starts out in an atypical macrostate — say, crowded entirely into one half of the box — and is then simply left alone to collide and mix, its molecular motion will carry it, essentially certainly, through the vast reservoir of microstates corresponding to more probable, higher-entropy macrostates, and it will essentially never wander back.

Nothing here is a new force pushing molecules apart. Nothing forbids the reverse process by the underlying mechanics — a spontaneous return to the crowded corner is not impossible, only so staggeringly improbable, for N1023N\sim10^{23} particles, that "impossible" is indistinguishable from the truth in any universe with a finite age. That is the entire statistical content of what will later be named the second law of thermodynamics: entropy tends to increase, not because nature enforces it as a fundamental rule, but because the number of ways to be "spread out" so thoroughly swamps the number of ways to be "crowded" that the crowded state is never revisited by chance. This topic has derived the tendency; a later topic will give it its formal name.

Worked example

A box holds N=100N=100 distinguishable gas molecules, free to be on the left or right half with equal likelihood per molecule. Compute the entropy of the macrostate with an even 50/50 split, and compare it to the entropy of the macrostate with all 100 molecules on the left. (click to reveal the solution)

Setting up: the number of microstates for nn molecules on the left, out of N=100N=100, is Ω(n)=(100n)\Omega(n) = \binom{100}{n}.

All 100 on the left (n=100n=100): there is only one way to put every single molecule on the left — pick all of them, and there's no choice left to make:

Ω(100)=(100100)=1S(100)=kBln(1)=0\Omega(100) = \binom{100}{100} = 1 \quad\Longrightarrow\quad S(100) = k_B\ln(1) = 0

Even split (n=50n=50): this binomial coefficient is a standard tabulated value,

Ω(50)=(10050)1.0089×1029\Omega(50) = \binom{100}{50} \approx 1.0089\times10^{29}

so its entropy is:

S(50)=kBln(1.0089×1029)=kB(ln1.0089+29ln10)kB(0.0089+66.775)66.78kBS(50) = k_B\ln\left(1.0089\times10^{29}\right) = k_B\big(\ln 1.0089 + 29\ln 10\big) \approx k_B(0.0089+66.775) \approx 66.78\,k_B

Numerically, with kB=1.381×1023 J/Kk_B = 1.381\times10^{-23}\text{ J/K}:

S(50)66.78×1.381×1023 J/K9.22×1022 J/KS(50) \approx 66.78\times1.381\times10^{-23}\text{ J/K} \approx 9.22\times10^{-22}\text{ J/K}

Comparing the two macrostates: the entropy difference is

ΔS=S(50)S(100)9.22×1022 J/K\Delta S = S(50) - S(100) \approx 9.22\times10^{-22}\text{ J/K}

but the physically vivid number is the ratio of microstate counts, not the entropy difference itself:

Ω(50)Ω(100)=1.0089×102911.0089×1029\frac{\Omega(50)}{\Omega(100)} = \frac{1.0089\times10^{29}}{1} \approx 1.0089\times10^{29}

Interpreting the result: even for a modest N=100N=100 molecules — nowhere near a real gas's 1023\sim10^{23} — the even-split macrostate already has about 102910^{29} times as many microstates as the all-on-one-side macrostate. Since every microstate is equally likely, a system exploring its available microstates by ordinary molecular motion is about 102910^{29} times more likely to be found near the 50/50 split than crammed entirely to one side at any given instant. Scale NN up to a real gas, and this ratio becomes so large that "the gas spontaneously crowds into one corner" stops being merely unlikely and becomes something closer to a logical impossibility within the lifetime of the universe — not because physics forbids it, but because the odds are inconceivably against it.

Where this leads

We've found the statistical engine behind why matter organizes itself the way it does, using nothing but counting and one assumption — equal a priori probability for every microstate. Two threads now lead onward from here. First, the laws of thermodynamics will take this statistical tendency and place it formally alongside energy conservation as one of physics's most load-bearing principles. Second, and first in line, is a question this topic quietly sidestepped: we assumed every microstate of an isolated system is equally likely, but most real systems aren't isolated — they sit in contact with a much larger environment, exchanging energy with it constantly. What does the equal-probability assumption turn into once a system can trade energy with something else? That question is exactly where the next topic begins.