UNIT 01 · ENTROPY: COUNTING THE WAYS

Maxwell's demon

13 min read

In 1867, James Clerk Maxwell devised a thought experiment aimed squarely at the second law's probabilistic foundations. Imagine a box of gas at uniform temperature, divided in two by a partition with a single small door, and a tiny, intelligent 'demon' stationed at the door who can see individual molecules coming and track their speeds. The demon operates the door to let only fast (hot) molecules pass from left to right, and only slow (cold) molecules pass from right to left, letting nothing else through. Given enough time, the demon sorts the gas into a hot side and a cold side — spontaneously creating a temperature difference, and therefore lowering the gas's total entropy — without doing any mechanical work on the molecules themselves (opening and closing a frictionless, massless door costs nothing, in the idealized setup). If the demon can really pull this off, the second law isn't a law at all, just a very good average that a sufficiently clever, sufficiently small observer can beat.

The resolution took over a century to nail down precisely, and it hinges on information. To sort molecules, the demon must first measure each one — determine whether it's fast or slow — and store that information somewhere, even if only in the demon's own memory, however small. Rolf Landauer showed in 1961 that the demon's real, unavoidable cost isn't in the sorting itself but in erasing that memory to make room for the next measurement: any process that erases one bit of information must, as a matter of thermodynamic law rather than engineering limitation, dissipate at least k_BT ln 2 of heat into the environment — Landauer's principle. Run the full cycle — measure, sort, and erase to reset the demon for its next molecule — and the entropy the demon exports while erasing its memory is always at least as large as the entropy it removed from the gas by sorting. The second law survives, but only once the demon's memory is counted as a genuine physical part of the system, not a free, entropy-less bookkeeping device outside the thermodynamic ledger. It's a striking result: information, an abstract-sounding quantity, turns out to have an unavoidable, quantitative thermodynamic cost — a link this course returns to properly in Unit 7.