---
title: The Second Law, Carnot Cycles, and Entropy
module: Thermodynamics
moduleNumber: 1
lessonNumber: 3
order: 103
summary: >
  The second law forbids the free conversion of heat into work. This lesson
  states the Kelvin and Clausius forms, proves them equivalent, and analyzes the
  Carnot cycle to get the efficiency bound $1-T_c/T_h$. Carnot's theorem makes
  that bound universal and defines the thermodynamic temperature scale. The
  Clausius inequality $\oint \delta Q/T\le 0$ then constructs entropy as a state
  function, $\d S=\delta Q_{\rm rev}/T$, whose non-decrease in isolated systems
  is the arrow of time.
topics: [Thermodynamics]
sources:
  - book: Schroeder
    ref: "Ch. 4 — Engines and Refrigerators; §4.1–4.3, and Ch. 3 — Interactions and Implications; §3.2 Entropy"
  - book: Reif
    ref: "Ch. 5 — Simple Applications of Macroscopic Thermodynamics; §5.1–5.11"
  - book: Kardar (Statistical Physics of Particles)
    ref: "Ch. 1 — Thermodynamics; §1.5–1.9"
  - book: Callen
    ref: "Ch. 4 — Reversible Processes and the Maximum Work Theorem; §4.1–4.5"
draft: false
---

The first law permits any process that conserves energy, including many that are
never observed: heat does not flow from cold to hot on its own, and a gas does
not spontaneously compress into a corner of its container. The second law is the
principle that selects, from among the energy-conserving processes, the ones that
actually occur. Historically it grew from the engineering question of how
efficiently heat can be turned into work; the answer, Carnot's bound, turns out
to encode a new state function, the entropy, whose behavior is the deepest of the
thermodynamic laws.

## The Kelvin and Clausius statements

The second law admits two classic phrasings, each a denial that a certain
too-good device can exist.

> **Kelvin–Planck statement.** No process has as its sole result the complete
> conversion of heat extracted from a single reservoir into work. A cyclic engine
> touching one temperature only cannot produce net work.

> **Clausius statement.** No process has as its sole result the transfer of heat
> from a colder to a hotter body. Heat does not flow up a temperature gradient
> without a compensating input.

Both forbid a **sole result**: the impossibility is of a cyclic device that
returns to its initial state and leaves nothing else changed. An engine can of
course turn heat into work in one stroke — an isothermal expansion does exactly
that — but not cyclically, because restoring the piston undoes the conversion.

The two statements are equivalent. Each can be built into a violation of the
other by coupling the hypothetical device to a Carnot engine.

> **Proof.** Suppose a Kelvin-violating engine $K$ exists, drawing heat $Q$ from a
> hot reservoir at $T_h$ and delivering work $W=Q$ with no other effect. Use that
> work to drive a refrigerator that moves heat $Q'$ from a cold reservoir at
> $T_c$ to the hot one, depositing $Q'+W$. The net effect of the pair, per cycle,
> is heat $Q'$ moved from cold to hot with no work input from outside — a
> Clausius violation. Conversely, suppose a Clausius-violating device moves heat
> $Q$ from cold to hot for free. Run an ordinary engine between the same
> reservoirs that draws $Q$ from the hot one, does work $W$, and rejects $Q-W$ to
> the cold one. The hot reservoir is left unchanged (it received $Q$ and gave up
> $Q$), so the pair extracts $Q-(Q-W)=W$ from the cold reservoir alone and turns
> it entirely into work — a Kelvin violation. Each device implies the other, so
> the two prohibitions stand or fall together.

$$
% caption: A heat engine draws $Q_h$ from the hot reservoir, delivers work $W$, and must reject $Q_c=Q_h-W$ to the cold reservoir; the second law forbids $Q_c=0$, so some heat is always dumped.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\draw[black,very thick,fill=black!8] (0,3.0) rectangle (5,3.9);
\node[black] at (2.5,3.45) {hot reservoir $T_h$};
\draw[black,very thick,fill=black!8] (0,-0.9) rectangle (5,0.0);
\node[black] at (2.5,-0.45) {cold reservoir $T_c$};
\draw[black,very thick,fill=black!5] (1.6,1.1) rectangle (3.4,2.0) node[midway]{engine};
\draw[->,black,very thick] (2.5,3.0)--(2.5,2.05) node[midway,right]{$Q_h$};
\draw[->,acc,very thick] (2.5,1.05)--(2.5,0.05) node[midway,right,acc]{$Q_c$};
\draw[->,black,very thick] (3.45,1.55)--(5.6,1.55) node[midway,above]{$W$};
\end{tikzpicture}
$$

## The Carnot cycle

The **Carnot cycle** is the reversible engine that operates between two
reservoirs using only isothermal and adiabatic strokes. For an ideal-gas working
substance the four strokes are:

- **1 → 2, isothermal expansion at $T_h$.** The gas absorbs $Q_h = Nk_BT_h\ln(V_2/V_1)$
  from the hot reservoir and does work.
- **2 → 3, adiabatic expansion.** No heat exchanged; the gas cools from $T_h$ to
  $T_c$ along $TV^{\gamma-1}=\text{const}$.
- **3 → 4, isothermal compression at $T_c$.** The gas rejects
  $Q_c = Nk_BT_c\ln(V_3/V_4)$ to the cold reservoir.
- **4 → 1, adiabatic compression.** The gas warms from $T_c$ back to $T_h$.

The two adiabats link the volumes: $T_hV_2^{\gamma-1}=T_cV_3^{\gamma-1}$ and
$T_hV_1^{\gamma-1}=T_cV_4^{\gamma-1}$. Dividing gives $V_2/V_1 = V_3/V_4$, so the
two logarithms are equal and the heats reduce to a clean ratio,

$$
\frac{Q_c}{Q_h} = \frac{T_c}{T_h}.
$$

The **efficiency** is the work delivered per unit heat drawn from the hot source.
With $W = Q_h - Q_c$ by the first law over the cycle,

$$
\eta = \frac{W}{Q_h} = 1 - \frac{Q_c}{Q_h} = 1 - \frac{T_c}{T_h}.
$$

$$
% caption: The Carnot cycle on the $P$–$V$ plane: two isotherms at $T_h$ and $T_c$ joined by two adiabats; heat $Q_h$ enters along the top isotherm and $Q_c$ leaves along the bottom, and the enclosed area is the net work.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\draw[->,black] (0,0)--(6.6,0) node[right,black]{$V$};
\draw[->,black] (0,0)--(0,4.8) node[above,black]{$P$};
\draw[acc,very thick] plot[domain=1.0:2.4,samples=40] (\x,{4.0/\x});
\draw[black,very thick] plot[domain=2.4:4.2,samples=40] (\x,{4.0*(2.4/\x)^(1.6667)/2.4});
\draw[acc,very thick] plot[domain=4.2:2.55,samples=40] (\x,{1.7/\x});
\draw[black,very thick] plot[domain=2.55:1.0,samples=40] (\x,{1.7*(2.55/\x)^(1.6667)/2.55});
\filldraw[black] (1.0,4.0) circle (1.8pt) node[above right]{$1$};
\filldraw[black] (2.4,{4.0/2.4}) circle (1.8pt) node[above right]{$2$};
\filldraw[black] (4.2,{1.7/4.2}) circle (1.8pt) node[above right]{$3$};
\filldraw[black] (2.55,{1.7/2.55}) circle (1.8pt) node[below left]{$4$};
\node[acc] at (2.05,3.2) {$Q_h$ at $T_h$};
\node[acc] at (4.0,0.95) {$Q_c$ at $T_c$};
\end{tikzpicture}
$$

On a **temperature–entropy diagram** the cycle is a rectangle. The isothermal
strokes are horizontal at $T_h$ and $T_c$; the adiabatic strokes are vertical
because a reversible adiabat holds entropy fixed (shown below). Heat absorbed is
$T\,\d S$ integrated along a stroke, so $Q_h = T_h\,\Delta S$ and
$Q_c = T_c\,\Delta S$ with the same entropy width $\Delta S$, and the net heat —
equal to the net work — is the enclosed area $(T_h-T_c)\,\Delta S$.

$$
% caption: On the $T$–$S$ plane the Carnot cycle is a rectangle of height $T_h-T_c$ and width $\Delta S$; the enclosed area equals the net work, and the efficiency $1-T_c/T_h$ is the height ratio.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\draw[->,black] (0,0)--(6.0,0) node[right,black]{$S$};
\draw[->,black] (0,0)--(0,4.4) node[above,black]{$T$};
\draw[black,very thick,fill=acc!8] (1.3,1.2) rectangle (4.6,3.6);
\draw[black,very thick] (1.3,3.6)--(4.6,3.6);
\draw[black,very thick] (1.3,1.2)--(4.6,1.2);
\node[black,above] at (2.95,3.6) {$Q_h=T_h\,\Delta S$};
\node[black,below] at (2.95,1.2) {$Q_c=T_c\,\Delta S$};
\draw[<->,black] (0.55,1.2)--(0.55,3.6) node[midway,left]{$T_h{:}T_c$};
\draw[<->,black] (1.3,0.55)--(4.6,0.55) node[midway,below]{$\Delta S$};
\end{tikzpicture}
$$

## Carnot's theorem and thermodynamic temperature

The efficiency $1-T_c/T_h$ was computed for an ideal gas, but its significance is
that no engine can beat it and every reversible engine matches it, whatever the
working substance.

> **Carnot's theorem.** Of all engines operating between two reservoirs at $T_h$
> and $T_c$, no engine is more efficient than a reversible one, and all reversible
> engines have the same efficiency.

> **Proof.** Suppose an engine $E$ had efficiency exceeding a reversible engine
> $R$ between the same reservoirs. Run $R$ backward as a refrigerator, driven by
> the work output of $E$. Per cycle $E$ produces work $W$ from heat $Q_h^E$, and
> $R$ uses $W$ to pump heat back to the hot reservoir. Because $E$ is more
> efficient it needs less hot-reservoir heat per unit work than $R$ returns, so
> the combined device delivers net heat from cold to hot with no external work — a
> Clausius violation. Hence no engine beats a reversible one. Applying the same
> argument with the roles swapped shows two reversible engines are equally
> efficient, since each can drive the other. The common efficiency therefore
> depends only on the two reservoir temperatures, not on the substance.

Because the reversible efficiency is a universal function of the two temperatures
alone, it can be used to **define** temperature. Setting
$Q_c/Q_h = f(T_c,T_h)$ and demanding consistency for engines in series forces
$f(T_c,T_h)=\Theta(T_c)/\Theta(T_h)$ for some universal function $\Theta$. The
choice $\Theta(T)=T$ defines the **thermodynamic (Kelvin) temperature**, and it
coincides with the ideal-gas absolute temperature of the zeroth-law lesson because
the ideal-gas Carnot calculation gave exactly $Q_c/Q_h=T_c/T_h$. Thermodynamic
temperature is thus substance-independent by construction.

## The Clausius inequality and entropy

Carnot's ratio $Q_c/Q_h=T_c/T_h$ can be rewritten, restoring signs so that heat
absorbed is positive, as $Q_h/T_h + Q_c/T_c = 0$ for a reversible cycle across two
reservoirs. Any reversible cycle is a limit of many infinitesimal Carnot cycles,
and summing the relation over them gives $\oint \delta Q_{\rm rev}/T = 0$. For an
irreversible cycle Carnot's theorem makes the engine less efficient, which turns
the equality into an inequality.

> **Clausius inequality.** For any cyclic process,
> $$\oint \frac{\delta Q}{T} \le 0,$$
> with equality if and only if the cycle is reversible. Here $T$ is the
> temperature of the reservoir supplying $\delta Q$ at each step.

For reversible cycles the loop integral vanishes; this is what it means for
$\delta Q_{\rm rev}/T$ to be the exact differential of a state function.

> **Definition (Entropy).** The **entropy** $S$ is the state function whose
> differential along any reversible process is
> $$\d S = \frac{\delta Q_{\rm rev}}{T}.$$
> Between two equilibrium states, $\Delta S = \int_a^b \delta Q_{\rm rev}/T$
> computed along any reversible path; the Clausius equality guarantees the result
> is path-independent.

Entropy is defined by a reversible path even when the actual process is
irreversible: to find $\Delta S$ for an irreversible change, connect the same
endpoints by any reversible path and integrate there. Because $S$ is a state
function, the answer is the true entropy change regardless of how the system
actually got between the states.

$$
% caption: A cycle made of an irreversible leg $a\to b$ closed by a reversible return $b\to a$; the Clausius inequality forces $\int_a^b \delta Q/T$ on the irreversible leg to fall below the entropy change $S_b-S_a$.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\filldraw[black] (0.8,0.7) circle (2.2pt) node[below left]{$a$};
\filldraw[black] (5.2,2.9) circle (2.2pt) node[above right]{$b$};
\draw[black,very thick,->] (0.8,0.7) .. controls (2.0,0.4) and (4.4,1.3) .. (5.2,2.9);
\node[black] at (3.1,0.75) {irreversible};
\draw[acc,very thick,->] (5.2,2.9) .. controls (4.0,3.4) and (1.6,2.6) .. (0.8,0.7);
\node[acc] at (2.7,3.15) {reversible return};
\node[black,align=left] at (6.0,1.6)
  {$\displaystyle\int_a^b\!\frac{\delta Q}{T}\le S_b-S_a$};
\end{tikzpicture}
$$

## Entropy production and the arrow of time

Applying the Clausius inequality to a cycle whose first leg is an irreversible
process $a\to b$ and whose return $b\to a$ is reversible gives, since the
reversible return contributes $S_a-S_b$,

$$
\int_a^b \frac{\delta Q}{T} + (S_a - S_b) \le 0
\;\Longrightarrow\;
\d S \ge \frac{\delta Q}{T}.
$$

The entropy change of a system meets or exceeds the heat it absorbs divided by
temperature, with equality only for reversible heating. For a **thermally
isolated** system $\delta Q = 0$, so

$$
\d S \ge 0,
$$

the **entropy principle**: the entropy of an isolated system never decreases, and
increases in any irreversible process. Equilibrium is the state of maximum entropy
subject to the constraints, the fact the microcanonical ensemble later builds on.

The entropy created within the system during an irreversible process is the
**entropy production** $\delta S_{\rm gen} = \d S - \delta Q/T \ge 0$. It measures
irreversibility directly: reversible processes generate no entropy, dissipative
ones generate positive entropy. Because macroscopic processes generate entropy and
their reverses would destroy it, the sign of $\delta S_{\rm gen}$ distinguishes
past from future — the thermodynamic **arrow of time**. The first law is symmetric
under time reversal; the second law is not, and it is the second law that a film
run backward violates. The statistical origin of this asymmetry, the overwhelming
multiplicity of high-entropy configurations, is the subject of the entropy lessons
to come.

## Summary

- The Kelvin and Clausius statements forbid, respectively, a cyclic engine that
  fully converts single-reservoir heat to work and a cyclic device that moves heat
  cold-to-hot for free; the two are equivalent.
- The Carnot cycle between $T_h$ and $T_c$ has efficiency $\eta = 1-T_c/T_h$, a
  rectangle of area $(T_h-T_c)\Delta S$ on the $T$–$S$ plane. Carnot's theorem
  makes this the maximum for any engine and defines thermodynamic temperature.
- The Clausius inequality $\oint \delta Q/T \le 0$ constructs entropy as the state
  function with $\d S = \delta Q_{\rm rev}/T$; entropy changes are computed along a
  reversible path even for irreversible processes.
- For an isolated system $\d S \ge 0$: entropy is non-decreasing, equilibrium
  maximizes it, and the positive entropy production of irreversible processes sets
  the arrow of time.
