# The Laws of Thermodynamics: Where Temperature, Internal Energy and Entropy Come From

> Empirical temperature is built from the transitivity of thermal equilibrium, internal energy and heat from the path independence of adiabatic work, and entropy from the equivalence of the Thomson and Clausius principles, Carnot's theorem and the Clausius inequality.
> https://rikai.mugen-giken.com/en/physics/thermodynamics/laws-of-thermodynamics

## 0. Key points

- The zeroth law is the assertion that **thermal equilibrium is an equivalence relation**, and from it one constructs a state function called the **empirical temperature**. Put the other way round: temperature is not a quantity that exists prior to the laws, it is a quantity manufactured from them.
- The first law is the assertion that **the work done on a system in an adiabatic process is independent of the path**, and from it the **internal energy** $U$ is constructed as a state function. **Heat** $Q$ is *defined* by $Q := \Delta U - W$; it is not measured independently.
- The second law has two formulations, Thomson's principle and Clausius's principle, and under the first law the two are equivalent.
- Carnot's theorem follows from the second law; from it one defines an **absolute temperature** $T$ independent of the working substance, and then the Clausius inequality $\oint \delta Q / T \le 0$ follows.
- For reversible cycles the inequality becomes an equality, so $\int \delta Q_{\mathrm{rev}}/T$ is path independent and the **entropy** $S$ is constructed as a state function. For an adiabatically isolated system, $\Delta S \ge 0$.
- The logical order is "zeroth $\to$ empirical temperature", "first $\to$ $U$ and $Q$", "second $\to$ absolute temperature $\to$ entropy". Respect this order and thermodynamics assembles itself without circularity.

## 1. Motivation: is heat a substance, a motion, or a definition?

Eighteenth-century chemists regarded heat as a conserved fluid called **caloric**. The picture works remarkably well. Caloric flows from a hot body to a cold one; heat capacity is the ability to store caloric; and with such statements essentially all the calorimetric results of the day could be organised.

The picture was broken by Count Rumford (Benjamin Thompson) and his cannon-boring experiment of 1798. Keep grinding a cannon barrel with a blunt tool and heat is produced without limit. If heat were a fluid present in finite amount, it would eventually run out. Then, in the 1840s, Joule performed precise experiments stirring water with a paddle wheel and showed that **a given amount of mechanical work always produces the same amount of heat**. In today's numbers, $1\ \mathrm{cal} = 4.186\ \mathrm{J}$.

From here the central questions of thermodynamics arise.

1. What does "having the same temperature" mean? What is a thermometer actually measuring?
2. If work and heat can be converted into one another, what is it that is conserved?
3. Work turns entirely into heat, yet heat does not turn entirely into work. How is this **asymmetry** to be formulated?

The zeroth, first and second laws of thermodynamics are, respectively, the answers to these three questions. What matters most is that each of them can be rewritten **as a theorem asserting the existence** of a quantity: temperature, energy, entropy. That is the form in which we assemble them here. For the mechanical notion of work we use exactly what was developed in [Foundations of Newtonian Mechanics](/en/physics/mechanics/newtonian-mechanics) (<Ref to="physics/mechanics/newtonian-mechanics#def-work" />).

<Figure caption="The three laws of thermodynamics and the logical dependence of the state functions constructed from them">
<Mermaid code={`flowchart TD
  Z["Zeroth law: thermal equilibrium is an equivalence relation"] --> TH["Existence of empirical temperature θ"]
  F["First law: path independence of adiabatic work"] --> U["Existence of internal energy U"]
  U --> Q["Definition of heat Q"]
  S1["Thomson's principle"] --- S2["Clausius's principle"]
  S1 --> CA["Carnot's theorem"]
  TH --> CA
  CA --> AT["Absolute temperature T"]
  Q --> CI["Clausius inequality"]
  AT --> CI
  CI --> EN["Existence of entropy S"]`} />
</Figure>

## 2. Preliminaries: systems, states, quasi-static processes

Thermodynamics deals with macroscopic systems containing on the order of $10^{23}$ particles. We do not follow the motion of individual particles. Instead we restrict attention to situations in which a small number of macroscopic variables suffices to specify the state of the system.

<Definition id="def-equilibrium" title="Equilibrium states and state functions">
A state in which the macroscopic properties have ceased to change, after the system has been isolated from its surroundings and left alone for a sufficiently long time, is called an **equilibrium state**. We assume that an equilibrium state of a simple fluid system (a one-component, one-phase gas or liquid) is specified, once the amount of substance $n$ is fixed, by the two variables volume $V$ and pressure $p$. A function defined on the set $\Gamma$ of equilibrium states is called a **state function** (a state variable).
</Definition>

For processes we distinguish two terms.

<Definition id="def-quasistatic" title="Quasi-static processes">
A process that proceeds slowly enough that the system may be regarded as being in an equilibrium state at every instant is called a **quasi-static process**. A quasi-static process is representable as a continuous curve in $\Gamma$. The work done on the system in a quasi-static process may be written
$$
W = -\int_{V_1}^{V_2} p \, dV
$$
(the sign convention takes "work done on the system" as positive; a compression $dV < 0$ gives $W > 0$).
</Definition>

For a process that is not quasi-static — free expansion after a partition is suddenly removed, say — the intermediate states are not equilibrium states, so $p$ is undefined and this integral cannot be written down. In what follows the symbols $\delta Q$ and $\delta W$ denote "infinitesimal amounts", but they are **not exact differentials**. Unlike $dU$, the integral of $\delta Q$ depends on the path. It is to mark this distinction that we write $\delta$ rather than $d$.

## 3. The zeroth law and empirical temperature

Bring two systems into contact through a wall that is mechanically rigid but permits the passage of heat (a **diathermal wall**) and wait long enough: the whole reaches equilibrium. We then say the two systems are **in thermal equilibrium with each other**. Let $\mathcal{S}$ be the set of all equilibrium states of all systems, and define $X \sim Y$ to mean "on bringing a system in state $X$ and a system in state $Y$ into contact through a diathermal wall, neither state changes".

That $X \sim X$ (reflexivity) and that $X \sim Y \Rightarrow Y \sim X$ (symmetry) hold is evident from the way the relation is defined. The issue is transitivity, which can only be postulated as an empirical fact.

<Axiom id="ax-zeroth" title="Zeroth law of thermodynamics">
If $X \sim Z$ and $Y \sim Z$, then $X \sim Y$.
</Axiom>

Thus $\sim$ is an equivalence relation on $\mathcal{S}$. From this single point alone, a quantity called temperature can be constructed.

<Theorem id="thm-empirical-temperature" title="Existence of an empirical temperature">
Assume <Ref to="ax-zeroth" />. Assume moreover that there is a system $C$ (a thermometer) and an injection $\lambda \mapsto c(\lambda) \in \mathcal{S}$ from an interval $I \subset \mathbb{R}$ such that **every equivalence class of $\sim$ meets $\{c(\lambda) : \lambda \in I\}$ in exactly one point**. Then a function $\theta : \mathcal{S} \to I$ is uniquely determined by
$$
\theta(X) = \lambda \iff X \sim c(\lambda)
$$
and satisfies, for all $X, Y \in \mathcal{S}$,
$$
\theta(X) = \theta(Y) \iff X \sim Y .
$$
This $\theta$ is called the **empirical temperature**.
</Theorem>

<Proof of="thm-empirical-temperature">
We first check that $\theta$ is consistently defined. Writing $[X]$ for the equivalence class containing $X$, the hypothesis says that $[X] \cap \{c(\lambda)\}$ is exactly one point, so there exists a $\lambda \in I$ with $X \sim c(\lambda)$, and only one such $\lambda$. Hence $\theta(X)$ is well defined.

Next we prove the equivalence. Suppose $\theta(X) = \theta(Y) = \lambda$. By definition $X \sim c(\lambda)$ and $Y \sim c(\lambda)$. By symmetry $c(\lambda) \sim Y$, so applying <Ref to="ax-zeroth" /> (transitivity) to $X \sim c(\lambda)$ and $Y \sim c(\lambda)$ gives $X \sim Y$.

Conversely, suppose $X \sim Y$ and put $\lambda = \theta(Y)$, so that $Y \sim c(\lambda)$. Applying <Ref to="ax-zeroth" /> to $X \sim Y$ and $c(\lambda) \sim Y$ gives $X \sim c(\lambda)$, that is, $\theta(X) = \lambda = \theta(Y)$.
</Proof>

<Remark id="rem-scale-arbitrariness">
What <Ref to="thm-empirical-temperature" /> supplies is a function that decides whether two states are at the same temperature; it does not supply a way of marking a scale. Indeed, if $\varphi : I \to \mathbb{R}$ is strictly increasing, then $\varphi \circ \theta$ has exactly the same property. This is why a mercury thermometer and an alcohol thermometer agree only at the ice point and the boiling point. To fix a scale uniquely, independently of the substance, one needs the second law; we do this after <Ref to="thm-carnot" />.
</Remark>

## 4. The first law: constructing internal energy and heat

The essence of Joule's experiment is this: whether the work $W$ was done by a paddle wheel, by an electrical resistance or by friction, the final state of the water in an adiabatic vessel is the same. We state this as a postulate for a general system.

<Axiom id="ax-adiabatic-work" title="Path independence of adiabatic work (first law)">
The set $\Gamma$ of equilibrium states of a system satisfies the following.

1. For any $X, Y \in \Gamma$, at least one of an adiabatic process (a process with all heat exchange blocked) from $X$ to $Y$ and an adiabatic process from $Y$ to $X$ exists.
2. Whenever an adiabatic process from $X$ to $Y$ exists, the work $W$ done on the system by its surroundings in that process is determined by $X$ and $Y$ alone, independently of the details of the process. We denote this value by $W_{\mathrm{ad}}(X \to Y)$.
</Axiom>

<Theorem id="thm-internal-energy" title="Existence of the internal energy">
Under <Ref to="ax-adiabatic-work" /> there exists a state function $U : \Gamma \to \mathbb{R}$ such that, for every pair $(X,Y)$ for which an adiabatic process from $X$ to $Y$ exists,
$$
W_{\mathrm{ad}}(X \to Y) = U(Y) - U(X) .
$$
Moreover $U$ is determined by this property up to an additive constant.
</Theorem>

<Proof of="thm-internal-energy">
**Step 1: work on a round trip cancels.** Suppose adiabatic processes $X \to Y$ and $Y \to X$ both exist. Concatenating the second after the first gives an adiabatic process from $X$ to $X$, whose work is $W_{\mathrm{ad}}(X \to Y) + W_{\mathrm{ad}}(Y \to X)$. On the other hand, "do nothing" is also an adiabatic process from $X$ to $X$, with work $0$. Applying part 2 of <Ref to="ax-adiabatic-work" /> to the pair $(X, X)$, these two must be equal. Hence
$$
W_{\mathrm{ad}}(X \to Y) = -\,W_{\mathrm{ad}}(Y \to X). 
$$

**Step 2: definition of $U$.** Fix a reference state $X_0 \in \Gamma$. By part 1 of <Ref to="ax-adiabatic-work" />, for any $X$ at least one of $X_0 \to X$ and $X \to X_0$ is possible. So we set
$$
U(X) :=
\begin{cases}
W_{\mathrm{ad}}(X_0 \to X) & (\text{if } X_0 \to X \text{ is possible}) \\[2pt]
-\,W_{\mathrm{ad}}(X \to X_0) & (\text{otherwise})
\end{cases}
$$
If both are possible, Step 1 shows that the two expressions give the same value, so $U$ is consistently defined.

**Step 3: verification of the claim.** Suppose $X \to Y$ is possible; we show $W_{\mathrm{ad}}(X\to Y) = U(Y)-U(X)$.

(a) Case in which $X_0 \to X$ is possible. Concatenating $X_0 \to X \to Y$ gives an adiabatic process $X_0 \to Y$, whose work is $U(X) + W_{\mathrm{ad}}(X \to Y)$. By part 2 of <Ref to="ax-adiabatic-work" /> this equals $W_{\mathrm{ad}}(X_0 \to Y)$, and since $X_0 \to Y$ is possible, that is $U(Y)$ by definition. Hence $U(Y) = U(X) + W_{\mathrm{ad}}(X \to Y)$.

(b) Case in which $X_0 \to X$ is impossible. Then $X \to X_0$ is possible and $U(X) = -W_{\mathrm{ad}}(X \to X_0)$. If moreover $X_0 \to Y$ is possible, concatenating $X \to X_0 \to Y$ gives $W_{\mathrm{ad}}(X\to Y) = W_{\mathrm{ad}}(X \to X_0) + W_{\mathrm{ad}}(X_0 \to Y) = -U(X) + U(Y)$. If $X_0 \to Y$ is impossible, then $Y \to X_0$ is possible and $U(Y) = -W_{\mathrm{ad}}(Y \to X_0)$. Concatenating $X \to Y \to X_0$ gives $W_{\mathrm{ad}}(X \to Y) + W_{\mathrm{ad}}(Y \to X_0) = W_{\mathrm{ad}}(X \to X_0)$, that is, $W_{\mathrm{ad}}(X \to Y) = -U(X) + U(Y)$.

**Step 4: uniqueness.** If $U'$ has the same property, then $U'(X) - U'(X_0) = U(X) - U(X_0)$ for every $X$, so $U' - U$ is constant.
</Proof>

Now that we have $U$, we can **define** heat.

<Definition id="def-heat" title="Heat">
For an arbitrary process taking a system from a state $X$ to a state $Y$, let $W$ be the work done on the system by its surroundings. Then
$$
Q := U(Y) - U(X) - W
$$
is called the **heat** absorbed by the system in this process. For an infinitesimal process we write
$$
dU = \delta Q + \delta W
$$
and call this the **first law of thermodynamics**.
</Definition>

<Remark id="rem-heat-is-defined">
The order of this definition matters. One does not measure "heat" with a calorimeter and then "discover" the first law. One builds $U$ out of adiabatic work — **a quantity measurable by mechanics alone** — and only then names the shortfall in the mechanical work balance "heat". On this footing the first law is not the unfalsifiable slogan that "energy is conserved" but the testable assertion that $U$ exists.
</Remark>

<Example id="ex-mayer" title="Heat capacities of an ideal gas and Mayer's relation">
An ideal gas is a system satisfying the equation of state $pV = nRT$ and having $U$ a function of $T$ alone. Define the heat capacities at constant volume and at constant pressure by
$$
C_V = \left(\frac{\delta Q}{dT}\right)_V, \qquad C_p = \left(\frac{\delta Q}{dT}\right)_p .
$$
In a constant-volume process, $dV = 0$ gives $\delta W = -p\,dV = 0$, so the first law in <Ref to="def-heat" /> yields $\delta Q = dU$, that is, $C_V = dU/dT$.

In a constant-pressure process, $\delta Q = dU + p\,dV$. From $U = U(T)$ we have $dU = C_V\,dT$, and differentiating $pV = nRT$ at constant $p$ gives $p\,dV = nR\,dT$. Therefore
$$
\delta Q = C_V\,dT + nR\,dT \quad\Longrightarrow\quad C_p = C_V + nR.
$$
This is **Mayer's relation**. For a monatomic ideal gas, $C_V = \tfrac{3}{2}nR$ and $C_p = \tfrac{5}{2}nR$, so the heat capacity ratio is $\gamma = C_p/C_V = 5/3 \approx 1.67$. For diatomic molecules ($\mathrm{N_2}$ at room temperature, say) one has $C_V = \tfrac{5}{2}nR$ and $\gamma = 7/5 = 1.4$, in good agreement with measurement. Why $3/2$ or $5/2$ is a question phenomenology cannot answer; it requires the statistical mechanics of [The Microcanonical Ensemble](/physics/thermodynamics/microcanonical-ensemble) and beyond (the microscopic derivation of $U = \tfrac{3}{2}nRT$ for a monatomic ideal gas is <Ref to="physics/thermodynamics/microcanonical-ensemble#cor-ideal-gas" />).
</Example>

<Example id="ex-adiabat" title="Poisson's relation for a quasi-static adiabatic process">
Let an ideal gas change quasi-statically and adiabatically. Since $\delta Q = 0$, the first law reads $C_V\,dT = -p\,dV$. Substituting $p = nRT/V$,
$$
C_V \frac{dT}{T} = -\,nR\,\frac{dV}{V}.
$$
Treating $C_V$ as constant and integrating gives $C_V \ln T + nR \ln V = \text{const}$, that is, $T V^{nR/C_V} = \text{const}$. Using $nR = C_p - C_V$ from <Ref to="ex-mayer" />, we have $nR/C_V = \gamma - 1$, so
$$
T V^{\gamma-1} = \text{const}, \qquad p V^{\gamma} = \text{const}
$$
(the second obtained by substituting $T = pV/nR$ and rearranging). Since $\gamma > 1$, in the $p$–$V$ diagram an adiabat is steeper than an isotherm $pV = \text{const}$. We use this fact when drawing the Carnot cycle.
</Example>

## 5. Reversible and irreversible processes

<Definition id="def-reversible" title="Reversible processes">
Suppose some process takes a system from a state $X$ to a state $Y$. If there exists a process restoring **both the system and its surroundings** to their original states leaving no other trace whatsoever, the original process is called **reversible**. Otherwise it is called **irreversible**.
</Definition>

Restoring "the system alone" is possible for most processes. The requirement for reversibility is that everything, surroundings included (weights, heat reservoirs, batteries), return completely to its original state, and this is a very strong condition.

<Remark id="rem-quasistatic-vs-reversible">
Being quasi-static and being reversible are not the same thing. Consider a cylinder with friction between the piston and the wall. Push it in extremely slowly and the gas is in an equilibrium state throughout, so the process is quasi-static. But frictional heat is generated, so even after the piston is pulled back to its original position the total work done on the surroundings is not $0$: friction produces heat in the reverse direction too. Hence this process is quasi-static but irreversible.

Conversely, a reversible process is necessarily quasi-static. If it proceeded at a finite rate, inhomogeneities of pressure or temperature would develop inside the system, and their relaxation is irreversible. So "reversible $\Rightarrow$ quasi-static", and the converse fails.
</Remark>

<Example id="ex-free-expansion" title="Free expansion is neither quasi-static nor reversible">
Divide an adiabatic vessel in two with a partition, with an ideal gas in the left half (volume $V$) and vacuum in the right half. Remove the partition and the gas spreads through the whole vessel (volume $2V$). No work is done on the surroundings, so $W = 0$; the vessel is adiabatic, so $Q = 0$; hence <Ref to="def-heat" /> gives $\Delta U = 0$. For an ideal gas $U$ is a function of $T$ alone, so the temperature does not change.

During the expansion the gas is violently out of equilibrium, so the process is not quasi-static. Furthermore, the gas never spontaneously returns to the left half, so it is irreversible as well. Quantifying this "failure to return" is exactly what the entropy, introduced later, does (<Ref to="ex-free-expansion-entropy" />).
</Example>

## 6. The second law: two principles and their equivalence

Work can be converted entirely into heat without limit (friction). That the reverse is impossible is the second law. Historically two independent formulations were proposed.

<Axiom id="ax-thomson" title="Thomson's (Kelvin's) principle">
There is no cycle that absorbs heat from a single heat reservoir, converts **all** of it into work, and returns to its original state leaving no other change.
</Axiom>

<Axiom id="ax-clausius" title="Clausius's principle">
There is no cycle that transfers heat from a colder reservoir to a hotter one and returns to its original state leaving no other change.
</Axiom>

In what follows, a "heat reservoir (heat bath)" means a system so large that its temperature does not change when heat is put in or taken out (for the statistical-mechanical formulation see <Ref to="physics/thermodynamics/canonical-ensemble#def-heat-bath" />), and we let the empirical temperatures of two reservoirs be $\theta_1 > \theta_2$. We also assume that at least one **reversible** cycle (a Carnot engine) operating between these two reservoirs exists. That one can actually be built with an ideal gas is shown in <Ref to="ex-carnot-ideal-gas" />.

<Theorem id="thm-equivalence" title="Equivalence of Thomson's principle and Clausius's principle">
Assume the first law and the existence of a reversible engine operating between two reservoirs. Then <Ref to="ax-thomson" /> holds if and only if <Ref to="ax-clausius" /> holds.
</Theorem>

<Proof of="thm-equivalence">
We argue by contraposition.

**If Clausius's principle fails, so does Thomson's.** Suppose there is a device $D$ that transfers heat $Q > 0$ from the cold reservoir ($\theta_2$) to the hot reservoir ($\theta_1$) leaving no other change. Run a reversible engine $R$ in the forward direction, and adjust the size of its cycle so that it absorbs $Q_1$ from the hot reservoir, discards exactly $Q$ to the cold one, and delivers work $W = Q_1 - Q$ to the outside (that $Q_1 > Q$ follows from the first law as long as it is run in the direction making $W > 0$).

Run $D$ and $R$ through one cycle simultaneously. For the cold reservoir the balance is $-Q$ (taken by $D$) $+\,Q$ (discarded by $R$) $= 0$, so nothing net happens. The hot reservoir loses heat $+Q - Q_1 = -(Q_1 - Q)$. And work $W = Q_1 - Q > 0$ appears outside. That is, we have built a cycle that extracts heat from **a single reservoir**, the hot one, converts it entirely into work, and leaves no other change. This contradicts <Ref to="ax-thomson" />.

**If Thomson's principle fails, so does Clausius's.** Suppose there is a device $E$ that absorbs heat $Q > 0$ from the hot reservoir, converts all of it into work $W = Q$, and leaves no other change. Use this $W$ to run a reversible engine $R$ backwards (as a refrigerator). Run in reverse, $R$ receives work $W$ from outside, absorbs $Q_2$ from the cold reservoir and discards $Q_2 + W$ to the hot one (first law).

Combining $E$ with $R^{-1}$, the balance for the hot reservoir is $-Q + (Q_2 + W) = Q_2$ (using $W = Q$), that for the cold reservoir is $-Q_2$, and the net work delivered outside is $W - W = 0$. So heat $Q_2 > 0$ has moved from the cold reservoir to the hot one with no other change left behind. This contradicts <Ref to="ax-clausius" />.
</Proof>

## 7. Carnot's theorem and absolute temperature

<Definition id="def-efficiency" title="Efficiency of a heat engine">
Suppose a cycle operating between two reservoirs absorbs $Q_1 > 0$ from the hot one, discards $Q_2 > 0$ to the cold one, and performs net work $W$ on the outside. Since the system returns to its original state over one cycle ($\Delta U = 0$), the first law gives $W = Q_1 - Q_2$. The **efficiency** of the cycle is defined by
$$
\eta := \frac{W}{Q_1} = 1 - \frac{Q_2}{Q_1} .
$$
</Definition>

<Theorem id="thm-carnot" title="Carnot's theorem">
For any cycle $E$ operating between two reservoirs of empirical temperatures $\theta_1 > \theta_2$, and any reversible cycle $R$ operating between the same two reservoirs,
$$
\eta_E \le \eta_R .
$$
In particular, all reversible cycles operating between the same two reservoirs have the same efficiency, which depends neither on the working substance nor on the construction of the device, but only on $\theta_1$ and $\theta_2$.
</Theorem>

<Proof of="thm-carnot">
Assume $\eta_E > \eta_R$ and derive a contradiction. Adjust the number of cycles (or the amount of working substance) of $E$ and $R$ so that the work delivered by one cycle of $E$ equals the work needed to run $R$ backwards, both being $W$. Efficiency is unchanged by changing the size of a system, so this adjustment does not alter the efficiencies.

The heat absorbed by $E$ from the hot reservoir is $Q_1^E = W/\eta_E$, and the heat discarded to the hot reservoir when $R$ is run backwards is $Q_1^R = W/\eta_R$ (running in reverse flips the direction of every heat and work while preserving magnitudes; here we used the reversibility of $R$). From the assumption $\eta_E > \eta_R$,
$$
Q_1^R - Q_1^E = W\left(\frac{1}{\eta_R} - \frac{1}{\eta_E}\right) > 0 .
$$

The composite device $E$ together with $R^{-1}$ returns to its original state after one cycle, and the net work delivered outside is $W - W = 0$. The hot reservoir receives net heat $Q_1^R - Q_1^E > 0$. Since the net work is $0$ and the composite device also returns to its original state, the first law says the cold reservoir loses the same amount $Q_1^R - Q_1^E$. That is, positive heat has moved from the cold reservoir to the hot one with no other change left behind, contradicting <Ref to="ax-clausius" />. Hence $\eta_E \le \eta_R$.

For the second part: if $R$ and $R'$ are both reversible, apply what we have just proved with $E = R'$ and reversible engine $R$ to get $\eta_{R'} \le \eta_R$, then exchange the roles to get $\eta_R \le \eta_{R'}$, whence $\eta_R = \eta_{R'}$. This common value is fixed once the two reservoirs are specified, so it is a function of $\theta_1, \theta_2$ alone.
</Proof>

<Corollary id="cor-heat-ratio" title="Universality of the ratio of heats">
For a reversible cycle operating between reservoirs of empirical temperatures $\theta_1, \theta_2$, the ratio $Q_2/Q_1$ is independent of the working substance and is a function $f(\theta_2, \theta_1)$ of $\theta_1$ and $\theta_2$ alone.
</Corollary>

<Proof of="cor-heat-ratio">
By <Ref to="thm-carnot" />, $\eta_R = 1 - Q_2/Q_1$ is determined by $\theta_1, \theta_2$ alone. Hence so is $Q_2/Q_1 = 1 - \eta_R$.
</Proof>

<Theorem id="thm-absolute-temperature" title="Existence of the absolute temperature">
For the function $f$ of <Ref to="cor-heat-ratio" /> there exists a positive function $T(\theta)$ such that
$$
f(\theta_2, \theta_1) = \frac{T(\theta_2)}{T(\theta_1)} .
$$
$T$ is uniquely determined up to a positive multiplicative constant. This $T$ is called the **absolute temperature** (thermodynamic temperature), and the efficiency of a reversible cycle may be written
$$
\eta_{\mathrm{rev}} = 1 - \frac{T_2}{T_1} .
$$
</Theorem>

<Proof of="thm-absolute-temperature">
Prepare three reservoirs $\theta_1 > \theta_2 > \theta_3$. Run a reversible engine $R_{12}$ between $\theta_1$ and $\theta_2$, absorbing $Q_1$ from $\theta_1$ and discarding $Q_2$ to $\theta_2$. Then run a reversible engine $R_{23}$ between $\theta_2$ and $\theta_3$, absorbing exactly $Q_2$ from $\theta_2$ and discarding $Q_3$ to $\theta_3$. The reservoir at $\theta_2$ suffers no net change, so the composite device may be regarded as a reversible engine operating between $\theta_1$ and $\theta_3$. Applying <Ref to="cor-heat-ratio" /> three times,
$$
\frac{Q_3}{Q_1} = \frac{Q_3}{Q_2}\cdot\frac{Q_2}{Q_1}, \qquad\text{that is}\qquad
f(\theta_3, \theta_1) = f(\theta_3, \theta_2)\, f(\theta_2, \theta_1) .
$$

First set $\theta_3 = \theta_1$. The left-hand side is $f(\theta_1,\theta_1) = 1$ (with two reservoirs at the same temperature, $Q_1 = Q_2$), so $f(\theta_1, \theta_2) f(\theta_2, \theta_1) = 1$, that is,
$$
f(\theta_2,\theta_1) = \frac{1}{f(\theta_1,\theta_2)} .
$$
Next fix a reference temperature $\theta_*$ and set $\theta_2 = \theta_*$ in the relation above:
$$
f(\theta_3,\theta_1) = f(\theta_3,\theta_*)\,f(\theta_*,\theta_1) = \frac{f(\theta_3,\theta_*)}{f(\theta_1,\theta_*)} .
$$
So if we define $T(\theta) := c\, f(\theta, \theta_*)$ with a positive constant $c$, then $f(\theta_2,\theta_1) = T(\theta_2)/T(\theta_1)$ holds. Since $f$ is positive, so is $T$.

Uniqueness: if $T'$ has the same property, then $T'(\theta)/T'(\theta_*) = f(\theta,\theta_*) = T(\theta)/T(\theta_*)$ for every $\theta$, so $T' = \text{const} \times T$. The constant $c$ is fixed by declaring the temperature of the triple point of water to be exactly $273.16\ \mathrm{K}$.
</Proof>

<Example id="ex-carnot-ideal-gas" title="The Carnot cycle for an ideal gas and the identification of absolute temperature">
Take an ideal gas as working substance and assemble a quasi-static cycle out of the following four processes, using as empirical temperature the ideal-gas temperature $\theta = pV/nR$.

1. $\mathrm{A}(V_A) \to \mathrm{B}(V_B)$: isothermal expansion at temperature $\theta_1$.
2. $\mathrm{B}(V_B) \to \mathrm{C}(V_C)$: adiabatic expansion ($\theta_1 \to \theta_2$).
3. $\mathrm{C}(V_C) \to \mathrm{D}(V_D)$: isothermal compression at temperature $\theta_2$.
4. $\mathrm{D}(V_D) \to \mathrm{A}(V_A)$: adiabatic compression ($\theta_2 \to \theta_1$).

In an isothermal process $U$ does not change, so by the first law the heat absorbed equals the work done, and
$$
Q_1 = \int_{V_A}^{V_B} p\,dV = nR\theta_1 \ln\frac{V_B}{V_A}, \qquad
Q_2 = nR\theta_2 \ln\frac{V_C}{V_D}
$$
(we have taken $Q_2$ positive, as it is the heat discarded). For the adiabatic processes we may use $\theta V^{\gamma-1} = \text{const}$ from <Ref to="ex-adiabat" />:
$$
\theta_1 V_B^{\gamma-1} = \theta_2 V_C^{\gamma-1}, \qquad \theta_1 V_A^{\gamma-1} = \theta_2 V_D^{\gamma-1}.
$$
Dividing one by the other gives $(V_B/V_A)^{\gamma-1} = (V_C/V_D)^{\gamma-1}$, and since $\gamma \ne 1$, $V_B/V_A = V_C/V_D$. The logarithms therefore cancel and
$$
\frac{Q_2}{Q_1} = \frac{\theta_2}{\theta_1}, \qquad \eta = 1 - \frac{\theta_2}{\theta_1}.
$$
Comparing with <Ref to="thm-absolute-temperature" /> gives $f(\theta_2,\theta_1) = \theta_2/\theta_1$, that is, $T \propto \theta$. So **the ideal-gas temperature is proportional to the absolute temperature**; matching the scales at the triple point makes the two coincide.

A numerical example: with $T_1 = 600\ \mathrm{K}$ and $T_2 = 300\ \mathrm{K}$, $\eta = 1 - 300/600 = 0.5$. A steam turbine in a thermal power station has a hot side at about $850\ \mathrm{K}$ and a cold side at about $300\ \mathrm{K}$, so even if reversible its efficiency is bounded by $\eta \le 1 - 300/850 \approx 0.65$; it is this constraint that keeps the thermal efficiency of real plants in the forties of percent.
</Example>

<Figure caption="The Carnot cycle in the p–V diagram. Solid lines (accent colour) are isotherms, dashed lines are adiabats. Since adiabats are steeper than isotherms, the cycle encloses a nonzero area.">
<svg viewBox="0 0 480 320" width="100%" role="img" aria-label="Carnot cycle drawn in a pressure-volume diagram">
  <g stroke="currentColor" stroke-width="1.5" fill="none">
    <line x1="60" y1="270" x2="450" y2="270" />
    <line x1="60" y1="270" x2="60" y2="40" />
  </g>
  <g fill="none" stroke="var(--sl-color-accent)" stroke-width="2.5">
    <polyline points="86,70 106,110 126,137 146,156 166,170" />
    <polyline points="398,241 344,237 287,230 239,222 202,213" />
  </g>
  <g fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="6 4">
    <polyline points="166,170 223,204 287,224 344,235 398,241" />
    <polyline points="202,213 166,194 134,166 110,132 86,70" />
  </g>
  <g fill="currentColor">
    <polygon points="130.3,142.5 120.4,136.4 126.6,131.4" />
    <polygon points="293.7,226.1 282.0,226.6 284.4,219.0" />
    <polygon points="280.1,229.0 291.6,226.6 290.4,234.6" />
    <polygon points="129.6,160.6 139.6,166.6 133.4,171.6" />
  </g>
  <g fill="currentColor" font-size="13">
    <text x="70" y="62">A</text>
    <text x="172" y="182">B</text>
    <text x="404" y="252">C</text>
    <text x="186" y="228">D</text>
    <text x="452" y="275">V</text>
    <text x="48" y="38">p</text>
    <text x="188" y="118">isotherm T1</text>
    <text x="232" y="182">adiabat</text>
    <text x="318" y="264">isotherm T2</text>
    <text x="76" y="200">adiabat</text>
  </g>
</svg>
</Figure>

## 8. The Clausius inequality and entropy

So far there have been two reservoirs. We now generalise to an arbitrary cycle.

<Theorem id="thm-clausius-inequality" title="The Clausius inequality">
Suppose a system performs an arbitrary cycle, absorbing along the way an infinitesimal amount of heat $\delta Q$ from a reservoir at absolute temperature $T$ ($T$ is the temperature of the reservoir it takes heat from; the system itself may be out of equilibrium). Then
$$
\oint \frac{\delta Q}{T} \le 0 .
$$
Moreover, if the cycle is reversible, equality holds.
</Theorem>

<Proof of="thm-clausius-inequality">
As an auxiliary device, prepare one large reservoir at absolute temperature $T_0 > 0$. Instead of letting the system receive $\delta Q$ from the reservoir at temperature $T$, proceed as follows. Prepare a small reversible engine (a Carnot engine) operating between $T_0$ and $T$, arranged so that it absorbs $\delta Q_0$ from $T_0$ and delivers exactly $\delta Q$ to the system. By <Ref to="thm-absolute-temperature" />, the ratio of heats in a reversible engine equals the ratio of absolute temperatures, so
$$
\frac{\delta Q_0}{T_0} = \frac{\delta Q}{T}, \qquad \delta Q_0 = T_0\,\frac{\delta Q}{T}.
$$
(If $\delta Q < 0$, that is, if the system discards heat, run the auxiliary engine backwards; the formula holds unchanged.)

Around one circuit of the cycle, the system returns to its original state, so $\Delta U_{\text{sys}} = 0$, and the auxiliary engines are cycles too, so $\Delta U_{\text{aux}} = 0$. The heat received by the composite system (the system plus all the auxiliary engines) is only that drawn from the single reservoir $T_0$:
$$
Q_0 = \oint \delta Q_0 = T_0 \oint \frac{\delta Q}{T}.
$$
By the first law, the net work done by the composite system on the outside is $W = Q_0$.

If $Q_0 > 0$, this composite device would have absorbed heat from a single reservoir $T_0$, converted all of it into work, and returned to its original state leaving no other change, contradicting <Ref to="ax-thomson" />. Hence $Q_0 \le 0$, and since $T_0 > 0$,
$$
\oint \frac{\delta Q}{T} \le 0 .
$$

If the cycle is reversible, every process can be run backwards. In the reversed cycle the sign of $\delta Q$ at each stage is flipped, so the sign of $\oint \delta Q/T$ is flipped too, and applying the inequality just proved to the reversed cycle gives $-\oint \delta Q/T \le 0$. Combining the two, $\oint \delta Q_{\mathrm{rev}}/T = 0$.
</Proof>

<Theorem id="thm-entropy-exists" title="Existence of the entropy">
Consider a system in which any two equilibrium states can be joined by a reversible process. Then there exists a state function $S : \Gamma \to \mathbb{R}$, unique up to an additive constant, such that for every reversible process $X \to Y$
$$
S(Y) - S(X) = \int_X^Y \frac{\delta Q_{\mathrm{rev}}}{T} .
$$
$S$ is called the **entropy**. For an infinitesimal reversible process, $dS = \delta Q_{\mathrm{rev}}/T$.
</Theorem>

<Proof of="thm-entropy-exists">
Take two reversible processes from $X$ to $Y$, call them $C_1$ and $C_2$. Going forward along $C_1$ and backwards along $C_2$ produces a reversible cycle, so the equality part of <Ref to="thm-clausius-inequality" /> gives
$$
\int_{C_1} \frac{\delta Q_{\mathrm{rev}}}{T} - \int_{C_2} \frac{\delta Q_{\mathrm{rev}}}{T} = \oint \frac{\delta Q_{\mathrm{rev}}}{T} = 0 .
$$
Hence the value of the integral is independent of the path and is determined by $X$ and $Y$ alone. Fixing a reference state $X_0$ and setting $S(X) := \int_{X_0}^{X} \delta Q_{\mathrm{rev}}/T$, the asserted identity follows by taking the path $X_0 \to X \to Y$. Uniqueness is the same argument as Step 4 of <Ref to="thm-internal-energy" />.
</Proof>

<Theorem id="thm-entropy-increase" title="The law of increase of entropy">
If a system changes from a state $X$ to a state $Y$ by an arbitrary process, receiving during it heat $\delta Q$ from reservoirs at absolute temperature $T$, then
$$
S(Y) - S(X) \ge \int_X^Y \frac{\delta Q}{T} .
$$
In particular, for an adiabatically isolated system ($\delta Q = 0$),
$$
S(Y) \ge S(X)
$$
with equality only when the process is reversible.
</Theorem>

<Proof of="thm-entropy-increase">
To the given process $X \to Y$ (not necessarily reversible), append a reversible process from $Y$ to $X$ to form a cycle. By <Ref to="thm-clausius-inequality" />,
$$
\int_X^Y \frac{\delta Q}{T} + \int_Y^X \frac{\delta Q_{\mathrm{rev}}}{T} \le 0 .
$$
By <Ref to="thm-entropy-exists" /> the second term is $S(X) - S(Y)$. Rearranging,
$$
\int_X^Y \frac{\delta Q}{T} \le S(Y) - S(X) .
$$
If $\delta Q = 0$ the left-hand side is $0$, so $S(Y) \ge S(X)$.

The equality condition: if the original process is reversible, the whole cycle is reversible, so the equality part of <Ref to="thm-clausius-inequality" /> applies and $S(Y) - S(X) = \int_X^Y \delta Q_{\mathrm{rev}}/T$. Conversely, when $\delta Q = 0$ and $S(Y) = S(X)$, supposing an adiabatic process retracing this one backwards to exist, the entropy is unchanged and no contradiction arises. On the other hand, that the inequality above is strict for an irreversible adiabatic process is confirmed by concrete examples such as <Ref to="ex-free-expansion-entropy" />.
</Proof>

<Example id="ex-free-expansion-entropy" title="Entropy production in free expansion">
Let us compute $\Delta S$ for the free expansion of <Ref to="ex-free-expansion" />. The actual process is irreversible, so $\int \delta Q/T$ is unusable (with $\delta Q = 0$ it would merely give $0$). But entropy is a state function, so we may compute along **any other reversible process** joining the initial state $(T, V)$ to the final state $(T, 2V)$.

We therefore use a quasi-static isothermal expansion at temperature $T$. In an isothermal process of an ideal gas $dU = 0$, so $\delta Q_{\mathrm{rev}} = p\,dV = nRT\,dV/V$, and hence
$$
\Delta S = \int_V^{2V} \frac{nR}{V'}\,dV' = nR \ln 2 > 0 .
$$
In general, for an ideal gas, $dU = C_V dT$ and $\delta Q_{\mathrm{rev}} = C_V dT + p\,dV$ give
$$
dS = \frac{C_V\,dT}{T} + \frac{nR\,dV}{V}
\quad\Longrightarrow\quad
\Delta S = C_V \ln\frac{T_2}{T_1} + nR \ln\frac{V_2}{V_1}
$$
(treating $C_V$ as constant). Free expansion is the case $T_2 = T_1$, $V_2 = 2V_1$, in agreement with the above.

This is an example of $\Delta S > 0$ in an adiabatically isolated system, realising the strict inequality of <Ref to="thm-entropy-increase" />. For $1\ \mathrm{mol}$, $\Delta S = 8.314 \times 0.693 \approx 5.76\ \mathrm{J\,K^{-1}}$.
</Example>

<Remark id="rem-toward-statistical-mechanics">
This is as far as thermodynamics as a phenomenological theory can go. $S$ is "the integral of reversible heat divided by temperature", and its microscopic meaning is not asked after. Boltzmann saw that it can be written, in terms of the number $W$ of microscopic states corresponding to a macroscopic state, as
$$
S = k_B \ln W
$$
(<Ref to="physics/thermodynamics/microcanonical-ensemble#def-boltzmann-entropy" />). Rereading <Ref to="ex-free-expansion-entropy" /> with this formula: doubling the volume doubles the number of positions available to each molecule, so for $N$ molecules $W$ increases by a factor $2^N$, giving $\Delta S = k_B N \ln 2 = nR\ln 2$, in agreement with the phenomenological result. Statistical mechanics is built by taking this correspondence as its starting point, and is treated in [The Microcanonical Ensemble](/physics/thermodynamics/microcanonical-ensemble) (whose founding postulate is <Ref to="physics/thermodynamics/microcanonical-ensemble#ax-equal-a-priori" />) and [The Canonical Ensemble](/physics/thermodynamics/canonical-ensemble) (<Ref to="physics/thermodynamics/canonical-ensemble#thm-boltzmann-distribution" />). The procedure of transforming $U$ and $S$ into more convenient forms by changing independent variables is treated in [Free Energy and Thermodynamic Potentials](/en/physics/thermodynamics/thermodynamic-potentials), at <Ref to="physics/thermodynamics/thermodynamic-potentials#def-potentials" />.
</Remark>

## 9. Exercises

<Exercise id="exr-isothermal" difficulty="Easy">
Let $n$ mol of an ideal gas expand quasi-statically and isothermally from volume $V_1$ to volume $V_2$ ($V_2 > V_1$) while in contact with a reservoir at absolute temperature $T$. Find (1) the work $W_{\text{out}}$ done by the gas on the outside, (2) the heat $Q$ absorbed by the gas, (3) the entropy change $\Delta S_{\text{gas}}$ of the gas, (4) the entropy change $\Delta S_{\text{res}}$ of the reservoir, and (5) verify that the total entropy change is $0$.
<Solution>
(1) From $p = nRT/V$,
$$
W_{\text{out}} = \int_{V_1}^{V_2} p\,dV = nRT \int_{V_1}^{V_2}\frac{dV}{V} = nRT\ln\frac{V_2}{V_1}.
$$

(2) For an ideal gas $U$ is a function of $T$ alone and $T$ is constant, so $\Delta U = 0$. The first law $\Delta U = Q + W$ of <Ref to="def-heat" /> (with $W = -W_{\text{out}}$) gives $Q = W_{\text{out}} = nRT\ln(V_2/V_1)$.

(3) The process is reversible (quasi-static, frictionless, with reservoir and system at the same temperature), so <Ref to="thm-entropy-exists" /> gives
$$
\Delta S_{\text{gas}} = \int \frac{\delta Q_{\mathrm{rev}}}{T} = \frac{Q}{T} = nR\ln\frac{V_2}{V_1} > 0 .
$$

(4) The reservoir loses the same heat $Q$ at temperature $T$, so $\Delta S_{\text{res}} = -Q/T = -nR\ln(V_2/V_1)$.

(5) The sum is $0$. This is the equality case of <Ref to="thm-entropy-increase" />: in a reversible process the total entropy of system plus surroundings is conserved.
</Solution>
</Exercise>

<Exercise id="exr-two-bodies" difficulty="Standard">
Two identical bodies of heat capacity $C$ (constant, independent of temperature) have initial temperatures $T_1$ and $T_2$ respectively ($T_1 > T_2 > 0$). They are brought into contact and left to reach equilibrium without exchanging heat with anything outside.

(1) Find the final temperature $T_f$. (2) Find the total entropy change $\Delta S$ and show that $\Delta S \ge 0$. State the condition for equality.
<Solution>
(1) Since no heat is exchanged with the outside, the total internal energy is conserved: $C(T_f - T_1) + C(T_f - T_2) = 0$. Hence
$$
T_f = \frac{T_1 + T_2}{2}.
$$

(2) The entropy change of each body is obtained by considering reversible heating from $T'$ to $T'+dT'$, giving $dS = C\,dT'/T'$, and integrating:
$$
\Delta S = C\ln\frac{T_f}{T_1} + C\ln\frac{T_f}{T_2} = C\ln\frac{T_f^2}{T_1 T_2} = C\ln\frac{(T_1+T_2)^2}{4T_1T_2}.
$$
By the AM–GM inequality, $(T_1+T_2)/2 \ge \sqrt{T_1T_2}$; both sides are positive, so squaring gives $(T_1+T_2)^2 \ge 4T_1T_2$. The logarithm is increasing, so $\Delta S \ge 0$. Equality holds only when $T_1 = T_2$, that is, when the bodies were already in thermal equilibrium and nothing happens.

A numerical example: with $C = 100\ \mathrm{J\,K^{-1}}$, $T_1 = 400\ \mathrm{K}$ and $T_2 = 300\ \mathrm{K}$, we get $T_f = 350\ \mathrm{K}$ and $\Delta S = 100\ln(350^2/120000) = 100\ln(1.02083) \approx 2.06\ \mathrm{J\,K^{-1}}$.
</Solution>
</Exercise>

<Exercise id="exr-max-work" difficulty="Standard">
Take the same two bodies as in <Ref to="exr-two-bodies" />, but instead of simply placing them in contact, insert a heat engine between them and extract work. The bodies are finite, so their temperatures change as heat is taken from or given to them. Find the maximum work $W_{\max}$ that can be extracted, and the final temperature at which it is achieved.
<Solution>
Suppose the engine is run until both bodies reach the same temperature $T_f$. By conservation of energy, the work extracted is
$$
W = C(T_1 - T_f) + C(T_2 - T_f) = C(T_1 + T_2 - 2T_f) .
$$
So maximising $W$ amounts to minimising $T_f$.

The total entropy change is (the engine itself is a cycle, so its entropy does not change, and only work leaves to the outside, which carries no entropy)
$$
\Delta S = C\ln\frac{T_f}{T_1} + C\ln\frac{T_f}{T_2} = C\ln\frac{T_f^2}{T_1T_2} .
$$
By <Ref to="thm-entropy-increase" />, $\Delta S \ge 0$, that is, $T_f^2 \ge T_1T_2$ and $T_f \ge \sqrt{T_1T_2}$. So the minimum of $T_f$ is $\sqrt{T_1T_2}$ (attained when the engine is reversible, with $\Delta S = 0$), and
$$
W_{\max} = C\left(T_1 + T_2 - 2\sqrt{T_1T_2}\right) = C\left(\sqrt{T_1} - \sqrt{T_2}\right)^2 .
$$
The $T_f = (T_1+T_2)/2$ of <Ref to="exr-two-bodies" /> is the arithmetic mean, this one is the geometric mean, and the gap given by the AM–GM inequality measures the work that was thrown away. A numerical example: with $C = 100$, $T_1 = 400$ and $T_2 = 300$, $W_{\max} = 100(20 - \sqrt{300})^2 = 100(20-17.3205)^2 \approx 718\ \mathrm{J}$.
</Solution>
</Exercise>

<Exercise id="exr-adiabats" difficulty="Hard">
For a simple fluid system, call the set of states connected by quasi-static adiabatic processes an **adiabat**. Show, from <Ref to="ax-thomson" />, that two distinct adiabats in the $p$–$V$ diagram never intersect.
<Solution>
Suppose two adiabats intersect at a point $\mathrm{C}$. Choose a point $\mathrm{A}$ on one adiabat and a point $\mathrm{B}$ on the other, so that $\mathrm{A}$ and $\mathrm{B}$ lie on the same isotherm and $\mathrm{A} \ne \mathrm{B}$ (if the adiabats are distinct, their intersections with a common isotherm are in general different points).

Consider the following cycle.

1. $\mathrm{A} \to \mathrm{B}$: a quasi-static isothermal process in contact with a single reservoir at temperature $T$. Let $Q$ be the heat absorbed.
2. $\mathrm{B} \to \mathrm{C}$: a quasi-static adiabatic process along one adiabat. $\delta Q = 0$.
3. $\mathrm{C} \to \mathrm{A}$: a quasi-static adiabatic process along the other adiabat. $\delta Q = 0$.

The system returns to $\mathrm{A}$, so $\Delta U = 0$, and the first law gives net work on the outside $W = Q$. Interchanging the roles of $\mathrm{A}$ and $\mathrm{B}$ flips the sign of $Q$, so we may choose the direction making $Q > 0$. But then we have a cycle that absorbs heat $Q$ from a single reservoir, converts all of it into work, and leaves no other change, contradicting <Ref to="ax-thomson" />. If instead $Q = 0$, then $\mathrm{A} \to \mathrm{B}$ is itself an adiabatic process, so $\mathrm{A}$ and $\mathrm{B}$ lie on the same adiabat, the two adiabats coincide, and the hypothesis is contradicted.

Hence two distinct adiabats never intersect. In the language of <Ref to="thm-entropy-exists" />, an adiabat is a level set $S = \text{const}$, and since $S$ is a function of the state it is of course impossible for level sets with different values to intersect. The argument above derives this fact from the second law alone, before entropy has been constructed.
</Solution>
</Exercise>

## References

- E. Fermi, *Thermodynamics*, Dover, 1956 — Chapters II–IV. The classic, concise route from Carnot's theorem to entropy.
- A. B. Pippard, *Elements of Classical Thermodynamics*, Cambridge University Press, 1957 — Chapters 1–4. Detailed on the construction of empirical temperature from the zeroth law.
- H. B. Callen, *Thermodynamics and an Introduction to Thermostatistics*, 2nd ed., Wiley, 1985 — Chapters 1–4. A development taking the entropy maximum principle as an axiom.
- Hal Tasaki, *Netsurikigaku — Gendaiteki na Shiten kara*, Baifukan, 2000 (in Japanese) — rebuilds the logic starting from adiabatic operations and work.
- Akira Shimizu, *Netsurikigaku no Kiso*, University of Tokyo Press, 2007 (in Japanese) — a careful discussion of how the postulates are set up and how the laws depend on one another.
- E. H. Lieb and J. Yngvason, "The physics and mathematics of the second law of thermodynamics", *Physics Reports* **310** (1999), 1–96. [arXiv:cond-mat/9708200](https://arxiv.org/abs/cond-mat/9708200) — proves the existence and uniqueness of entropy from the order structure of adiabatic accessibility.

## Appendix: Constructing empirical temperature from coordinates

**The construction in <Ref to="thm-empirical-temperature" /> was abstract: pick out a representative of each equivalence class with a thermometer.** Historically a much more concrete argument, using equations of state, was used. We give it here.

Consider three simple fluid systems $A, B, C$, and describe their states by $(p_A, V_A)$ and so on. The condition that $A$ and $C$ be in thermal equilibrium must be expressible as a single relation among $p_A, V_A, p_C, V_C$. Solving it for $p_C$, write
$$
p_C = f_{AC}(p_A, V_A, V_C) .
$$
Similarly, for $B$ and $C$, write $p_C = f_{BC}(p_B, V_B, V_C)$.

If $A \sim C$ and $B \sim C$, then $A \sim B$ by <Ref to="ax-zeroth" />. Hence the condition
$$
f_{AC}(p_A, V_A, V_C) = f_{BC}(p_B, V_B, V_C)
$$
must be equivalent to the condition of thermal equilibrium between $A$ and $B$. But the equilibrium condition for $A$ and $B$ is a relation among $p_A, V_A, p_B, V_B$ alone and does not involve the volume $V_C$ of the thermometer $C$. In other words, the content of the zeroth law is that $V_C$ must be eliminable from the equation above.

Assuming that $f_{AC}$ and $f_{BC}$ are smooth and satisfy a suitable nondegeneracy condition in $V_C$, this requirement forces $f_{AC}$ to have the form
$$
f_{AC}(p_A, V_A, V_C) = \theta_A(p_A, V_A)\,\xi(V_C) + \eta(V_C)
$$
($\xi$ and $\eta$ being functions determined by $C$ alone). Since $f_{BC}$ has the same $\xi$ and $\eta$, the equation reduces to
$$
\theta_A(p_A, V_A) = \theta_B(p_B, V_B) .
$$
These $\theta_A, \theta_B$ are the empirical temperature. Choosing an ideal gas as the thermometer $C$ and marking the scale as $\theta = pV/nR$ gives the ideal-gas temperature, which as we saw in <Ref to="ex-carnot-ideal-gas" /> coincides with the absolute temperature.

**The weakness of this argument is that it assumes smoothness and nondegeneracy of the equations of state.** The <Ref to="thm-empirical-temperature" /> of the main text uses no such assumptions, drawing the same conclusion from a set-theoretic fact (the quotient by an equivalence relation) and the existence of a thermometer alone. The physical content is the same, but I think the form used in the main text makes the logical dependencies easier to see.
