THIS EXPLANATION
THE ROOM
PHY·23 Physics 6 MIN · 8 STATIONS

Maxwell's demon

A Socratic walk-through of Maxwell's demon — reasoned out one step at a time, not lectured.

abcdefgh
a

The question we started with

THE QUESTION #

Why can no clever gatekeeper sort fast molecules from slow ones and get free work out of a room-temperature gas?

A room-temperature gas is full of usable energy. It simply has no difference in it, and an engine can only work between a hot side and a cold side. So Maxwell asked: put a partition down the middle with a tiny door, and station there a being small enough to see individual molecules. Let it open only for fast molecules going right and slow ones going left. One side heats, the other cools, and you have your engine — and the door can be as light as you like, so the sorting costs essentially nothing.

The uncomfortable part is that no step in that description is obviously illegal. Every molecule obeys ordinary mechanics; the demon breaks no law of motion. A companion piece in this collection argues that irreversibility is a matter of counting — overwhelmingly more microstates look mixed than look sorted. This is the sharper follow-up: what happens to that counting argument when the sorter knows which microstate it is in? Ignorance was doing the work. Does knowledge undo it?

b

Reasoning it through

REASONING #

Strip the puzzle to its smallest honest version, due to Szilard: a box holding a single molecule, in contact with a reservoir at temperature T. The demon sees which half the molecule is in, slides a frictionless piston into the middle, and lets the molecule push it outward from half the box back to the whole box.

How much work is that worth? For one molecule the ideal gas law gives p = kT/V, so the work is the integral of p d*V* from V/2 to V, which is kT ln 2. At room temperature: 1.38 × 10⁻²³ × 300 × 0.693 ≈ 2.9 × 10⁻²¹ joules, about 0.018 electronvolts. Tiny, but the sign is what matters. The molecule stayed at temperature T, so the energy came out of the reservoir as heat: its entropy fell by k ln 2, and the second law is violated by exactly that, once per cycle.

Notice what the demon bought. Before looking it knew only that the molecule was somewhere in the box; after looking, which half. One binary answer — one bit — converted into kT ln 2 of work. The exchange rate is no coincidence: the entropy of one bit's worth of uncertainty is k ln 2, so knowledge is being converted into work at par.

So where is the debt? The obvious place is the measurement — surely seeing the molecule costs something. That was the accepted answer for decades, and it turns out to be wrong: measurement can in principle be made reversible, since a process that merely correlates a memory bit with the molecule's position, run slowly, need dissipate no minimum amount.

Then ask whether the cycle has actually closed. The gas is back where it started; the piston is back where it started; the reservoir is a little colder. But the demon's memory now holds a bit it did not hold before, and after a second cycle it holds two. To make this an engine — something that repeats — the memory must be cleared, and clearing is where the trouble lives.

Ask what erasure is, physically. A bit can be 0 or 1; after erasure it is 0 whatever it was, so two distinct states have been mapped onto one. The memory's accessible states have halved, its entropy has fallen by k ln 2, and since entropy in a closed system cannot fall, that much must be pushed out into the surroundings as heat of at least kT ln 2. This is Landauer's principle — the same kT ln 2 the expansion produced. The ledger closes at zero not approximately but exactly, which is the sign that the two are the same quantity seen twice.

That gives the account a hard test. The claim is that the demon can win only for as long as it has blank memory. Build one with a finite, initially blank store of N bits and never erase. The prediction is not that it fails but that it succeeds — extracting up to about N kT ln 2 of work — then stops dead when the store is full, having converted a supply of order into a supply of energy at a fixed rate. A demon running indefinitely on a fixed finite memory in a closed cycle would refute this outright, as would a measured erasure reliably dissipating less than kT ln 2 per bit; experiments on single-particle and single-spin memories have instead found the dissipation pressing down toward that floor and not through it.

c

The analogy

THE ANALOGY #
THE FIGURE

Think of a hotel that seems to make money from nothing because it never charges for the room, only for the cleaning. The ledger looks like pure profit — until every room is occupied. The business was never running on its takings; it was consuming a stock of clean rooms, and the bill arrives the moment one has to be turned over.

WHERE IT BREAKS DOWN

the hotel could be handed fresh rooms from outside, whereas the demon's blank memory is itself a low-entropy resource that had to be manufactured somewhere at the same kT ln 2 per bit — so pushing the cost outside the box relocates it and never removes it.

d

Clarifying the model

THE MODEL #

The result is often stated as "information is physical", which invites a misreading. It does not mean knowing something is intrinsically expensive; acquiring the bit can be free. What is not free is forgetting it. The asymmetry is logical: measurement is a one-to-one map and can be undone, erasure is two-to-one and cannot, and only irreversible logical operations carry a thermodynamic price.

Second, a mechanical demon never gets this far. Smoluchowski showed that a spring-loaded trapdoor light enough to be pushed open by one molecule is itself in thermal contact with the gas, so it jitters open and shut at random and sorts nothing. Mechanical demons die of their own thermal noise; only an information-processing demon needs Landauer's argument at all.

Third, an honest caveat: this is the mainstream account and its central steps are experimentally supported, but the derivation of Landauer's bound from first principles has been contested at intervals, usually over exactly which states count as accessible. Nothing has displaced it, but it is not quite the settled arithmetic it looks like on the page.

e

A picture of it

THE PICTURE #
Maxwell's demon
Maxwell's demon Read top to bottom as one full cycle, with time running down each vertical lifeline. The upper half is the demon winning: a bit is written and the reservoir gives up kT ln 2 of heat as useful work. The lower half is the step the classic puzzle omits -- the reset the cycle needs in order to repeat -- and it returns exactly what the upper half took. The two notes on the Reservoir lifeline are the whole argument. {"generator":"mermaid-svg-renderer@3.2.1","source":"../Socrates/.diagram-cache/_src/maxwells-demon.md","sourceIndex":1,"sourceLine":4,"sourceHash":"18ca7bb9a5e36c51f4cae4e4c3e0935be4d23dddbd9e9314a557fd1ca6a4905e","diagramType":"sequence","layoutVariant":"source","repairedDuplicateIds":[],"motion":"entrance-with-reduced-motion-fallback","presentation":"editorial","attempt":1,"viewBox":{"x":0,"y":0,"width":1138,"height":820},"qa":{"passed":true,"findings":[]}} Reservoir 01 Memory 02 Demon 03 Gas 04 reservoir entropy has fallen by k ln 2 the ledger closes at zero which half is the molecule in one bit of answer write the bit insert the piston heat flows in at temperature T work delivered, kT ln 2 reset the bit to blank at least kT ln 2 dumped as heat
KINDSlifelineparticipantmessage

How to readRead top to bottom as one full cycle, with time running down each vertical lifeline. The upper half is the demon winning: a bit is written and the reservoir gives up kT ln 2 of heat as useful work. The lower half is the step the classic puzzle omits — the reset the cycle needs in order to repeat — and it returns exactly what the upper half took. The two notes on the Reservoir lifeline are the whole argument.

f

What became clearer

WHAT CLEARED #
WHAT CLEARED

The demon is not defeated by the impossibility of seeing molecules, nor by the cost of opening a door. It is defeated by bookkeeping. Sorting converts information into work at a fixed rate of kT ln 2 per bit, and a memory is a finite store of blankness that gets spent doing it. Anything calling itself an engine must return to its starting state, and the only step that restores a memory — erasure — costs precisely what the sorting earned. The second law survives here not as a statement about heat but as a statement about what it costs to forget.

g

Where to go next

ONWARD #
  • Why real computers dissipate many orders of magnitude more than the Landauer bound per operation, and what reversible computing would have to look like to approach it.
h

Key terms

TERMS #
TermWhat it means
Szilard enginea one-molecule box in which knowing which half the molecule occupies yields kT ln 2 of work.
Landauer's principleerasing one bit at temperature T must dissipate at least kT ln 2 of heat.
Logical irreversibilityan operation whose output does not determine its input, such as erasure; the class that carries a thermodynamic cost.

Every term the collection defines is gathered in the glossary.

Nearby on the shelf

4