Free Energy and Shannon Entropy
Neil D. Lawrence
2026-10-27
FW26, William Gates Building
This Session
No laptops; homework from Weeks 1–2 (Quiz 1 / Worksheet 1)
Heat as far as Joule before the break
Helmholtz \(F=U-TS\) on the board after the break (LO1)
Clausius after Helmholtz; Shannon / Jaynes / Wiener as a preview
No Quiz Today
Worksheet 1 and Quiz 1 are marked. Today we spend a few minutes on what the scripts showed, then finish Week 2.
Comments already sent by email;
Quiz 1: fifteen papers from people who had Week 1; mean \(8.2/10\)
Worksheet 1: thirteen scripts; mean \(12.2/15\)
As taught 27 October this block ran about twenty-four minutes, 10:06–10:32. That is the debrief. Then the heat story, not Week-2 carry-over.
Quiz 1: Where Marks Moved
Mean \(8.2/10\) . Two items accounted for most of the misses.
Demon versus gremlin: about three in five missed it
Energy as a machine-learning score: about half got this wrong
Entropy as limit versus probability as prescription: one in five
Gremlin, Not Demon
Maxwell’s demon sorts . Laplace’s gremlin is the admission that complete knowledge is not available in practice.
The demon is an intelligent mechanism at a trap door
The gremlin is not a mind in the box; it is a limit on what we can know
Shannon’s \(H\) , in an hour, is a calculus for that incomplete knowledge
Energy Is a Score
In machine learning, energy is a preference: lower is more probable.
\(p_i \propto e^{-\beta E_i}\) : the occupation from Week 1
Quadratic loss and cross-entropy are energy-like objectives
The word energy does not, by itself, buy you a heat bath
Worksheet 1: The Habit
Curiosity ran slightly ahead of skepticism. Reflection was where the conversation was least often turned back on itself.
Mean \(12.2/15\) ; the dialogues did the job
Strongest work expanded after the first thread, then challenged without collapsing the chat
Weaker work ratholed, or let the model agree and stop
The See-Saw
A direct challenge is often met by sycophancy: the model agrees, and the conversation has nowhere to go.
Concede the part you accept; then ask what follows
Admitting “this may be my misunderstanding” denies the model the chance to merely please
Grasshopper is not sycophantic … the models are.
Live: one sentence of see-saw, then the judo alternative. Do not quote a student. Gemini Flash came up in several scripts as shorter and more usable than a larger model; mention as a cohort observation, not a ranking of students.
Expand, Then Return
Once a thread is established, step back. Ten turns is enough to open a second front and still close.
Early precision is good; staying there for six turns is not
State the model’s point in your prompt, then ask the adjacent question
Smaller models sometimes left more to work with than verbose ones
Who Made Entropy Uncertainty?
Clausius did not. A question most chats approached and few quite landed.
Clausius: a thermodynamic accounting identity
Uncertainty as entropy is already in the statistical tradition — Boltzmann, Gibbs, then Wiener’s “ignorance”
Shannon’s footnote is Tolman, not the cocktail-party story
This slide is the hinge. Do not derive \(H\) here. Later in the hour we go back to heat, starting with Joseph Black, to see what Clausius was solving.
Worksheet 2 Is Already Out
Same habit, different claim: is Shannon’s \(H\) Boltzmann’s \(S\) , or an analogy?
Due 10:00 at the start of lecture 4 (3 November)
Open on the equivalence; then press sample space, discrete vs continuous, what \(p\) is over
Use the see-saw lesson: concede, then move. Do not rathole on the first definition.
One minute. Point at the course page rather than re-reading the brief. Then: finish Week 2.
The Story of the Lecture
Heat first. Information after Helmholtz.
Black \(\to\) Carnot \(\to\) Rumford \(\to\) air thermometer \(\to\) Kelvin \(\to\) Joule
Helmholtz on the board after the break; Clausius after Helmholtz
Shannon / Jaynes / Wiener as a preview; entropy game / MacKay next week
Joseph Black and Heat as a Quantity
Joseph Black
Joseph Black (1728–1799). Black was a physician and chemist at Glasgow, then Edinburgh. Stipple engraving by James Heath after Henry Raeburn, 1800 (Wellcome Collection / Wikimedia Commons, public domain).
This is the Worksheet 1 follow-up. Clausius was not doing uncertainty. He was doing heat. We start with the person who made heat measurable. Do not yet write \(\mathrm{d}Q/T\) . Portrait, dates, Glasgow then Edinburgh, Watt as a colleague. Then the stuck thermometer.
The Problem
Ice melts. The thermometer does not move.
Heat is entering the mixture
Temperature stays at the melting point until the ice is gone
If heat were temperature, that would be a contradiction
Heat Is Not Temperature
Temperature is the reading. Heat is what you add.
Mix two bodies of known mass and starting temperature; one final reading
Equal heat, equal mass: mercury rises more than water — different capacity
Ice melts with the thermometer stuck — heat can be hidden
Keep mechanism and maths apart. Mechanism: mix, or melt ice, or time a kettle. Maths: heat as an additive quantity independent of the thermometer. Capacity first, then latent. Students often still hear heat'' ashow hot’’.
The Ice Calorimeter
Black mixed and timed. This box weighs meltwater.
The calorimeter of Lavoisier and Laplace. Heat delivered is read as the mass of ice melted; the conversion factor is Black’s latent heat of fusion. Plate XI from Encyclopaedia Londinensis (1801–02), after H. Lascelles (Wikimedia Commons / Science History Institute, public domain).
Heat leaving the sample melts ice in the jacket
You weigh what melted — that is the heat
The conversion is Black’s latent heat of fusion
Be precise if someone asks who invented the calorimeter. Black made heat measurable. This apparatus is Lavoisier and Laplace, using Black’s latent heat of fusion as the scale. The picture is the mechanism: weigh what melted.
Latent Heat of Steam
A kettle on a steady fire. Time is the meter.
Clock the water from ice-cold to the boil; then clock it boiling dry
Boiling dry takes about four and a half times as long
That extra heat does not move the thermometer. Black calls it latent
Do not put \(810^\circ\mathrm{F}\) on the slide. That number is a quantity of heat in Black’s unit — the heat that would raise the same water by one Fahrenheit degree — not a temperature. The experiment is the kettle: time to the boil versus time to boil dry. Four and a half times as long, thermometer stuck. Watt and the modern figure live in the notes.
Sadi Carnot and the Fall of Heat
Sadi Carnot
Sadi Carnot (1796–1832), aged 17, in the uniform of the École Polytechnique. Portrait by Louis-Léopold Boilly, 1813 (Wikimedia Commons, public domain).
Military engineer, not a natural philosopher. Son of Lazare; Polytechnique; the book is 1824. Do not yet say second law or entropy. The question is engines.
Why Look at Heat Engines?
Steam already drives mills, mines, and looms. Nobody has a theory of it.
Watt’s engines are a British industrial fact
Engineers try higher pressure, and other fluids than steam
Carnot: is there a limit ? Does the choice of fluid matter?
The Réflexions
Title page of R.~H. Thurston’s 1890 English translation of Carnot’s 1824 Réflexions sur la puissance motrice du feu . The original was printed in Paris by Bachelier, at Carnot’s expense, in six hundred copies.
A Heat Engine Is a Mill
Caloric falls from hot to cold. The same caloric arrives at the bottom.
Carnot’s own figure of the mill (1824). The cylinder \(ab\) holds the working body; \(cd\) is the piston. Body \(A\) is the furnace, body \(B\) the refrigerator — two reservoirs of caloric at different temperatures. Caloric taken from \(A\) is given up to \(B\) . Vectorised from the plate in Réflexions sur la puissance motrice du feu (Wikimedia Commons, public domain).
Water mill: quantity of water, height of the fall; the same water arrives below
Heat engine: quantity of caloric, difference of temperature; the same caloric arrives in the condenser
Two reservoirs. Nothing is used up.
Point at \(A\) and \(B\) . Furnace and refrigerator. Same caloric in, same caloric out. The piston is the mill wheel, not heat being turned into something else. Do not mention Joule. Students may want to correct him. Hold that.
A Short Life
Carnot dies in the 1832 cholera epidemic, aged 36. The book almost vanishes with him.
Six hundred copies, paid for by the author, unread
Clapeyron recasts the argument in 1834
Stop. Do not derive \(\mathrm{d}Q/T\) . Next is Rumford’s cannon.
Count Rumford
Benjamin Thompson, Count Rumford (1753–1814). American-born, then in the service of the Elector of Bavaria. Portrait by Moritz Kellerhoven (Wikimedia Commons, public domain).
Flashback, not a new founding myth. Dates: 1798 paper, Munich arsenal. Do not say this killed caloric. Carnot still uses caloric in 1824.
The Cannon
A blunt borer, a brass cylinder, a box of water, horses turning the gun.
About \(18.8\,\mathrm{lb}\) of water, starting at \(60^\circ\mathrm{F}\)
The cylinder at about \(32\) turns a minute
After two hours and thirty minutes the water boils — with no fire
Rumford’s Apparatus
Rumford’s 1798 apparatus, as reprinted in The Complete Works of Count Rumford (1870). Fig.~2: the cannon in the boring machine, turned by the bar \(w\) . Fig.~3: the same cylinder in the water box that is brought to the boil.
Fig.~3 is the mechanism: blunt borer inside, water outside. The heat is not coming from the chips, and it does not run out.
Inexhaustible
Furnishing heat without limitation …
The chips do not lose a hidden store of caloric
The heat continues as long as the work continues
Rumford’s conclusion: heat is a mode of motion
Quote: inexhaustible, therefore not a substance. Motion, not a number. Joule will supply the number. Carnot never had to face this, because his question was a cycle, not friction.
Mercury, Ice, Steam, and Air
Fahrenheit and Celsius
Daniel Gabriel Fahrenheit (1686–1736) with a mercury thermometer. Anonymous engraving, 18th century (Wikimedia Commons, public domain). The instrument is mercury in glass; the scale is equal expansion of that mercury between two pins.
A degree is an equal expansion of mercury. Ice and steam are the pins.
Fahrenheit (1724): mercury; ice at \(32\) , steam at \(212\)
Celsius (1742): the same two pins, later numbered \(0\) and \(100\)
Neither scale is heat. Both are the expansion of one liquid
Hold up the mercury tube. Two pins, ice and steam. Fahrenheit or Celsius is only how you number the interval. Do not call this heat. Black already split those. Thomson is about to ask what a degree should be if it is not this expansion.
The Air Thermometer
Constant pressure : a sliding mercury index, open to the room; the volume of the trapped air is the reading. (b) Constant volume : a mercury manometer; the height \(h\) is the reading. Scheme by P. Peterlin (Wikimedia Commons, CC BY-SA 3.0). Thomson’s 1848 comparison is with (a).
The laboratory standard is air, not mercury. Pressure is held at the room’s.
Trap a mass of air behind mercury that is open to the atmosphere
Slide the thread, or lower the cistern, until the mercury surfaces are level
Volume is then the reading; ice and steam still pin \(0\) and \(100\)
This is the apparatus. Mercury open to the room, surfaces level, pressure of the trapped air equals the barometer. Volume is the degree. Ice \(0\) , steam \(100\) , same pins as Celsius. Still air. Kelvin’s question is: what is a degree if it is not this?
Thomson’s Scale from the Mill
William Thomson
William Thomson (1824–1907), later Lord Kelvin. Photograph from The World’s Work , 1902 (Wikimedia Commons, public domain) — half a century after the 1848 scale.
Call him Thomson. Glasgow, 1848, age 24. Do not call this the Kelvin scale. Do not mention Joule. Fahrenheit already exists. He is not moving ice and steam. He is saying what a degree is.
What a Degree Is
The pins are a century old. He is defining the degree .
Fahrenheit, Celsius, air: a degree is equal expansion of one substance
Thomson, aged 24: a degree is an equal fall of caloric — the same motive power from the same quantity of heat, anywhere on the scale
Ice remains \(0\) , steam remains \(100\) . He has not moved the pins. He has defined the rungs.
Why bother, if ice and steam are already marked? Because a mercury degree and an air degree are not the same mill-height. He is making the rungs equal. He is twenty-four. Caloric is still conserved.
An Absolute Thermometer
A degree is a height of fall of conserved heat. Ice is still \(0\) , steam still \(100\) .
Take a unit of heat from a body at \(T\) on this scale
Let it fall to a body at \(T-1\) ; the same unit arrives
A perfect mill in between always gives the same motive power, whatever \(T\) is
Is There a Bottom?
In 1848 the mill has no bottom. Infinite cold is infinitely far down.
Air already suggests a wall: its volume would vanish at about \(-273^\circ\)
That number is Gay-Lussac’s expansion, not Carnot’s mill
Thomson still pins \(0\) at ice; on his mill scale you can always fall one more equal degree
Do not sell 1848 as discovering \(0\,\mathrm{K}\) . The pins are already known. The air thermometer’s \(-273\) is vanishing volume. The mill still has no floor.
Heat Is Not Destroyed
He still thinks with Carnot. Heat is conserved. The mill turns because caloric falls .
A unit of heat that leaves the hot body arrives at the cold
Motive power is the mill, not heat being used up
``The conversion of heat into mechanical effect is probably impossible, certainly undiscovered’’
Read the quote. He is twenty-four. Caloric still falls. Do not bring in Joule. Next is the paddle wheel.
Joule and the Mechanical Equivalent
James Prescott Joule
James Prescott Joule (1818–1889). Seated portrait, later in life (Wikimedia Commons, public domain).
Brewer, Manchester, private lab. Not Carnot’s question. Do not start a Mayer priority fight; one sentence is enough. The paddle wheel is the mechanism.
The Paddle Wheel
Joule’s apparatus for the mechanical equivalent of heat. A falling weight turns a paddle in water; the work is known, the rise in temperature is measured. Engraving from Harper’s New Monthly Magazine , August 1869 (Wikimedia Commons, public domain).
Mechanism: falling weights, paddle, thermometer. Maths: work against heat, a ratio. Contrast with Carnot’s mill still in the students’ heads.
A Number
A definite amount of work makes a definite amount of heat.
1845, British Association at Cambridge: the paddle already gives an equivalent, still scattered
1850, Philosophical Transactions : \(772\) foot-pounds to raise \(1\,\mathrm{lb}\) of water by \(1^\circ\mathrm{F}\)
Modern, on the same scale: about \(778\) foot-pounds, or \(4.186\,\mathrm{J}\) per calorie
Cambridge 1845 is BAAS, not the Philosophical Society. Thomson’s scale is the CPS paper. The number is still 890, not 772.
Not Carnot’s Question
Joule is converting work into heat. He is not running a mill between two baths.
Carnot: maximum work from a fall of conserved caloric
Joule: how much work makes how much heat
Conservation of heat cannot be the general law if the paddle is right
Mill versus paddle, one more time. Then the contradiction. Do not derive \(\mathrm{d}Q/T\) .
The Contradiction
You cannot keep Carnot’s conserved heat and Joule’s equivalent as general laws.
If heat is conserved, none of it becomes work
If Joule is right, some of it does
What can be kept: a limit that depends only on the two temperatures
Clausius and \(\mathrm{d}Q/T\)
Rudolf Clausius
Rudolf Clausius (1822–1888). Photograph from the AIP Emilio Segrè Visual Archives, Lande Collection (Wikimedia Commons, CC0).
Portrait, 1850, two laws. Do not start with Boltzmann. The question is still engines: if heat is not conserved, what is the leftover identity?
Two Laws
Keep Joule’s equivalent. Keep Carnot’s limit. Drop conservation of heat.
First law: heat and work are interchangeable, at Joule’s rate
Second law: heat does not flow from cold to hot without a cost
A cycle cannot turn the heat of one bath entirely into work
The Ratio that Survives
After Joule, Carnot’s mill is a ratio of heats, not a conserved fluid.
Reversible engine: \(Q_h/T_h = Q_c/T_c\)
\(Q_h\) taken from the hot bath, \(Q_c\) delivered to the cold
Heat does not balance. Heat over temperature does
Put \(Q_h/T_h = Q_c/T_c\) on the board. Both \(Q\) s positive. The gap \(Q_h-Q_c\) is the work. The thing that matches is \(Q/T\) .
The Loop
A reversible cycle is a closed path. If it is reversible, the integral is zero.
\[\oint \frac{\mathrm{d}Q}{T} = 0 \qquad \text{(reversible cycle)}\]
Every reversible loop integrates to zero
So there is a state function \(S\) with \(\mathrm{d}S = \mathrm{d}Q_{\mathrm{rev}}/T\)
One display, then state function. Contrast \(\oint\mathrm{d}Q \neq 0\) (work) with \(\oint\mathrm{d}Q/T = 0\) (no leftover transformation). Next slide is the sentence they should leave with.
A Reversible Cycle Produces No Entropy
You return to the start. Nothing has been created.
The working substance: \(S\) is a state function, so \(\Delta S = 0\) around any cycle
The baths: the entropy that left the hot bath arrives at the cold bath
Universe: \(\Delta S = 0\) . A reversible cycle produces no entropy
Say the title sentence twice. System versus baths versus universe, in that order, slowly. Students will try to make \(S\) increase around a reversible cycle. Hold them to zero.
When the Cycle Is Irreversible
The working substance still comes home. The books do not.
Friction, a finite drop of temperature, a paddle in the mechanism
More heat is dumped to the cold bath than the reversible case
\(\displaystyle\oint \mathrm{d}Q/T < 0\) , and the entropy of the universe increases
The Name
Clausius names entropy, 1865. English translation of the memoir: \(\int \mathrm{d}Q/T = S-S_0\) , from Greek τροπή, transformation . He forms the word to sit beside energy .
Show the page. Transformation, not disorder, not uncertainty. Worksheet 1 payoff: this is what Clausius was measuring. Boltzmann’s count and Shannon’s \(H\) come later, and they reuse a functional form, not this operational meaning.
Not Uncertainty
Clausius’s \(S\) is the piece that fits the puzzle: heat divided by temperature.
Macroscopic: \(S\) from \(\mathrm{d}Q_{\mathrm{rev}}/T\) ; a reversible cycle produces none
Microscopic, later: Maxwell, Boltzmann, Gibbs count the same \(S\)
Information, later: Shannon, Jaynes reuse the functional form for a different job
Thomson Returns: The Scale After Joule
Thomson, 1851
The 1848 scale assumed conserved heat. After Joule that assumption is gone.
Clausius, 1850: two laws; Carnot’s ceiling without caloric conservation
Thomson, 1851: accepts Joule; heat is not a conserved fluid
What survives: a reversible engine still has a limit that depends only on the two temperatures
Call him Thomson still. 1851 is Joule and the second law, not 1848. The ratio scale with a bottom is 1854, with Joule. Do not linger on the later title Lord Kelvin — the papers are Thomson’s.
The Ratio, Not the Fall
In 1854 Thomson and Joule replace equal mill-degrees by a proportion of the two heats.
Reversible engine: \(\displaystyle\frac{Q_h}{T_h} = \frac{Q_c}{T_c}\)
The same identity Clausius wrote as \(\mathrm{d}S = \mathrm{d}Q_{\mathrm{rev}}/T\)
Absolute temperatures are now those for which this ratio holds
Now There Is a Bottom
Absolute zero is where a reversible engine would reject no heat.
\(T=0\) is \(Q_c=0\) for a perfect mill between \(T_h\) and the floor
The air thermometer’s \(-273^\circ\) was vanishing volume; this is vanishing rejected heat
Infinite cold is no longer infinitely far down the mill
1848: ice is zero, infinite cold at \(-\infty\) . 1854: \(T=0\) is \(Q_c=0\) . Do not linger on the later title Lord Kelvin — the paper is Thomson’s.
Molecules
James Clerk Maxwell (1831–1879), Ludwig Boltzmann (1844–1906), Josiah Willard Gibbs (1839–1903). After Clausius the account becomes statistical: components of velocity, then occupation of energy, then free energy.
Maxwell–Boltzmann: Components Versus Speed
Each Cartesian velocity component is Gaussian. Speed \(v=|\mathbf{v}|\) is not.
Component: \(f(v_x)=\sqrt{m/(2\pi kT)}\,e^{-mv_x^2/2kT}\)
Speed: integrate the isotropic 3D Gaussian over angles
Jacobian \(d^3v = v^2\,dv\,d\Omega\) supplies the \(v^2\) factor
First look, as taught: Maxwell–Boltzmann is a Gaussian in the velocities. Then: the histogram of one component is Gaussian; the histogram of speed peaks away from zero. Board the spherical shell volume briefly. Both statements are Maxwell–Boltzmann.
Same Physics, Different Variable
\[
f(v_x)=\sqrt{\tfrac{m}{2\pi kT}}\,e^{-mv_x^2/2kT}
\qquad\text{versus}\qquad
f(v)\propto v^2\,e^{-mv^2/2kT}
\]
The \(v^2\) is not an energy correction — it is geometry
Each component is the quadratic \(E=mv_x^2/2\) whose expectation we split next
The Gibbs–Boltzmann Distribution
Gibbs–Boltzmann Occupation
Same formula, three names: Boltzmann weights, Gibbs distribution, canonical ensemble.
\(p_i = e^{-\beta E_i}/Z\) , \(\quad Z(\beta)=\sum_j e^{-\beta E_j}\)
\(\beta=1/k_B T\) : coldness; \(T\) : bath temperature
\(\log Z\) is the cumulant generating function of the energy
Introduce and use, do not derive. Board the formula. MaxEnt with fixed mean energy recovers the same \(p_i\) .
Occupation of a two-state system as coldness increases. At low \(\beta\) both states are populated; at high \(\beta\) the ground state dominates.
Aside: Hopfield, Boltzmann Machines, Nobel 2024
The same energy-and-occupation grammar reappears in associative memory and early deep learning.
Hopfield (1982): fixed-weight energy; recall as settling
Boltzmann machine (1985): make those couplings learnable
Pairwise energy: \(E(\mathbf{s})=-\sum_i b_i s_i-\sum_{i<j}W_{ij}s_i s_j\)
Colour only. Nobel 2024 (Hopfield and Hinton) names the line. Do not divert into training algorithms or Landauer here.
Coldness and Temperature
\(T\) : the bath, the thermometer
\(\beta = 1/k_B T\) : coldness
Same occupation; entropy sits in a different place
Two Representations
\(T\) -first: \(F = U - TS\)
\(\beta\) -first: \(Z(\beta)\) , then \(U = -\partial_\beta\log Z\)
Week 5: \(\beta\) is the Lagrange multiplier
Free Energy Decomposition
From Occupation to Accounting
From Gibbs distribution to energy bookkeeping.
\(p(x)=e^{-\beta E(x)}/Z\)
Equilibrium: inner energy is an expectation , \(U=\left\langle E\right\rangle\)
Algebra then defines \(F\) and \(S\)
LO1. Board the occupation with \(Z\) , name Summe der Zustände, take the log, take the expectation. Watch the signs. Why the exponential: equilibrium. What \(\log Z\) is: available energy, the work you can get out. Do not invoke MaxEnt — that is week 5. The occupation is given; we are reading it.
Take the Logarithm
\[
\log p(x) = -\beta E(x) - \log Z
\]
Solve for the microscopic score: \(E(x)=-k_BT\log p(x)-k_BT\log Z\)
\(1/\beta=k_BT\) converts coldness back to the bath’s temperature
Equilibrium Identifies \(U\) with \(\left\langle E\right\rangle\)
\[
U \equiv \left\langle E\right\rangle = \sum_x p(x)\, E(x)
\]
\(E(x)\) is a score on configurations
\(U\) is what a calorimeter would call the energy of the system
The move is the ensemble: replace a number by an expectation
Name the Two Remaining Terms
\[
U = \underbrace{-k_BT\log Z}_{F} + T\underbrace{\bigl(-k_B\sum_x p(x)\log p(x)\bigr)}_{S}
\]
Helmholtz free energy: \(F=-k_BT\log Z\)
Boltzmann entropy: \(S=-k_B\sum_x p(x)\log p(x)=k_B H\)
Hence \(U=F+TS\) , or \(F=U-TS\)
Board \(F=U-TS\) and \(U=F+TS\) as the same equation. Helmholtz wrote \(A=U-TS\) (\(A\) for Arbeit ). We use \(F\) because week 5 needs \(A(\theta)\) for the log-partition.
Two Temperatures, One Identity
\(T\) -first: \(F=U-TS\) — energy, then entropy’s cut
\(\beta\) -first: \(F=-\beta^{-1}\log Z\) , then \(U=-\partial_\beta\log Z\)
Same numbers; week 5 makes \(\beta\) a Lagrange multiplier
Three-State Check
\(U\) , \(S\) , and \(F\) for the Worksheet 1 three-state system (\(k_B=1\) ). The dashed curve is \(-\log Z/\beta\) ; it sits on \(F\) , which is the identity just derived.
Prescription: \(p(x)=e^{-\beta E(x)}/Z\)
Accounting: \(F=U-TS\) with \(U=\left\langle E\right\rangle\)
As Taught: Helmholtz on the Board
Occupation to accounting, written by hand. Clausius slides come after.
\(p_i = e^{-\beta E_i}/Z\) ; \(Z\) is Summe der Zustände
Take the log; take the expectation; \(U\) splits into entropy and available energy
Maxwell’s demon, here, is a warning about crossing coarse-graining levels — Week 4 is the treatment
As taught: skip the MB / Gibbs decks and board Helmholtz after the break. Clausius slides after the questions. Demon / coarse-graining is a Week 4 preview. Do not open Szilard.
The Carnot Cycle on \(T\) -\(S\)
The Fall of Caloric
Carnot compared the motive power of heat to a waterfall. He did not know whether the work was proportional to the height.
Carnot’s own plate, 1824. Cylinder \(ab\) , piston \(cd\) , body \(A\) the furnace, body \(B\) the refrigerator. This is the mill as he drew it: not a waterwheel, a piston and two reservoirs. Vectorised from Réflexions sur la puissance motrice du feu (Wikimedia Commons, public domain).
Do not rush the \(100\) –to–\(50\) question. The square is waiting. He did not have entropy. Point at \(A\) and \(B\) : furnace and refrigerator. The piston is the mill wheel.
The Mill, Drawn as a Rectangle
Replace height by temperature and mass of water by entropy, and the mill is already a rectangle.
The same cycle twice. Left: a water mill on height against mass of water. Fill the bucket at the top, let it descend, empty it, return the empty bucket. The water is not consumed; the work is \(g\,\Delta h\,\Delta m\) . Right: a reversible heat engine on \(T\) against \(S\) . The conserved quantity in the reversible model is what we now call entropy. The vertical brace is Carnot’s fall — the difference between the reservoirs — not the downward stroke of the working body.
Height \(h\) \(\leftrightarrow\) temperature \(T\)
Mass of water \(\Delta m\) \(\leftrightarrow\) entropy transferred \(\Delta S\)
Fill at the top \(\leftrightarrow\) take in entropy at \(T_h\)
Loaded bucket descends \(\leftrightarrow\) isolated expansion (the working body cools; no heat transfer)
Empty at the bottom \(\leftrightarrow\) reject entropy at \(T_c\)
Empty bucket returns \(\leftrightarrow\) isolated compression
Work \(g\,\Delta h\,\Delta m\) \(\leftrightarrow\) work \(\Delta T\times\Delta S\)
Point at the vertical brace on both panels. That is Carnot’s fall. Easy mistake: taking the downward adiabat for the fall. The downward stroke lowers the temperature of the working substance without exchanging entropy. The fall is the difference between the reservoirs, across the whole cycle.
The Square
The ideal Carnot cycle on a \(T\) –\(S\) diagram is a square.
As taught 27 October, after Helmholtz, answering a question. Click through the legs as on the visualiser. Temperature up, entropy across. Clockwise is an engine.
Expansion at \(T_h\) : entropy increases, volume increases
Isolated cool: adiabatic expansion, entropy holds
Contraction at \(T_c\) : entropy comes back down (Watt’s condenser)
Isolated heat: adiabatic compression, the square closes
Work is the area: \(W=\Delta T\times\Delta S\)
The Fall Is Not the Downward Stroke
Carnot’s fall is the difference between the reservoirs. The downward adiabat is the working body cooling with no heat transfer.
Two annotations that are easy to conflate. The vertical brace is Carnot’s fall of caloric: entropy is taken in at \(T_h\) and given up at \(T_c\) . The right-hand leg is not that fall. It is an isolated expansion of the working body; no heat crosses, entropy holds, temperature drops.
One click. Brace versus right-hand leg. Then the \(160\) /\(40\) numbers if there is time: his example, our retrospective efficiency.
Four-Stroke, and the Smaller Loop
The four-stroke is the implementation. The square is the theory. Same \(\Delta T\) , same \(\Delta S\) : you cut two corners.
A real engine between the same reservoirs, with the same entropy swing, does not shrink the square. It still visits the top-right and the bottom-left. Heat is not taken in along the whole top, nor rejected along the whole bottom, so those two corners are cut off. The remaining area over the square is the efficiency.
Four-stroke is a courtesy to anyone who did engineering. Do not overfit the mapping. Do not shrink the square: that would be a different fall. Point at top-right and bottom-left. Same \(\Delta T\) , same \(\Delta S\) ; two corners cut. Land on: the square is the ceiling; the remaining area is what you actually get.
The \(p\) -\(V\) Chart
Engineers often draw the same strokes on a pressure-volume chart. In that case it no longer looks like a square.
The same Carnot cycle on a \(p\) -\(V\) diagram. The hot and cold legs follow isotherms \(pV=\mathrm{const}\) ; the isolated cool and isolated heat follow adiabats, which are steeper. The enclosed area is still the work, \(\oint p\,\mathrm{d}V\) , but you cannot read \(\Delta T\times\Delta S\) off it by eye.
One slide, in passing. Point at the isotherms. Then: this is why we drew \(T\) –\(S\) . Back to Clausius if this was the Helmholtz question.
Two Sides of the Same Coin
Welling’s Book, This Course
They named the book for \(F\) . We named the course for \(S\) . The hinge is \(U\) .
GAIST: A Tale of Free Energies — variational \(F\) , ELBO, work and heat
This course: entropy as the no-go; \(F\) as what remains after the cut \(TS\)
Fix the inner energy \(U=\left\langle E\right\rangle\) , and maximising \(S\) is minimising \(F\)
Hold up the identity. Welling’s textbook is the optional monograph on the reading list. Do not teach Chapter 5 today. The point is the coin: \(U=F+TS\) . We stay with entropy because that is the constraint. They stay with free energy because that is the objective you minimise in a generative model.
See also Friston
The same split, used as a theory of brains.
Friston: organisms minimise a variational free energy (Friston-free10? )
That functional is \(U[q]-T S[q]\) under a trial distribution \(q\)
Named here. Developed later, if at all. Our no-go remains \(S\)
Karl Friston, not a third thermodynamics. Students will hear ``free energy principle’’ and think it is a different \(F\) . It is the same algebra under a recognition density. If \(H\) is the more fundamental object, coldness is the more natural parameter. Sit down. Entropy game if there is time.
Preview: Shannon, Jaynes, Wiener
The same functional form, later, for a different job. We will try to push the jobs back together.
Shannon and Jaynes reuse the Helmholtz / Gibbs form
Shannon is discrete; Wiener is continuous
Wiener never drops the mechanism; Shannon, you just say it is a probability
Entropy game / MacKay: not reached on 27 October — next week
Preview. Do not derive Shannon’s axioms. Do not open the weighing-problem slides unless there are ten spare minutes, which there were not.
After Helmholtz: Not Reached
Define This Week
Heat thread: Black \(\to\) Carnot \(\to\) Rumford \(\to\) air thermometer \(\to\) Kelvin \(\to\) Joule
Helmholtz \(F=U-TS\) ; Clausius after; Welling reads \(F\) , we read \(S\)
Shannon / Jaynes / Wiener preview; entropy game / MacKay next week
After This Lecture
Next: class test (Quiz 2), then grouping, then the demon
Worksheet 2: \(H\) vs \(S\) — identity or metaphor?