Physics
Universitystatistical-mechanics

The Laws of Thermodynamics

Four laws that sound like bureaucratic rules but are actually energy conservation and a counting argument wearing formal dress — and why no one will ever build a perfect engine.

Before this, you should know:

For centuries, inventors have tried to build a machine that runs forever without fuel, or an engine that turns heat into work with nothing wasted. Every single attempt has failed — not from bad engineering, but because the universe itself won't allow it. That's a strange thing to be able to say with total confidence about a machine nobody has even designed yet. How can physics rule out an entire category of invention in advance, sight unseen?

It can, because two of the deepest facts in all of physics are already fully in hand from earlier in this track: energy is conserved, and entropy overwhelmingly tends to increase. The laws of thermodynamics are what happens when those two facts get stated formally, applied specifically to heat and work, and given names.

The zeroth law: what makes a thermometer meaningful

Stated first historically because it was needed to make sense of the others, even though it was formalized last: if system AA is in thermal equilibrium with system BB, and BB is in thermal equilibrium with system CC, then AA and CC are in thermal equilibrium with each other.

This sounds almost too obvious to bother stating, but it's exactly what makes a thermometer work at all. When a thermometer reaches equilibrium with your body, and that same thermometer previously reached equilibrium with a calibration bath at a known temperature, the zeroth law is what licenses you to say your body and the bath now share the same temperature — without ever placing your body and the bath in direct contact. Temperature is only a well-defined, comparable, transitive property because this law holds.

The first law: energy bookkeeping, nothing more

The change in a system's internal energy equals the heat added to it minus the work it does:

ΔU=QW\Delta U = Q - W

This is not a new physical principle bolted onto mechanics. It is the exact same conservation of energy from work and energy, generalized to include heat as another way energy can move into or out of a system. That earlier topic tracked mechanical energy — kinetic energy of visible, bulk motion, plus potential energy. Here, UU, the internal energy, additionally counts the energy locked up in the invisible, microscopic jostling of a system's own molecules — precisely the average kinetic energy per molecule identified in kinetic theory, 32kBT\frac32 k_BT per molecule for an ideal gas, summed over every molecule in the system. Heat, QQ, is simply energy moving between systems by virtue of a temperature difference, molecule-to-molecule, rather than by an organized push over a distance. Work, WW, is energy moving by exactly the organized, force-times-distance mechanism already defined in work and energy — most often, for a gas, the work done by expanding against an external pressure.

The first law says: track every joule. If a system's internal energy goes up, that energy came from somewhere — heat flowing in, work done on it, or some combination — and if it goes down, that energy went somewhere else. Nothing is created, and nothing vanishes. It's the same bookkeeping principle from three topics ago, wearing a thermodynamic label.

The second law: the arrow of time, formalized

The total entropy of an isolated system never decreases. Equivalently: heat never flows spontaneously from a colder body to a hotter one; no engine operating in a cycle can convert heat into work with perfect efficiency, no exceptions.

Here is the point this entire topic exists to make unmistakably clear: the second law is not a separate physical principle, discovered independently and then bolted onto the first three laws for symmetry. It is exactly, precisely, the statistical argument already carried out in full in microstates and entropy — restated as a formal law because it turned out to be important enough to deserve one. Recall what was actually shown there: every microstate of an isolated system is equally likely, and the number of microstates corresponding to "spread out and disordered" configurations vastly, astronomically outnumbers the microstates corresponding to "concentrated and ordered" ones, for any macroscopic number of particles. A system left alone will overwhelmingly be found evolving toward the macrostate with more microstates — toward higher entropy — not because some new law forces it to, but because that's simply where the available options overwhelmingly lie. "Entropy tends to increase" and "there are vastly more ways to be disordered than ordered" are the same sentence, said twice.

That reframing has real teeth. It means a decrease in entropy isn't forbidden the way energy non-conservation is forbidden — it's merely so improbable, for any system with a realistic number of particles, that it will not be observed to happen spontaneously within the lifetime of the universe. This is also exactly why heat engines can never be perfectly efficient: converting heat entirely into work, with nothing left over, would mean extracting energy from a hot reservoir without depositing any disordered, low-grade energy anywhere else — a net decrease in the universe's entropy, which the statistical argument says essentially never happens.

The third law: the bottom of the ladder

As temperature approaches absolute zero, the entropy of a system approaches a constant, usually taken to be zero.

This one also translates directly into the counting picture. At T=0T=0, a system settles into its single, lowest-energy configuration — recall the quantum harmonic oscillator's ground state 0|0\rangle from earlier in this curriculum's quantum track, the one state a system can't be pushed below. If that ground state is unique, there is exactly one microstate available, Ω=1\Omega=1, and Boltzmann's formula gives S=kBln(1)=0S = k_B\ln(1) = 0 immediately. The third law is also why absolute zero can never actually be reached in a finite number of physical steps: each step of cooling relies on entropy differences to extract more energy, and as T0T\to0 those differences themselves shrink to zero, so the process runs out of leverage before it ever quite arrives.

Left panel: a schematic heat engine, with an arrow labeled Q-h flowing down from a hot reservoir at temperature T-h into a central engine box, an arrow labeled W flowing out to the right as useful work, and a smaller arrow labeled Q-c flowing down out of the engine into a cold reservoir at temperature T-c. Right panel: two vertical bars comparing entropy given to the cold reservoir against entropy taken from the hot reservoir, with the cold-reservoir bar taller, illustrating that total entropy increases.

Every real heat engine keeps only part of the heat it absorbs as useful work, dumping the rest into a colder reservoir — and the entropy that heat carries away always exceeds the entropy it arrived with.

Worked example

A heat engine absorbs Qh=800 JQ_h=800\text{ J} from a hot reservoir at Th=600 KT_h=600\text{ K} each cycle and expels Qc=500 JQ_c=500\text{ J} to a cold reservoir at Tc=300 KT_c=300\text{ K}. Find the work done per cycle, the engine's efficiency, and check that the second law is respected. (click to reveal the solution)

Setting up: an engine running in a full cycle returns to its exact starting state, so its internal energy is unchanged over one cycle: ΔU=0\Delta U = 0. The first law then reads 0=(QhQc)W0 = (Q_h - Q_c) - W, so the net heat absorbed equals the work done.

Work done per cycle:

W=QhQc=800 J500 J=300 JW = Q_h - Q_c = 800\text{ J} - 500\text{ J} = 300\text{ J}

Efficiency, defined as the useful work out divided by the heat paid for it:

η=WQh=300 J800 J=0.375=37.5%\eta = \frac{W}{Q_h} = \frac{300\text{ J}}{800\text{ J}} = 0.375 = 37.5\%

Maximum efficiency allowed by the second law, for any engine operating between reservoirs at ThT_h and TcT_c (the Carnot limit):

ηmax=1TcTh=1300600=0.5=50%\eta_{\max} = 1 - \frac{T_c}{T_h} = 1-\frac{300}{600} = 0.5 = 50\%

The actual engine, at 37.5%37.5\%, falls short of the 50%50\% ceiling — exactly as the second law demands; it could never exceed it.

Checking the entropy bookkeeping directly: the hot reservoir loses entropy as it gives up heat, ΔSh=Qh/Th\Delta S_h = -Q_h/T_h, while the cold reservoir gains entropy as it absorbs heat, ΔSc=+Qc/Tc\Delta S_c = +Q_c/T_c:

ΔSh=800600=1.333 J/K,ΔSc=+500300=+1.667 J/K\Delta S_h = -\frac{800}{600} = -1.333\text{ J/K}, \qquad \Delta S_c = +\frac{500}{300} = +1.667\text{ J/K}

Total entropy change of the universe over one cycle:

ΔStotal=ΔSh+ΔSc=1.333+1.667=+0.333 J/K\Delta S_{\text{total}} = \Delta S_h + \Delta S_c = -1.333+1.667 = +0.333\text{ J/K}

Interpreting the result: the total entropy increased, exactly as the second law requires for any real process. Had this engine somehow reached the Carnot efficiency of 50%50\%, it would have expelled only Qc=Qh(1ηmax)=800(0.5)=400 JQ_c = Q_h(1-\eta_{\max}) = 800(0.5)=400\text{ J}, giving ΔSc=400/300=1.333 J/K\Delta S_c = 400/300=1.333\text{ J/K} — exactly canceling ΔSh\Delta S_h, for a total change of precisely zero. That is what a perfectly reversible engine looks like: it pushes the universe's entropy right up to the edge of not increasing at all, but never past it, and never below it. Every real engine, with its unavoidable friction and dissipation, does a little worse than that ideal edge — which is precisely why 37.5%<50%37.5\%<50\% here.

Where this leads

Four laws, and not one of them introduced a genuinely new physical mechanism: the zeroth law makes temperature well-defined, the first law is energy conservation from work and energy with heat added to the ledger, the second law is the statistical counting argument from microstates and entropy given a formal name, and the third law is what that same counting argument predicts as a system approaches its unique ground state. What remains is to build the practical machinery that lets you actually use these laws to predict what a system will do — not just track energy and entropy separately, but combine them into a single quantity engineered to be minimized under realistic laboratory conditions. That quantity is free energy, and it's exactly where the next topic begins.