Heat & Thermodynamics
Why does ice always melt and coffee always cool down? The universe has a direction.
▶ Run the interactive simulationHeat always flows from hot to cold - never backwards
Junior level — plain language, no maths
Leave a hot chocolate on the table and come back later: it has gone cold. Now notice the thing that never happens - a cold drink doesn't suddenly heat itself back up by pulling warmth out of the room. Heat only ever travels one way, from hot to cold. That one-way street sounds obvious, but it turns out to be one of the deepest rules in all of physics.
Zoom in far enough and everything - the air, your hand, this screen - is a swarm of jiggling atoms. "Hot" just means they jiggle fast; "cold" means they jiggle slowly. When your warm cup meets the cooler air, the fast atoms bump into the slow ones and share their motion, like a crowd jostling until everyone moves at the same pace. The drink cools, the air warms a touch, and they settle in the middle. That settled, shared state has a name: equilibrium.
Behind the one-way street hides a single idea - entropy, roughly a measure of how spread-out and jumbled things are. Left alone, the world always drifts toward more jumble, never less. Your room gets messy on its own; it never tidies itself. A drop of ink uncurls through water and never gathers back into a drop. That relentless drift is why a perfect engine is impossible, why you remember the past but not the future, and - pushed to the limit - how the entire universe will slowly wind down. A cooling cup of coffee is the universe quietly showing you which way time runs.
Things worth knowing
- Ice absorbs heat while melting but stays at 0°C throughout - all that energy is breaking molecular bonds, not raising temperature.
- The coldest possible temperature is −273.15°C (absolute zero, 0 K). At this point, atoms have minimum possible motion - quantum mechanics prevents them fully stopping.
- Rockets work by thermodynamics: burning fuel creates extremely hot gas, which expands rapidly and exits at the back, generating thrust by Newton's 3rd law.
The Four Laws of Thermodynamics
Student level — the core equations
Four laws hold up the whole of thermodynamics, and between them they explain why engines waste fuel, why perpetual-motion machines are a fool's errand, and why time runs in only one direction. They were discovered out of order - which is why the first one is called the zeroth.
The Zeroth Law is the one nobody bothered to write down until they realised everyone had been quietly assuming it: if A is in thermal equilibrium with B, and B with C, then A and C agree too. That bland-sounding transitivity is what lets a thermometer mean anything at all - it's why a number on a glass tube can stand in for "how hot".
The First Law is energy accounting, nothing more: \(\Delta U = Q - W\). Whatever heat \(Q\) you pour in, minus the work \(W\) the system does on the outside world, is what stays behind as internal energy. Nothing is created or destroyed, only swapped - chemical into heat in an engine, chemical into electrical in a battery, nuclear into sunlight in a star. The books always balance.
The Second Law is the one with teeth: the entropy of an isolated system never falls. Every spontaneous change nudges it upward, and that upward drift is the arrow of time - a glass shatters but never reassembles. It also caps every engine ever built. Carnot showed that even a flawless one, shuttling heat between a hot reservoir at \(T_h\) and a cold one at \(T_c\), can do no better than \(\eta = 1 - T_c/T_h\). As long as \(T_c > 0\), perfect efficiency is simply off the table - not for lack of clever engineering, but because the universe forbids it.
The Third Law closes off the bottom of the scale: as \(T \to 0\), entropy settles onto a constant minimum (zero for a perfect crystal). A curious consequence is that absolute zero is unreachable - you can edge closer and closer, but every step buys you less, and you never quite arrive.
Key formulas
| First Law | \(\Delta U = Q - W\) | energy conservation |
|---|---|---|
| Entropy change | \(\Delta S = \dfrac{Q_{\text{rev}}}{T}\) | reversible process |
| Ideal gas law | \(PV = nRT\) | R = 8.314 J·mol⁻¹·K⁻¹ |
| Carnot efficiency | \(\eta_{\max} = 1 - \dfrac{T_c}{T_h}\) | |
| Boltzmann constant | \(k_B = 1.381\times10^{-23}\ \text{J·K}^{-1}\) | |
Things worth knowing
- A car engine is typically only 25–35% efficient. The rest of the fuel's chemical energy is wasted as heat - a direct consequence of the 2nd law.
- A refrigerator moves heat from cold (inside) to hot (room) - this requires external work (electricity), consistent with the 2nd law.
- The Sun converts ~4 million tonnes of mass to energy per second via E = mc². It's been doing this for 4.6 billion years and has fuel for another ~5 billion.
Statistical Mechanics: from microstates to the entropy of black holes
Scholar level — full mathematical depth
01Microstates, macrostates and the statistical postulate
Thermodynamics looks like a science of steam engines and gas laws, but underneath it is really applied probability. Everything follows from one deceptively modest assumption - the fundamental postulate: an isolated system in equilibrium is equally likely to be found in any of its accessible microstates. Count those microstates and you have done the physics. If \(\Omega(E,V,N)\) is the number of microscopic arrangements consistent with the macroscopic energy, volume and particle number, then Boltzmann's \(S = k_B \ln \Omega\) is the entropy - not a hand-wavy "disorder", but the logarithm of a count. Temperature, pressure and chemical potential are simply how that count reacts when you nudge \(E\), \(V\) or \(N\): \(\tfrac{1}{T} = \left(\tfrac{\partial S}{\partial E}\right)_{V,N}\), and so on. Why does a gas spread to fill its box? Not because anything pushes the molecules apart, but because the spread-out arrangements outnumber the tidy ones so absurdly that you would wait around \(10^{10^{23}}\) years to catch every molecule huddled in one corner. Equilibrium is not a force law. It is the house always winning.
02The canonical ensemble and the partition function
Real systems are rarely isolated; they sit in contact with surroundings at some temperature \(T\). Hand the energy bookkeeping to a heat bath and maximise the entropy \(S = -k_B \sum_i P_i \ln P_i\) at fixed average energy, and the probabilities drop out as Boltzmann weights, \(P_i = e^{-\beta E_i}/Z\) with \(\beta = 1/k_B T\). The normaliser \(Z = \sum_i e^{-\beta E_i}\) - the partition function - looks like a humble sum, yet it quietly holds all the thermodynamics. Differentiate its logarithm and the rest tumbles out: \(U = -\partial_\beta \ln Z\), the free energy \(F = -k_B T \ln Z\), the entropy \(S = -\partial F/\partial T\), the pressure, the heat capacity. Let particles come and go as well and you graduate to the grand canonical ensemble, where a fugacity \(z = e^{\beta\mu}\) keeps the books. The reassuring part: once \(N\) is large, the choice of ensemble stops mattering - they all agree - so you pick whichever makes the algebra kindest.
03Potentials, Legendre transforms and Maxwell relations
Internal energy is the natural potential when you control entropy and volume - but who controls entropy in a laboratory? In practice you fix temperature, or pressure, or both, and each choice calls for its own potential. The bridge between them is the Legendre transform, which swaps a variable for its conjugate slope: Helmholtz \(F = U - TS\) at fixed \(T\), enthalpy \(H = U + PV\) at fixed \(P\), Gibbs \(G = U - TS + PV\) for both, the grand potential \(\Omega = F - \mu N\) when particle number floats. Whichever you pick, equilibrium minimises it. And because these potentials are well-behaved functions, the order of mixed second derivatives cannot matter - that single fact hands you the Maxwell relations, such as \(\left(\tfrac{\partial S}{\partial V}\right)_T = \left(\tfrac{\partial P}{\partial T}\right)_V\), trading something you cannot measure for something you can. Demand that the potentials curve the right way and stability follows: positive heat capacities, positive compressibilities.
04Fluctuations and the fluctuation–dissipation theorem
Averages are only half the story; statistical mechanics also tells you how much things jitter. A system in a heat bath does not hold a fixed energy - it fluctuates, and the size of the fluctuation is pinned to a quantity you already know: \(\langle \Delta E^2 \rangle = k_B T^2 C_V\). Watch the scaling. The relative wobble shrinks like \(1/\sqrt{N}\), which is why a cup of coffee has a perfectly sharp temperature while a single protein does not. This bridge from a spontaneous fluctuation to a measurable response is the first hint of the fluctuation–dissipation theorem: poke a system gently and its reaction is dictated by the noise it already makes at rest. Einstein found the cleanest case in 1905 - \(D = \mu\, k_B T\), tying diffusion to drag - and Perrin turned it into a weighing scale, pinning down Avogadro's number by watching grains stagger through water.
05Irreversibility: the H-theorem and its paradoxes
Here is the puzzle that nearly broke Boltzmann. His H-theorem shows a quantity \(H = \int f \ln f \, d^3v\) sliding only downhill as a gas relaxes - which is just entropy climbing, the Second Law wrung out of collisions. Beautiful, except those collisions obey Newton's laws, and Newton's laws run equally well in reverse. Flip every velocity and entropy should fall (Loschmidt's objection); wait long enough and Poincaré guarantees the gas very nearly returns to its starting huddle (Zermelo's). Both objections are correct, and both miss the point. The arrow of time does not live in the dynamics; it lives in the bookkeeping. Boltzmann's derivation quietly assumes molecules are uncorrelated before a collision but not after - the Stosszahlansatz - and that is where the asymmetry sneaks in. The recurrences are real, but they take of order \(e^{N}\) ages, dwarfing the lifetime of the universe. In the end the arrow traces back to one brute fact: the universe began in a staggeringly low-entropy state, and we have been sliding downhill ever since.
06Quantum statistics and the failure of the classical picture
Classical counting collapses the moment particles become genuinely identical, because "particle 1 here, particle 2 there" can no longer be told apart from its own swap. Quantum mechanics then splits the world into two tribes. Bosons are gregarious: \(\langle n \rangle = \dfrac{1}{e^{\beta(\varepsilon-\mu)} - 1}\) lets any number pile into one state, and when they do you get superfluids, lasers and Bose–Einstein condensates. Fermions are loners: \(\langle n \rangle = \dfrac{1}{e^{\beta(\varepsilon-\mu)} + 1}\) caps each state at one, and that stubborn refusal to be squeezed - degeneracy pressure - is what holds a white dwarf up against its own gravity. Both melt back into the familiar Maxwell–Boltzmann curve when the gas is hot and thin. The same quantum count rescued physics from the ultraviolet catastrophe: treat each radiation mode classically and equipartition awards it \(\tfrac{1}{2}k_B T\), summing to an infinitely bright fire. Planck's guess that energy comes in lumps, \(E = n\hbar\omega\), starves the high-frequency modes, tames the spectrum, and - almost by accident - opened the quantum century.
07Phase transitions, criticality and the renormalization group
Boil water and something mathematically violent happens: the free energy develops a kink. Sharp phase transitions exist only in the limit of infinitely many particles, where they appear as non-analyticities. Near a continuous transition the system forgets its own size, and quantities diverge as power laws set by a few critical exponents. The shock, understood only in the 1960s and 70s, is that those exponents are universal: a magnet dying at its Curie point, a fluid at its critical point, and an alloy unmixing all share the same numbers - sensitive to dimensionality and symmetry, but blind to every microscopic detail. Kadanoff and Wilson explained why with the renormalization group: zoom out, average over the small stuff, repeat, and watch the system flow toward a fixed point that washes away the irrelevant and keeps only what matters. It won Wilson the 1982 Nobel and quietly reorganised how physicists think, from superconductors to quantum field theory.
08Frontiers: work theorems, information and gravity
For a century the Second Law looked like a one-way street with no shortcuts; then came the surprises. The Jarzynski equality \(\langle e^{-\beta W} \rangle = e^{-\beta \Delta F}\) and its sharper cousin, the Crooks theorem, say that if you drag a system out of equilibrium as roughly as you like and average the right way over many attempts, you recover the equilibrium free-energy difference exactly - now a standard trick for reading folding energies off single molecules stretched with optical tweezers. Landauer's principle finally caught Maxwell's demon: the demon seems to cheat the Second Law until you remember it must eventually erase its memory, and erasing one bit costs at least \(k_B T \ln 2\) of heat. Thermodynamics and information turn out to be the same subject in different clothes. The strangest twist is gravitational. A black hole carries an entropy \(S = \dfrac{k_B c^3 A}{4 G \hbar}\) fixed by the area of its horizon, not the volume within, and glows at the Hawking temperature \(T = \dfrac{\hbar c^3}{8\pi G k_B M}\). That entropy should live on a surface is the seed of the holographic principle - and very likely a clue to whatever theory finally weds gravity to the quantum.
Key formulas
| Boltzmann entropy | \(S = k_B \ln \Omega\) | |
|---|---|---|
| Temperature | \(\dfrac{1}{T} = \left(\dfrac{\partial S}{\partial E}\right)_{V,N}\) | |
| Boltzmann weights | \(P_i = \dfrac{e^{-\beta E_i}}{Z}, \quad \beta = \dfrac{1}{k_B T}\) | |
| Partition function | \(Z = \sum_i e^{-\beta E_i}\) | |
| Free energy | \(F = -k_B T \ln Z = U - TS\) | |
| Grand partition function | \(\Xi = \sum_N e^{\beta \mu N}\, Z_N\) | |
| Maxwell relation | \(\left(\dfrac{\partial S}{\partial V}\right)_T = \left(\dfrac{\partial P}{\partial T}\right)_V\) | |
| Energy fluctuations | \(\langle \Delta E^2 \rangle = k_B T^2 C_V\) | |
| Bose–Einstein | \(\langle n \rangle = \dfrac{1}{e^{\beta(\varepsilon-\mu)} - 1}\) | |
| Fermi–Dirac | \(\langle n \rangle = \dfrac{1}{e^{\beta(\varepsilon-\mu)} + 1}\) | |
| Jarzynski equality | \(\langle e^{-\beta W} \rangle = e^{-\beta \Delta F}\) | |
| Bekenstein–Hawking | \(S_{BH} = \dfrac{k_B c^3 A}{4 G \hbar}\) | |
Things worth knowing
- A black hole is the most entropic object known: a solar-mass black hole holds ~10⁷⁷ k_B of entropy - roughly 10²⁰× the thermodynamic entropy of the Sun. Almost all the entropy of the observable universe sits behind event horizons.
- The Jarzynski and Crooks theorems were verified by mechanically unfolding single RNA/DNA molecules with optical tweezers (Collin et al., Nature 2005), recovering equilibrium free energies from irreversible pulls.
- Systems with a bounded energy spectrum (nuclear spins, cold atoms in optical lattices) can reach negative absolute temperature - hotter than infinity, since heat always flows from them into any T > 0 system (Braun et al., Science 2013).