Physics
Thermodynamics
The laws governing energy, entropy, and why time only flows in one direction.
Why Does Heat Flow Downhill?
Put a hot cup of coffee on your desk. Walk away. Come back in an hour. The coffee is cold. You already knew that was going to happen. But here is a weird thing: every single physical law governing the molecules in that cup is perfectly symmetric in time. Run the equations backwards, and they still hold. Nothing in the microscopic physics prefers one direction of time over another.
So why does the coffee always cool down and never spontaneously heat back up? The answer is thermodynamics — specifically, the second law. It is perhaps the most asymmetric, one-way, irreversible-feeling law in all of physics, and it emerges entirely from counting.
Thermodynamics was originally developed in the 1800s to understand steam engines — before anyone had a solid idea about atoms. People noticed four remarkably general principles that seemed to govern all heat and energy processes. They numbered them the zeroth through the third law, because the zeroth one was discovered after the others but turned out to be more fundamental.
The Four Laws
┌────────────────────────────────────────────────────────────┐ │ 0th │ A ↔ C and B ↔ C ⟹ A ↔ B (Temperature exists) │ │ 1st │ dU = δQ − δW (Energy is conserved) │ │ 2nd │ dS ≥ δQ/T (Entropy never decreases) │ │ 3rd │ S → 0 as T → 0 (Absolute zero is a limit) │ └────────────────────────────────────────────────────────────┘
The four laws — a compact summary
The zeroth law sounds almost trivially obvious — if two things are each in thermal equilibrium with a third thing, they are in equilibrium with each other. But this logical transitivity is what justifies the entire concept of a temperature scale. Without it, "temperature" would mean nothing.
The first law is energy conservation, dressed up for thermodynamics. The internal energy of a system changes only when heat flows in or work flows out. Energy is never created or destroyed.
First Law
The second law is the one people argue about. Clausius put it this way: "Heat never passes spontaneously from a colder body to a warmer one." Kelvin put it another way: "No process is possible whose sole result is to convert heat entirely into work." Both statements are equivalent, and both are saying the same thing — entropy increases.
Second Law
Entropy: The Most Misunderstood Quantity in Physics
Entropy is not disorder, despite what pop science articles say. Or rather — it is a very specific, mathematical kind of disorder. Boltzmann defined it as, where is the number of microstates corresponding to a given macrostate.
Here is the intuition. A gas expanding to fill a room has more entropy than the same gas compressed into a corner. Not because "spread out" is messier in some aesthetic sense, but because there are vastly more ways to arrange the molecules throughout the whole room than to arrange them all in the corner. The system is not being pushed toward any particular configuration — it just wanders, and the spread-out state is overwhelmingly more probable.
Thermodynamic Potentials and Free Energy
A crucial concept is free energy: the portion of a system's total energy that is actually available to do useful work. The rest is "locked up" in entropy — it is energy so thoroughly spread out among microscopic degrees of freedom that you cannot extract it without violating the second law.
Different experimental conditions call for different potentials. The Gibbs free energy is what matters when you run reactions at constant temperature and pressure — which is basically every chemistry lab and every living cell. A reaction is spontaneous if and only if .
Natural
Variables Potential Definition
───────── ───────── ──────────────────────
S, V, N U Internal Energy
T, V, N F = U − TS Helmholtz Free Energy
S, P, N H = U + PV Enthalpy
T, P, N G = U−TS+PV Gibbs Free Energy ← most useful in chemistry/biologyThermodynamic potentials — each suited to different natural variables
Gibbs Free Energy
Heat Engines and the Carnot Limit
In the 1820s, a French engineer named Sadi Carnot asked a deceptively simple question: what is the maximum efficiency a heat engine can possibly achieve? He was thinking about steam engines, but his answer turned out to be a universal limit on all energy conversion.
The answer depends only on the temperatures of the hot source and cold sink — nothing else. Not the working fluid, not the specific mechanism, not the engineering. Just two temperatures.
Carnot Efficiency
A power plant running between steam at 600 K and a river at 300 K cannot exceed 50% efficiency, no matter how well-engineered it is. This is not an engineering limitation. It is a law of the universe. Real engines are always less efficient than this because of friction, heat leakage, and other irreversibilities — each of which generates entropy and reduces the work available.
P
▲ 1 ──── 2
│ ╱ ╲ isothermal expansion at T_H
│ ╱ ╲
│ ╱ ╲ adiabatic expansion
│ 4 ╲
│ ╲ 3 ╱
│ ╲ ╱ isothermal compression at T_C
│ ╲ ╱
│ 4 ──── 3 adiabatic compression
└──────────────────▶ V
Net work = area enclosed by cycleThe Carnot cycle — the theoretical gold standard
Phase Transitions — When Systems Change Completely
Thermodynamics also describes the dramatic moments when matter changes its character entirely — from liquid to gas, from disordered to magnetically ordered, from normal conductor to superconductor. These are phase transitions.
First-order transitions (like boiling water) involve a latent heat — energy is absorbed or released at a fixed temperature without any change in temperature. Second-order transitions (like a material becoming magnetic) are stranger: there is no latent heat, but fluctuations and correlations diverge at the critical point, making the mathematics considerably more interesting.
Near a critical point, the details of the material stop mattering. A magnet, a liquid-gas system, and a superconductor all show the same mathematical behaviour — the same critical exponents — regardless of their microscopic differences. This universality is one of the most surprising and beautiful results in all of physics.