FREE ENERGIES AND MAXWELL'S DEMON
The demon was never free: erasing a memory costs entropy.
A demon at the door
In 1867, in a letter to his friend Peter Guthrie Tait, imagined a creature that would haunt physics for a century. Picture a gas-filled box divided in two by a wall with a tiny trapdoor. A "very observant and neat-fingered being" sits at the door. When a fast molecule approaches from the right, it opens the door and lets it through to the left; when a slow one approaches from the left, it lets it through to the right. Doing no work — the door is frictionless, the molecules do the moving — the being sorts fast from slow, hot from cold. One side warms, the other cools. A temperature difference appears from nothing, and the second law of thermodynamics, which forbids exactly this, seems to fail.
This is Maxwell's demon (the name is William Thomson's; Maxwell only ever called it "a finite being"). Maxwell's own point was modest — he meant to show that the second law is statistical, true for bulk matter but not enforced molecule by molecule. But the demon refused to die. For sixty years it stood as an unanswered challenge: if information about individual molecules could be had for free, the second law was in trouble. The resolution, when it came, did not patch a leak in the box. It revealed that information itself has a thermodynamic cost — and to see why, we first need the bookkeeping of free energy.
Four potentials, one shape
Energy alone does not tell you which way a process will go. What governs spontaneity is free energy — the portion of a system's energy actually available to do work once the unavoidable entropy tax is paid. There are four such bookkeeping quantities, and they are not four separate ideas but one idea wearing four hats, each cut for a different pair of held-fixed variables:
Internal energy is the raw total. Enthalpy adds the work needed to make room for the system — the right ledger when pressure is fixed. The Helmholtz free energy subtracts the heat the environment supplies for free — the right ledger at fixed temperature and volume. The Gibbs free energy does both, and rules the world of constant temperature and pressure where chemistry happens.
Gibbs free energy and the direction of chemistry
The Gibbs free energy earns its central place because almost everything — a reaction in a beaker, water freezing, a protein folding — happens at the fixed temperature and pressure of the open air. For such a process, the second law reduces to a single inequality:
Read it as a contest. is the heat released or absorbed; is the change in disorder; is the referee that decides how much the entropy term matters. A reaction proceeds if it lowers — either by releasing energy () or by increasing entropy (), or both. When the two compete, temperature breaks the tie: ice melts above C because there the entropy gain finally outweighs the energy cost of breaking the crystal. The crossover temperature is exactly .
This is the quantity a chemist actually tabulates. A negative means "go"; the magnitude sets how much work the reaction could in principle deliver. Free energy is the currency in which thermodynamics pays out.
The operation behind the four: Legendre transforms
Why exactly these four combinations, and not some other? The answer is a single mathematical operation, the Legendre transform. It is the same trick that turns the Lagrangian into the Hamiltonian in mechanics: a controlled way to swap a variable for its conjugate slope without losing any information.
The fundamental relation for internal energy is , which says is most naturally a function of entropy and volume . But is hard to control in a lab — you cannot dial an entropy. Temperature , its conjugate, you can. The Legendre transform performs the swap: differentiating gives , so is now a function of the controllable and . Add instead and you swap volume for pressure (); do both and you reach . The four potentials are simply and its three Legendre transforms — one geometric operation, applied to whichever variables your apparatus holds fixed.
Szilard's engine — information enters the ledger
In 1929, the Hungarian physicist stripped Maxwell's demon to its bones. Forget thousands of molecules; use just one. A single molecule rattles around a box at temperature . The demon measures which half it is in, then slides a partition into the middle. Now it knows the gas is on, say, the left — so it lets the molecule push the partition rightward as a piston, an isothermal expansion from half the box to the whole box. The work delivered is exactly
a tidy packet of energy drawn from the thermal bath, one molecule at a time. Repeat the cycle and you appear to convert heat into work indefinitely — a perpetual-motion machine of the second kind. Szilard's decisive move was to notice where the entropy went. The engine works only because the demon measured which side the molecule was on, and that one bit of information — left or right — is the loose end the whole paradox hangs on.
Landauer's principle closes the loop
For decades the cost was wrongly pinned on the act of measurement. The true answer came in 1961 from at IBM, who asked a sharper question: which logical operations are physically irreversible? His answer — Landauer's principle — is that computation can in principle be done for free, with one exception. Erasing a bit is irreversible: it maps two distinct states (0 and 1) onto one, and that loss of one bit of information must dump at least
of heat into the environment. The merging of two possibilities into one is the merging of two phase-space cells into one, and entropy must rise somewhere to compensate.
In 1982 drove the point home for the demon. A demon running many cycles must store each measurement somewhere; its memory is finite; to keep going it must eventually erase old records — and that erasure pays back, exactly, the the engine extracted. The demon's memory is the cold reservoir in disguise. The Landauer's principle turns the demon from a threat into a bookkeeping lesson: the work you gain by knowing is repaid in full when you forget.
Forward — the thermodynamics of computation
Landauer's resolution did more than save the second law; it founded a field. If erasing a bit costs , then every irreversible logic gate in every processor pays a thermodynamic toll, and the floor — about joules at room temperature — is the ultimate limit on the energy efficiency of computing. Real transistors today dissipate millions of times more, but the limit is real and has been measured directly in single-particle experiments since 2012. It also opened the door to reversible computing, which sidesteps the cost by never erasing, and underlies the energetics of quantum information.
The demon also closes a loop back through this module. Its appetite was for the partition function's free energy ; its defeat rests on the same entropy accounting that governs the arrow of time. And the packets it traded are themselves thermal fluctuations — the irreducible jitter we turn to next, in fluctuations and dissipation, where that randomness stops being a nuisance and becomes a signal.