H-Theorem and Approach to Equilibrium

We take from the SM10 article h-theorem (aq-sm-h-theorem) the gas-kinetic result it owns: that Boltzmann's functional H(t)=∫fln⁡f d3vH(t)=\int f\ln f\,\mathrm{d}^3v decreases monotonically under the Boltzmann transport equation, dH/dt≤0\mathrm{d}H/\mathrm{d}t\le0, with the decrease driven by the collision integral and the Stosszahlansatz (molecular chaos), zero only on the local Maxwell–Boltzmann distribution. That article, together with boltzmann-transport-equation, derives the streaming-plus-collision dynamics and the symmetrization proof. We do not re-derive them here. This article owns the stochastic-process face of the same physics: the H-theorem as monotonicity of relative entropy under Markov dynamics. For any master equation whose stationary distribution π\pi satisfies detailed balance, the Kullback–Leibler divergence D(p(t) ∥ π)=∑npnln⁡(pn/πn)D\big(p(t)\,\|\,\pi\big)=\sum_n p_n\ln(p_n/\pi_n) is a Lyapunov function: dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0, and D→0D\to0 as p→πp\to\pi. Boltzmann's gas HH is the special case where π\pi is the Maxwellian and D=H−HeqD=H-H_\text{eq}. This framing detaches the arrow of time from the details of two-body scattering and attaches it to a single, sharp mathematical fact — the convexity of xln⁡xx\ln x — that governs relaxation in chemical networks, population dynamics, Monte Carlo chains, and any coarse-grained description with a Markov generator. The reframing also clarifies the old paradoxes. The monotone quantity is a coarse-grained, statistical divergence, not the fine-grained Gibbs entropy of the full phase-space density, which Liouville's theorem keeps exactly constant. Loschmidt's reversibility objection and Zermelo's recurrence objection both attack the fine-grained level; the relative-entropy H-theorem lives one level up, where information about correlations has already been discarded. Irreversibility is the price of that discarding, made quantitative by D≥0D\ge0.

Key takeaways
  • The SM10 owner h-theorem proves dH/dt≤0\mathrm{d}H/\mathrm{d}t\le0 for the dilute gas; here we recall that result and lift it to a general statement about Markov dynamics.
  • For any master equation with a detailed-balanced stationary π\pi, the relative entropy D(p∥π)=∑npnln⁡(pn/πn)D(p\|\pi)=\sum_n p_n\ln(p_n/\pi_n) obeys dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0 and D≥0D\ge0 — a universal Lyapunov / H-functional.
  • The engine is the elementary convexity inequality (x−y)ln⁡(x/y)≥0(x-y)\ln(x/y)\ge0; detailed balance lets the master-equation rate be written as a manifest sum of such non-positive terms.
  • Boltzmann's H=−S/kB+constH=-S/k_B+\text{const} is the special case where π\pi is the Maxwellian; D=H−HeqD=H-H_\text{eq}, so gas relaxation and Markov relaxation are one theorem.
  • On a two-state chain D(t)D(t) decays as a single exponential set by the relaxation eigenvalue λ=−(k↑+k↓)\lambda=-(k_\uparrow+k_\downarrow); the arrow of time has an explicit rate.
  • The monotone object is coarse-grained: the fine-grained Gibbs entropy stays flat by Liouville, so the arrow of time needs a statistical (Markov / coarse-graining) input — the resolution of Loschmidt and Zermelo.
  • Key idea: the H-theorem is the statement that relative entropy to the stationary distribution can only shrink under detailed-balanced Markov dynamics; D(p∥π)D(p\|\pi) is the universal Lyapunov function that measures "distance to equilibrium," and Boltzmann's gas HH is one instance of it.
The core insight

The H-theorem is the statement that relative entropy to the stationary distribution can only shrink under detailed-balanced Markov dynamics: D(p(t)∥π)=∑npnln⁡(pn/πn)D\big(p(t)\|\pi\big)=\sum_n p_n\ln(p_n/\pi_n) satisfies dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0, is bounded below by zero, and vanishes only at p=πp=\pi. Boltzmann's gas HH is the special case π=\pi= Maxwellian. The arrow of time is convexity applied to a coarse-grained distribution — not a new force law.

Where this lives today

The relative-entropy H-theorem is the workhorse guarantee behind Markov-chain Monte Carlo: any sampler built to satisfy detailed balance with the target π\pi is certified to relax toward it because DD decreases, and the whole art of algorithm design — cluster moves, lifted/irreversible samplers, parallel tempering — is about making that guaranteed-but-slow descent faster. In machine learning the same divergence reappears as the KL term in variational inference and diffusion models, and its monotonicity under the "denoising" Markov chain is exactly this theorem. In nonequilibrium physics it underlies the "speed limits" and thermodynamic-uncertainty bounds that relate how fast a system can relax to how much entropy it must produce. The gas-kinetic origin, owned by the SM10 article, remains the historical root; the Markov framing is what made the theorem portable across physics, chemistry, biology, and statistics.

The physical picture

The gas picture is familiar and is owned by the SM10 article: a sharply peaked velocity distribution gets smeared by collisions toward the broad Maxwellian bell, and H=⟨ln⁡f⟩H=\langle\ln f\rangle slides downhill. The stochastic-process picture keeps the same downhill motion but replaces "collisions smear velocities" with "transition rates shuffle probability among discrete states." Prepare a Markov chain in any initial distribution p(0)p(0); the dynamics leak probability toward the stationary π\pi, and the number D(p∥π)D(p\|\pi) — how distinguishable pp still is from π\pi — can only decrease. Relative entropy is the right ruler because it is a contraction under stochastic maps: pushing two distributions through the same noisy channel can never make them more distinguishable. Detailed balance guarantees the channel's fixed point is π\pi, so every distribution is dragged toward it and DD measures the shrinking gap.

Figure
Relative entropy D(p(t) ‖ π) falls monotonically to zero from any start — the discrete H-theorem; D ≥ 0, dD∕dt ≤ 0, zero only at p = π
time t → D( p(t) ‖ π ) 0 far start medium near start every initial p relaxes monotonically to π

The relative entropy D(p(t)∥π)D(p(t)\|\pi) falls monotonically to zero from any starting distribution — the discrete H-theorem. It never rises and never overshoots below zero; D=0D=0 only at p=πp=\pi.

The single most important figure is not the decay curve but a comparison that pins down why the H-theorem needs a statistical input. Split the description into a fine-grained level (full phase-space density, deterministic Liouville flow) and a coarse-grained level (the reduced/Markov distribution). The coarse-grained HH marches down; the fine-grained Gibbs entropy sits perfectly flat.

Figure
Punchline — coarse-grained S = −k H rises to equilibrium while the fine-grained Gibbs entropy stays FLAT (Liouville); the flat line is the outlier: monotone H needs coarse-graining, not new dynamics
time t → entropy fine-grained Gibbs entropy (Liouville: FLAT) coarse-grained S = −k H rises meet only at t → ∞ the outlier is the flat line

Punchline. The coarse-grained entropy S=−kBHS=-k_BH climbs to its equilibrium value, but the fine-grained Gibbs entropy of the full density is constant (Liouville's theorem, dSfine/dt=0\mathrm{d}S_\text{fine}/\mathrm{d}t=0). The flat line is the thesis outlier: irreversibility is manufactured by discarding correlations, not by the equations of motion.

The core equations

The relative entropy (Kullback–Leibler divergence) between the running distribution and the stationary one is the object that decreases. It is defined for two probability vectors on the same state space and is the discrete analogue of Boltzmann's HH measured from equilibrium.

D(p ∥ π)=∑npn ln⁡pnπn  ≥  0(1)D\big(p\,\|\,\pi\big)=\sum_n p_n\,\ln\frac{p_n}{\pi_n}\;\ge\;0 \qquad (1)

where: pnp_n — probability of state nn at time tt; πn\pi_n — stationary distribution of the Markov generator; the sum runs over all states. The non-negativity is Gibbs' inequality, with equality iff p=πp=\pi: DD is a bona fide "distance to equilibrium," though not a metric. The dynamics are a master equation. We adopt the convention that wnmw_{nm} is the rate of jumps from mm to nn, so probability flows into nn at rate ∑mwnmpm\sum_m w_{nm}p_m and out at rate ∑mwmnpn\sum_m w_{mn}p_n.

dpndt=∑m(wnmpm−wmnpn)(2)\frac{\mathrm{d}p_n}{\mathrm{d}t}=\sum_m\big(w_{nm}p_m-w_{mn}p_n\big) \qquad (2)

where: wnm≥0w_{nm}\ge0 — transition rate m→nm\to n; the diagonal is fixed by conservation ∑nwnm=0\sum_n w_{nm}=0 if one folds the escape rate in, or equivalently each state's outflow balances its rate sum. Probability is conserved: ∑ndpn/dt=0\sum_n \mathrm{d}p_n/\mathrm{d}t=0. Detailed balance is the condition that closes the H-theorem. It states that in the stationary state every individual transition is balanced by its reverse, not merely the net flow into each state.

wnm πm=wmn πn(3)w_{nm}\,\pi_m=w_{mn}\,\pi_n \qquad (3)

where: the product of forward rate and source-state stationary weight equals that of the reverse. Equation (3) is strictly stronger than stationarity; it forbids circulating probability currents and is exactly the condition under which DD is monotone. The central result of this article is that (2) with (3) drives (1) downhill. We state it as the master-equation H-theorem, whose gas-kinetic counterpart is owned by the SM10 article h-theorem.

ddt D(p(t) ∥ π)  ≤  0,D→0 as p→π(4)\frac{\mathrm{d}}{\mathrm{d}t}\,D\big(p(t)\,\|\,\pi\big)\;\le\;0,\qquad D\to0\ \text{as}\ p\to\pi \qquad (4)

where: the divergence to the stationary distribution can only shrink. Equation (4) contains Boltzmann's dH/dt≤0\mathrm{d}H/\mathrm{d}t\le0 as the special case in which the states are velocity cells and π\pi is the Maxwellian. The link to Boltzmann's functional is a shift by a constant. Because D=∑npnln⁡pn−∑npnln⁡πnD=\sum_n p_n\ln p_n-\sum_n p_n\ln\pi_n, and −∑pnln⁡pn=S/kB-\sum p_n\ln p_n=S/k_B is the Gibbs entropy, DD differs from −H=S/kB-H=S/k_B only by the π\pi-dependent term.

D(p ∥ π)=(H−Heq)+Δ,H=∑npnln⁡pn(5)D\big(p\,\|\,\pi\big)=\big(H-H_\text{eq}\big)+\Delta,\qquad H=\sum_n p_n\ln p_n \qquad (5)

where: HH — Boltzmann's functional in its discrete form; HeqH_\text{eq} — its equilibrium value; Δ\Delta collects the cross term ∑n(pn−πn)ln⁡πn\sum_n(p_n-\pi_n)\ln\pi_n, which vanishes when π\pi is uniform (microcanonical) so that DD and HH move together exactly.

Derivation ARelative entropy is a Lyapunov function for detailed-balanced Markov dynamics

The goal is to prove Equation (4): that under the master equation (2) with a stationary distribution satisfying detailed balance (3), the Kullback–Leibler divergence D(p∥π)D(p\|\pi) decreases monotonically in time. The strategy is to differentiate DD, use probability conservation to kill the additive constant, re-express the rate using detailed balance so that it becomes symmetric in the ratio variables rn=pn/πnr_n=p_n/\pi_n, and finally invoke the elementary inequality (x−y)ln⁡(x/y)≥0(x-y)\ln(x/y)\ge0 to certify that every term in the sum is non-positive. This mirrors the symmetrization the SM10 gas H-theorem performs over collision partners, but the algebra is purely linear and needs no scattering kernel.

Step 1. Differentiate D=∑npnln⁡(pn/πn)D=\sum_n p_n\ln(p_n/\pi_n). Since πn\pi_n is time-independent, dD/dt=∑np˙n[ln⁡(pn/πn)+1]\mathrm{d}D/\mathrm{d}t=\sum_n\dot p_n\big[\ln(p_n/\pi_n)+1\big]. The +1+1 multiplies ∑np˙n=0\sum_n\dot p_n=0 and drops out, leaving dD/dt=∑np˙nln⁡(pn/πn)\mathrm{d}D/\mathrm{d}t=\sum_n\dot p_n\ln(p_n/\pi_n). Why the +1+1 vanishes: probability conservation, ∑np˙n=0\sum_n\dot p_n=0, is the discrete analogue of particle-number conservation that removes the constant term from Boltzmann's dH/dt\mathrm{d}H/\mathrm{d}t.

Step 2. Insert the master equation and write rn≡pn/πnr_n\equiv p_n/\pi_n. Using pm=rmπmp_m=r_m\pi_m and detailed balance wnmπm=wmnπn≡Ωnm=Ωmnw_{nm}\pi_m=w_{mn}\pi_n\equiv\Omega_{nm}=\Omega_{mn}, the flow term becomes p˙n=∑mΩnm(rm−rn)\dot p_n=\sum_m\Omega_{nm}(r_m-r_n), where Ωnm≥0\Omega_{nm}\ge0 is symmetric. Then dD/dt=∑n,mΩnm(rm−rn)ln⁡rn\mathrm{d}D/\mathrm{d}t=\sum_{n,m}\Omega_{nm}(r_m-r_n)\ln r_n. Why detailed balance is essential: it is exactly what makes the weight Ωnm=wnmπm\Omega_{nm}=w_{nm}\pi_m symmetric under n↔mn\leftrightarrow m. Without (3) there is a residual antisymmetric piece — a circulating current — and DD need not be monotone.

Step 3. Symmetrize the double sum by averaging the (n,m)(n,m) and (m,n)(m,n) labelings. Because Ωnm\Omega_{nm} is symmetric, ∑n,mΩnm(rm−rn)ln⁡rn=12∑n,mΩnm(rm−rn)(ln⁡rn−ln⁡rm)\sum_{n,m}\Omega_{nm}(r_m-r_n)\ln r_n=\tfrac12\sum_{n,m}\Omega_{nm}(r_m-r_n)(\ln r_n-\ln r_m).

Step 4. Apply the inequality. With x=rn, y=rmx=r_n,\,y=r_m, the factor (rm−rn)(ln⁡rn−ln⁡rm)=−(rn−rm)ln⁡(rn/rm)≤0(r_m-r_n)(\ln r_n-\ln r_m)=-(r_n-r_m)\ln(r_n/r_m)\le0 by (x−y)ln⁡(x/y)≥0(x-y)\ln(x/y)\ge0. Since Ωnm≥0\Omega_{nm}\ge0, every term is non-positive and dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0. Equality requires rn=rmr_n=r_m for all connected pairs, i.e. p∝πp\propto\pi, hence p=πp=\pi. Why this is the same theorem as the gas case: replace discrete states by velocity cells and π\pi by the Maxwellian, and the symmetric weight Ω\Omega becomes the collision kernel — the SM10 owner's −14∫(f1′f2′−f1f2)ln⁡(f1′f2′/f1f2)-\tfrac14\int(f_1'f_2'-f_1f_2)\ln(f_1'f_2'/f_1f_2) is the continuum image of this sum. *Verified symbolically and numerically in verify_aq-sm-h-theorem-sm11.py: the two-state and three-state chains give dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0 at all sampled times, and the analytic two-state decay rate matches.*

Go deeper · Derivation B · 1 minThe two-state chain: an exactly solvable arrow of time
Derivation BThe two-state chain: an exactly solvable arrow of time

The goal is to make the abstract monotonicity concrete by solving the smallest nontrivial case in closed form, extracting the relaxation rate and showing D(t)D(t) decays as a single exponential-squared-scale quantity governed by one eigenvalue. A two-state chain with up-rate k↑k_\uparrow (state 0→10\to1) and down-rate k↓k_\downarrow (state 1→01\to0) has stationary distribution π1=k↑/(k↑+k↓)\pi_1=k_\uparrow/(k_\uparrow+k_\downarrow), π0=k↓/(k↑+k↓)\pi_0=k_\downarrow/(k_\uparrow+k_\downarrow), which satisfies detailed balance automatically (any two-state chain does). We solve the linear dynamics and feed the solution into DD.

Step 1. The occupation p1(t)p_1(t) obeys p˙1=k↑p0−k↓p1=k↑−(k↑+k↓)p1\dot p_1=k_\uparrow p_0-k_\downarrow p_1=k_\uparrow-(k_\uparrow+k_\downarrow)p_1, a linear ODE. Its solution is p1(t)=π1+(p1(0)−π1)e−λtp_1(t)=\pi_1+\big(p_1(0)-\pi_1\big)e^{-\lambda t} with the single relaxation rate λ=k↑+k↓\lambda=k_\uparrow+k_\downarrow; equivalently the nonzero eigenvalue of the generator is −λ-\lambda. Why one rate: a two-state generator has eigenvalues 00 (stationary) and −λ-\lambda; every observable relaxes with the same time constant 1/λ1/\lambda.

Step 2. Write the deviation δ(t)=p1(t)−π1=δ0e−λt\delta(t)=p_1(t)-\pi_1=\delta_0 e^{-\lambda t}. Then p0(t)−π0=−δ(t)p_0(t)-\pi_0=-\delta(t), since probabilities sum to one.

Step 3. Substitute into D=p0ln⁡(p0/π0)+p1ln⁡(p1/π1)D=p_0\ln(p_0/\pi_0)+p_1\ln(p_1/\pi_1). For small deviations, expand to second order: D(t)≈12δ(t)2(1/π0+1/π1)=δ022π0π1e−2λtD(t)\approx\tfrac12\delta(t)^2\big(1/\pi_0+1/\pi_1\big)=\tfrac{\delta_0^2}{2\pi_0\pi_1}e^{-2\lambda t}. So DD decays at twice the observable rate, 2λ2\lambda, and is manifestly non-negative and monotone. Why 2λ2\lambda: relative entropy is quadratic in the deviation near equilibrium (its Hessian is the Fisher information 1/πn1/\pi_n), so a deviation ∼e−λt\sim e^{-\lambda t} gives D∼e−2λtD\sim e^{-2\lambda t}.

Step 4. The exact D(t)D(t) (no expansion) is still monotone: dD/dt=δ˙ln⁡ ⁣p1π0p0π1\mathrm{d}D/\mathrm{d}t=\dot\delta\ln\!\frac{p_1\pi_0}{p_0\pi_1}, and δ˙\dot\delta and the log always carry opposite signs because p1>π1⇒p_1>\pi_1\Rightarrow net downward flow. Hence dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0 for all tt, not just near equilibrium. Verified in verify_aq-sm-h-theorem-sm11.py: λ=k↑+k↓\lambda=k_\uparrow+k_\downarrow, the e−2λte^{-2\lambda t} small-deviation scaling, and exact-D(t)D(t) monotonicity are all checked; the corresponding coarse-grained entropy S=−kBHS=-k_BH is confirmed to rise.

Limiting cases

CaseResultMeaning
Uniform stationary πn=1/Ω\pi_n=1/\Omega (microcanonical)D=H−ln⁡ΩD=H-\ln\Omega, Δ=0\Delta=0Relative entropy equals Boltzmann's HH up to a constant; the two H-theorems coincide exactly.
Two-state chainλ=k↑+k↓\lambda=k_\uparrow+k_\downarrow, D∼e−2λtD\sim e^{-2\lambda t}Single relaxation rate; the arrow of time has an explicit exponential clock.
Continuum velocity states, π=\pi= MaxwellianD→H−HeqD\to H-H_\text{eq}Recovers Boltzmann's gas H-theorem — owned by the SM10 article, recalled not re-derived here.
Broken detailed balance (NESS)dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0 still to the stationary π\pi, but π\pi carries currentsDD to the true NESS decreases, yet entropy production is nonzero — the relaxation and the dissipation are different questions.
Fine-grained Gibbs entropy (Liouville)dSfine/dt=0\mathrm{d}S_\text{fine}/\mathrm{d}t=0No H-theorem without coarse-graining; the monotone quantity is statistical, not mechanical.

Worked examples

Example 1 — A two-state ion channel: relaxation rate and monotone DD. A membrane channel gates between closed (00) and open (11) with opening rate k↑=200 s−1k_\uparrow=200\ \mathrm{s^{-1}} and closing rate k↓=800 s−1k_\downarrow=800\ \mathrm{s^{-1}}. It starts fully closed, p(0)=(1,0)p(0)=(1,0). Find the stationary open probability, the relaxation time, and confirm the relative entropy falls to zero.

Step 1. Stationary distribution: π1=k↑/(k↑+k↓)=200/1000=0.20\pi_1=k_\uparrow/(k_\uparrow+k_\downarrow)=200/1000=\mathbf{0.20} open, π0=0.80\pi_0=0.80 closed.

Step 2. Relaxation rate λ=k↑+k↓=1000 s−1\lambda=k_\uparrow+k_\downarrow=1000\ \mathrm{s^{-1}}, so the relaxation time is τ=1/λ=1.0 ms\tau=1/\lambda=\mathbf{1.0\ ms}. The open probability follows p1(t)=0.20(1−e−t/τ)p_1(t)=0.20\big(1-e^{-t/\tau}\big).

Step 3. Initial divergence: D(0)=p0ln⁡(p0/π0)+p1ln⁡(p1/π1)=1⋅ln⁡(1/0.8)+0=ln⁡1.25=0.2231 natsD(0)=p_0\ln(p_0/\pi_0)+p_1\ln(p_1/\pi_1)=1\cdot\ln(1/0.8)+0=\ln1.25=\mathbf{0.2231\ nats}.

Step 4. At t=τt=\tau, p1=0.20(1−e−1)=0.1264p_1=0.20(1-e^{-1})=0.1264, p0=0.8736p_0=0.8736; D(τ)=0.8736ln⁡(0.8736/0.8)+0.1264ln⁡(0.1264/0.2)=0.8736(0.0880)+0.1264(−0.4587)=0.0769−0.0580=0.0189 natsD(\tau)=0.8736\ln(0.8736/0.8)+0.1264\ln(0.1264/0.2)=0.8736(0.0880)+0.1264(-0.4587)=0.0769-0.0580=\mathbf{0.0189\ nats}. The divergence has fallen from 0.2230.223 to 0.0190.019, monotonically, as the H-theorem demands. It reaches 00 only as t→∞t\to\infty.

Example 2 — Three-state cycle with detailed balance: numeric monotonicity. Take states {A,B,C}\{A,B,C\} with symmetric-in-π\pi rates chosen so π=(0.5,0.3,0.2)\pi=(0.5,0.3,0.2) satisfies detailed balance: wBA=1, wAB=wBAπA/πB=1.667w_{BA}=1,\ w_{AB}=w_{BA}\pi_A/\pi_B=1.667; wCB=2, wBC=wCBπB/πC=3.0w_{CB}=2,\ w_{BC}=w_{CB}\pi_B/\pi_C=3.0; wCA=0.5, wAC=wCAπA/πC=1.25w_{CA}=0.5,\ w_{AC}=w_{CA}\pi_A/\pi_C=1.25 (all wnmw_{nm} = rate m→nm\to n). Start at p(0)=(1,0,0)p(0)=(1,0,0).

Step 1. Verify detailed balance holds pairwise: wABπB=1.667×0.3=0.5=wBAπA=1×0.5w_{AB}\pi_B=1.667\times0.3=0.5=w_{BA}\pi_A=1\times0.5. ✓ Similarly for B ⁣− ⁣CB\!-\!C and A ⁣− ⁣CA\!-\!C. There are no net cycle currents.

Step 2. Initial divergence D(0)=1⋅ln⁡(1/0.5)=ln⁡2=0.6931 natsD(0)=1\cdot\ln(1/0.5)=\ln2=\mathbf{0.6931\ nats}.

Step 3. Integrate the master equation numerically (RK4, dt=10−3\mathrm{d}t=10^{-3}). The divergence decreases at every step: DD passes through ≈0.28\approx0.28 at t=0.3t=0.3, ≈0.06\approx0.06 at t=1.0t=1.0, and →0\to0 as p→(0.5,0.3,0.2)p\to(0.5,0.3,0.2). The measured dD/dt\mathrm{d}D/\mathrm{d}t is negative at all sampled times, with maximum value −1.4×10−5-1.4\times10^{-5} (numerically ≤0\le0).

Step 4. The coarse-grained entropy S=−kB∑npnln⁡pnS=-k_B\sum_n p_n\ln p_n rises from S(0)=0S(0)=0 (a pure state) to its equilibrium value kB×1.0297k_B\times1.0297 nats, confirming dS/dt≥0\mathrm{d}S/\mathrm{d}t\ge0 exactly mirrors dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0 when π\pi is close to uniform. All numbers recomputed in the verify script.

Origins · 1 minarrow of time and how this was discovered
AO
arrow of time
thermodynamic concept, 19th c.–present · The directionality of macroscopic processes

The "arrow of time" names the puzzle the H-theorem addresses: microscopic laws are time-reversal symmetric, yet macroscopic relaxation runs one way. The phrase was coined by Arthur Eddington in 1927, but the physics is Boltzmann's — he identified entropy increase, via HH, as the mechanical seat of temporal asymmetry. The modern resolution the relative-entropy H-theorem makes precise is that the arrow is not in the equations of motion but in the coarse-graining: once correlations are discarded (the Stosszahlansatz for gases, the Markov property for stochastic dynamics), D(p∥π)D(p\|\pi) can only shrink. The fine-grained description remains reversible; the arrow is emergent and statistical.

History
1872
— Boltzmann introduces the HH functional and proves dH/dt≤0\mathrm{d}H/\mathrm{d}t\le0 for a dilute gas
1876
— Loschmidt raises the reversibility objection (Umkehreinwand): reversing velocities should make HH rise
1877
— Boltzmann reframes entropy probabilistically, S=kBln⁡WS=k_B\ln W, clarifying the statistical meaning of the theorem
1896
— Zermelo raises the recurrence objection (Wiederkehreinwand) from Poincaré recurrence
1902
— Gibbs formulates the ensemble entropy −kB∫ρln⁡ρ-k_B\int\rho\ln\rho and notes its constancy under Liouville flow
1927
— Eddington coins the phrase "time's arrow" for the thermodynamic asymmetry
1951
— Kullback and Leibler define the relative-entropy divergence that generalizes HH (Ann. Math. Stat. 22, 79)
1971
— Schlögl and others recognize relative entropy as a Lyapunov function for master equations (Z. Phys. 243, 303)

Going further

References. Boltzmann, Lectures on Gas Theory (1896/1898; Dover trans. 1964) · van Kampen, Stochastic Processes in Physics and Chemistry, 3rd ed., Ch. V · Sethna, Statistical Mechanics: Entropy, Order Parameters, and Complexity, 2nd ed., Ch. 5 · Cover & Thomas, Elements of Information Theory, Ch. 2 (KL divergence, data-processing) · Schnakenberg, Rev. Mod. Phys. 48, 571 (1976) · Kardar, Statistical Physics of Particles, Ch. 3 (gas H-theorem, owned by the SM10 article)

Provenance. The gas-kinetic H-theorem (dH/dt≤0\mathrm{d}H/\mathrm{d}t\le0, symmetrization, Maxwellian fixed point) is derived and owned by the SM10 article h-theorem (aq-sm-h-theorem) and its companion boltzmann-transport-equation; it is recalled here by name, not re-derived. This article's structural result is the relative-entropy Lyapunov property for detailed-balanced master equations, standard in van Kampen Ch. V and Cover–Thomas. A verifier should: (1) reproduce the symmetrization in the derivation and the (x−y)ln⁡(x/y)≥0(x-y)\ln(x/y)\ge0 non-positivity; (2) check the two-state analytic rate λ=k↑+k↓\lambda=k_\uparrow+k_\downarrow and the e−2λte^{-2\lambda t} scaling of DD; (3) integrate the three-state detailed-balanced chain and confirm dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0 numerically. No nonstandard numerical constants are asserted.

Builds on: Detailed Balance and Microscopic Reversibility · The Master Equation · Markov Processes and the Markov Property Leads to: Fokker–Planck Equation · Metropolis–Hastings Algorithm · Molecular Dynamics Simulation

Is the relative-entropy H-theorem the same theorem as Boltzmann's, or a generalization?

It is a generalization that contains Boltzmann's as a special case. Boltzmann's H=∫fln⁡fH=\int f\ln f is defined for a gas evolving under the Boltzmann transport equation, and its decrease is owned by the SM10 article. The relative-entropy statement holds for any master equation with a detailed-balanced stationary distribution, whether or not it comes from two-body collisions. When you specialize the states to velocity cells and take π\pi to be the Maxwellian, D(p∥π)D(p\|\pi) becomes H−HeqH-H_\text{eq} and the two coincide. The value of the abstraction is that it applies to chemical reaction networks, epidemic models, and Monte Carlo chains with no collision integral in sight.

If the fine-grained entropy is constant, in what sense does entropy increase?

The Gibbs entropy Sfine=−kB∫ρln⁡ρS_\text{fine}=-k_B\int\rho\ln\rho of the full phase-space density is exactly conserved under Hamiltonian (Liouville) flow, because the flow just relabels phase-space points without compressing volume. Entropy "increases" only for a reduced description — after you integrate out correlations or project onto macroscopic observables. That coarse-grained entropy is −kBH-k_BH, and it rises. So the correct statement is: the entropy of our coarse description of the system increases, reflecting the information about microscopic correlations that we have deliberately discarded. Nothing about the microdynamics is irreversible.

What exactly goes wrong if detailed balance fails?

If the stationary distribution π\pi carries circulating probability currents (broken detailed balance, a nonequilibrium steady state), the weight wnmπmw_{nm}\pi_m is no longer symmetric, and the clean "sum of non-positive terms" argument breaks. Remarkably, the relative entropy to the true stationary π\pi still decreases monotonically for a broad class of such systems — relaxation to a NESS is still governed by DD. What changes is that the NESS itself produces entropy at a positive rate, a separate quantity (the Schnakenberg entropy production) that has nothing to do with the relaxation of DD. Relaxation and dissipation are distinct: D→0D\to0 measures approach to π\pi; entropy production measures how far π\pi is from equilibrium.

Why does relative entropy decay at twice the eigenvalue rate near equilibrium?

Near the stationary state, expand D(p∥π)D(p\|\pi) to second order in the deviation δn=pn−πn\delta_n=p_n-\pi_n. The linear term vanishes (because π\pi minimizes DD), and the quadratic term is 12∑nδn2/πn\tfrac12\sum_n\delta_n^2/\pi_n — the deviation weighted by the Fisher information 1/πn1/\pi_n. If the slowest eigenmode of the generator decays as δ∼e−λt\delta\sim e^{-\lambda t}, then D∼δ2∼e−2λtD\sim\delta^2\sim e^{-2\lambda t}. So relative entropy relaxes at twice the rate of any linear observable. This factor of two is generic and is why DD is often a more sensitive convergence diagnostic than a single observable.

How does this connect to Monte Carlo convergence in practice?

A Markov-chain Monte Carlo sampler is a master equation (or its discrete-time cousin) engineered so that its stationary distribution is the target π\pi you want to sample, and so that it satisfies detailed balance with π\pi (the Metropolis acceptance rule is built precisely for this). The H-theorem then guarantees the sampler's distribution converges to π\pi: DD decreases to zero. The catch is the rate: the relaxation is set by the spectral gap of the generator, which can be tiny near a phase transition (critical slowing down). Cluster algorithms and other tricks attack the gap, not the guarantee — the H-theorem promises arrival, not speed.

Can DD ever increase, even briefly, along the way?

No — under a genuine detailed-balanced master equation, dD/dt≤0\mathrm{d}D/\mathrm{d}t\le0 at every instant, not just on average or asymptotically. This is stronger than the second law, which in some formulations only constrains net changes between equilibrium endpoints. The instantaneous monotonicity follows because the derivation bounds the rate termwise: each pair (n,m)(n,m) contributes a non-positive amount. If you ever measure DD rising, either the reference π\pi is not the true stationary distribution, detailed balance is broken, or there is a numerical/integration error. Genuine monotonicity is a strict diagnostic.

Does coarse-graining choice affect which H-theorem you get?

Yes, and this is subtle. Different coarse-grainings (different projections onto macroscopic variables, or different lumpings of microstates) give different reduced dynamics, and the reduced dynamics is only exactly Markovian for special choices. When the reduction is Markovian with a detailed-balanced stationary distribution, you get a clean H-theorem for that level's DD. When it is not — when memory effects (non-Markovian corrections) matter — the reduced HH can transiently rise, and one needs the full generalized master equation. The relative-entropy monotonicity is a property of Markov generators; its applicability rests on the reduction actually being (approximately) Markovian at the timescales of interest.

Before this

Where this leads