---
title: Equilibrium, State Variables, and the Zeroth Law
module: Thermodynamics
moduleNumber: 1
lessonNumber: 1
order: 101
summary: >
  Thermodynamics describes a many-body system by a handful of macroscopic
  variables and the equilibrium relations among them. This lesson fixes the
  vocabulary: systems and the walls that separate them, state variables versus
  path-dependent process quantities, quasi-static and reversible idealizations,
  and the zeroth law, whose transitivity of thermal equilibrium is what lets
  temperature exist as a number. The ideal-gas thermometer turns that number
  into a scale, and an equation of state ties the variables into a surface.
topics: [Thermodynamics]
sources:
  - book: Schroeder
    ref: "Ch. 1 — Energy in Thermal Physics; §1.1 Thermal Equilibrium"
  - book: Reif
    ref: "Ch. 3 — Statistical Thermodynamics; §3.1–3.3"
  - book: Kardar (Statistical Physics of Particles)
    ref: "Ch. 1 — Thermodynamics; §1.1–1.3"
  - book: Callen
    ref: "Ch. 1 — The Problem and the Postulates; §1.1–1.4"
draft: false
---

Statistical mechanics derives the laws of heat by counting microstates. Before
the counting begins, the target of the derivation has to be stated in its own
terms. Thermodynamics is that target: a closed, self-consistent description of
macroscopic matter that predates the atomic picture and survives it unchanged.
It represents a system of order $10^{23}$ particles by a few numbers — volume,
pressure, temperature, energy — and asserts exact relations among them. The
whole of the later course can be read as the project of computing those numbers
and those relations from a partition function. This lesson sets up the objects
the relations are about.

## Systems, surroundings, and walls

A **thermodynamic system** is the portion of the universe under study; the
**surroundings** are everything else that can exchange energy or matter with it.
The two are separated by a **wall** (boundary), and the classification of walls
by what they permit fixes what kind of system one has.

- **Diathermal wall** — permits energy transfer as heat. Two systems separated
  by a rigid, impermeable, diathermal wall can still change each other's state
  by exchanging thermal energy.
- **Adiabatic wall** — forbids heat transfer. A system bounded entirely by
  adiabatic walls is **thermally isolated**; only work crosses its boundary.
- **Rigid wall** — forbids volume change, so the system does no expansion work.
- **Permeable / semipermeable wall** — permits matter transfer, of all species
  or of selected ones.

A system that exchanges neither energy nor matter with its surroundings is
**isolated**; one that exchanges energy but not matter is **closed**; one that
exchanges both is **open**. A **reservoir** (or **bath**) is a system so large
that finite exchanges with it leave its intensive properties unchanged — a heat
reservoir holds its temperature fixed, a particle reservoir its chemical
potential. Reservoirs are the fixed backdrops against which the canonical and
grand-canonical ensembles are later defined.

$$
% caption: A rigid diathermal wall passes heat but not matter or work; the system and reservoir relax to a common temperature while the much larger reservoir barely changes.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\fill[acc!10] (0,0) rectangle (2.6,2.6);
\draw[acc,thick] (0,0) rectangle (2.6,2.6);
\node[acc] at (1.3,2.15) {system};
\node at (1.3,1.35) {$T,\,V,\,N$};
\fill[black] (3.2,-0.5) rectangle (7.6,3.1);
\draw[black,thick] (3.2,-0.5) rectangle (7.6,3.1);
\node[black] at (5.4,2.6) {reservoir};
\node at (5.4,1.35) {$T_R$ constant};
\draw[black,thick] (2.6,0.2)--(3.2,0.2)--(3.2,2.8)--(2.6,2.8);
\node[black,align=center] at (2.9,-0.05) {diathermal\\wall};
\draw[<->,black,thick] (2.75,1.5)--(3.05,1.5);
\node[black,above] at (2.9,1.55) {heat};
\end{tikzpicture}
$$

## State variables and process quantities

A system in equilibrium is specified by a small set of **state variables**. For
a simple fluid, any two of $(P,V,T)$ fix the third and with the particle number
$N$ determine every other equilibrium property. State variables split by how
they scale when two identical copies of a system are combined:

- **Extensive** variables double: volume $V$, internal energy $U$, entropy $S$,
  particle number $N$, magnetization $M$.
- **Intensive** variables are unchanged: pressure $P$, temperature $T$, chemical
  potential $\mu$, mass density $\rho$.

A ratio of two extensive variables is intensive; this is the origin of molar and
specific quantities. Each extensive variable is paired with an intensive
**conjugate** through the energy: $P$ with $V$, $T$ with $S$, $\mu$ with $N$.
Those pairings organize the entire formalism of thermodynamic potentials.

> **Definition (State function).** A quantity is a **state function** if its
> value is fixed by the current equilibrium state alone, independent of the path
> by which the state was reached. Its differential is **exact**: the integral of
> $\d f$ between two states depends only on the endpoints, and around any closed
> cycle $\oint \d f = 0$.

Internal energy, entropy, volume, and temperature are state functions. Heat $Q$
and work $W$ are not. They are **process quantities**: amounts of energy in
transit, defined only for a process, with values that depend on the path taken
between endpoints. Their infinitesimals are **inexact**, written $\delta Q$ and
$\delta W$ to mark that they are not the differential of any state function.[^exact]
The distinction is not pedantry; it is the mathematical content of the first and
second laws, and the next two lessons turn on it.

[^exact]: Reif, §3.5, and Callen, §1.7, develop the exact/inexact distinction
through Pfaffian differential forms; a form $\sum_i X_i\,\d x_i$ is exact iff the
mixed partials agree, $\partial X_i/\partial x_j = \partial X_j/\partial x_i$.

## Equilibrium and relaxation

A system is in **thermodynamic equilibrium** when its macroscopic state
variables are uniform and unchanging in time, with no macroscopic flows of
energy or matter. An isolated system prepared in an arbitrary state relaxes
toward equilibrium over a characteristic **relaxation time** set by its internal
dynamics, after which the state variables settle to constant values. Equilibrium
thermodynamics describes only these end states, not the relaxation itself; the
approach to equilibrium is the province of kinetic theory and the later
fluctuation lessons.

Equilibrium is layered. **Mechanical equilibrium** means the pressure is
balanced across every internal boundary; **thermal equilibrium** means the
temperature is uniform; **diffusive** (or **chemical**) **equilibrium** means the
chemical potential of each species is uniform. Full equilibrium requires all
three. A system can sit in one and not the others: a gas at uniform pressure with
a temperature gradient is in mechanical but not thermal equilibrium, and heat
will flow until the gradient vanishes.

## Quasi-static and reversible processes

A finite-rate process drives a system out of equilibrium: pushing a piston
quickly launches pressure waves, and the gas has no single well-defined pressure
while they cross it. To keep the state variables meaningful throughout a process,
thermodynamics idealizes.

> **Definition (Quasi-static process).** A process carried out so slowly that
> the system passes through a continuous sequence of equilibrium states. At every
> instant the state variables are defined and uniform, and the process traces a
> curve on the equilibrium state surface.

A quasi-static process is the limit of infinitely slow driving; a real process
approximates it when the driving time is long compared with the relaxation time.
Only for a quasi-static path is the work integral $W = -\int P\,\d V$ computable
from the system's own pressure, because only then is $P$ defined at each step.

**Reversibility** is a stronger condition. A process is **reversible** if it can
be run backward through the same sequence of states with no net change in either
the system or its surroundings. Every reversible process is quasi-static, but not
conversely: quasi-static compression against friction is quasi-static yet
dissipative, and reversing it does not restore the surroundings. Reversibility
additionally forbids dissipation and requires that exchanges occur across
vanishing gradients — heat crossing between bodies differing in temperature by an
infinitesimal $\d T$, work done against a pressure differing by an infinitesimal
$\d P$. The idealization matters because the Carnot bound of the third lesson is
saturated only by reversible processes.

$$
% caption: Between the same endpoints, a quasi-static path is a curve of equilibrium states on the $P$–$V$ plane; an irreversible free expansion jumps between endpoints through non-equilibrium states with no defined pressure, drawn dashed off the surface.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\draw[->,black] (0,0)--(6,0) node[right,black]{$V$};
\draw[->,black] (0,0)--(0,4) node[above,black]{$P$};
\draw[acc,very thick] (1,3.4) .. controls (2.3,1.6) and (3.5,1.2) .. (5,0.9);
\node[acc] at (2.1,2.9) {quasi-static};
\filldraw[black!70] (1,3.4) circle (2.2pt) node[above right,black]{$a$};
\filldraw[black!70] (5,0.9) circle (2.2pt) node[above right,black]{$b$};
\draw[black,thick,dashed] (1,3.4) .. controls (1.5,2.0) and (4.6,2.6) .. (5,0.9);
\node[black] at (4.0,2.55) {irreversible};
\end{tikzpicture}
$$

## The zeroth law and empirical temperature

Temperature enters thermodynamics not as a primitive but as a consequence of an
empirical regularity about thermal equilibrium. Write $A \sim B$ for "$A$ and $B$
are in thermal equilibrium when placed in diathermal contact" — meaning no net
heat flows and their state variables cease to change.

> **Zeroth law of thermodynamics.** If two systems are each in thermal
> equilibrium with a third, they are in thermal equilibrium with each other:
> $A \sim C$ and $B \sim C$ imply $A \sim B$.

The relation $\sim$ is trivially reflexive and symmetric; the zeroth law asserts
that it is also **transitive**, hence an equivalence relation. That is the entire
content of the law, and it is not a logical necessity — one can imagine a world
where it fails — but an experimental fact.

$$
% caption: The zeroth law makes thermal equilibrium transitive: if $A$ and $B$ each equilibrate with the reference body $C$, they equilibrate with each other, so all three share one label.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\node[draw,black,thick,fill=black!8,minimum size=1.0cm] (A) at (0,0) {$A$};
\node[draw,black,thick,fill=black!8,minimum size=1.0cm] (B) at (4,0) {$B$};
\node[draw,black,thick,fill=black!8,minimum size=1.0cm] (C) at (2,2.6) {$C$};
\draw[<->,black,thick] (A)--(C) node[midway,above left]{equilib.};
\draw[<->,black,thick] (B)--(C) node[midway,above right]{equilib.};
\draw[<->,acc,very thick,dashed] (A)--(B) node[midway,below]{therefore equilib.};
\end{tikzpicture}
$$

Because $\sim$ is an equivalence relation, it partitions all systems into
disjoint classes, each class comprising the systems that are mutually in thermal
equilibrium. **Temperature** is the label attached to a class: two systems have
the same temperature iff they belong to the same class, iff they would not
exchange net heat in diathermal contact. Any monotone relabeling of the classes
is an equally valid **empirical temperature**; the zeroth law guarantees that
some consistent labeling exists but does not single one out. Fixing a definite
scale requires a thermometer.

## The ideal-gas thermometer and the equation of state

A **thermometer** is a system with one easily read state variable — a mercury
column's length, a resistor's resistance, a gas's pressure — that is brought to
thermal equilibrium with the body of interest and calibrated to report
temperature. Different thermometric substances agree only if their thermometric
variables happen to track one another, which in general they do not, so the
reading depends on the choice of substance.

The dilute gas escapes this ambiguity. Every gas, in the limit of vanishing
density, obeys the same relation between pressure, volume, and temperature. Held
at fixed volume, the pressure of a dilute gas is linear in the empirical
temperature, and extrapolating the pressure to zero defines a substance-
independent zero. Fixing one reference point — the triple point of water, assigned
$273.16\ \mathrm{K}$ — sets the **ideal-gas (absolute) temperature**

$$
T = 273.16\ \mathrm{K}\times \lim_{P_{\rm tp}\to 0}\frac{P}{P_{\rm tp}},
$$

with $P$ and $P_{\rm tp}$ the fixed-volume pressures at the measured temperature
and at the triple point.[^kelvin] The limit removes the residual dependence on
which gas fills the bulb. This absolute scale later coincides exactly with the
thermodynamic temperature defined by the Carnot efficiency, a coincidence proved
in the second-law lesson.

[^kelvin]: Schroeder, §1.1. Since the 2019 SI redefinition the kelvin is fixed
instead by assigning the Boltzmann constant the exact value
$k_B = 1.380\,649\times 10^{-23}\ \mathrm{J\,K^{-1}}$; the triple-point value
$273.16\ \mathrm{K}$ is now a measured quantity. See NIST,
<https://physics.nist.gov/cuu/Constants/>.

For $N$ molecules the dilute-gas relations combine into the **ideal-gas equation
of state**,

$$
PV = N k_B T = n R T,
$$

where $n = N/N_A$ is the mole number, $R = N_A k_B = 8.314\ \mathrm{J\,mol^{-1}\,K^{-1}}$
the gas constant, and $N_A$ Avogadro's number. This is the archetype of an
**equation of state**: a relation $f(P,V,T,N)=0$ constraining the state variables
of an equilibrium system. It reduces the independent variables of a simple fluid
from three to two and defines a two-dimensional **equation-of-state surface** in
$(P,V,T)$ space. Every equilibrium state of the fluid is a point on that surface;
a quasi-static process is a curve drawn on it.

$$
% caption: The ideal-gas equation of state is a surface in $(P,V,T)$ space; curves of constant temperature (isotherms) project onto the $P$–$V$ plane as the hyperbolas $PV=\text{const}$, steeper at higher $T$.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}\draw[->,black] (0,0)--(5.4,0) node[right,black]{$V$};
\draw[->,black] (0,0)--(0,4.2) node[above,black]{$P$};
\draw[very thick] plot[domain=0.7:5,samples=60] (\x,{1.1/\x});
\draw[thick] plot[domain=1.0:5,samples=60] (\x,{2.2/\x});
\draw[thick] plot[domain=1.3:5,samples=60] (\x,{3.6/\x});
\node[right] at (5.0,{1.1/5.0+0.15}) {low $T$};
\node[right] at (5.0,{3.6/5.0+0.2}) {high $T$};
\node[black] at (3.2,2.7) {isotherms $PV=Nk_BT$};
\end{tikzpicture}
$$

An equation of state is only part of the thermodynamic description. It fixes the
mechanical relation among $P$, $V$, and $T$ but says nothing on its own about the
energy content or entropy; those require a second relation, the caloric equation
of state $U(T,V)$, developed with the first law next. The two together, or
equivalently a single fundamental relation such as $S(U,V,N)$, contain the
complete thermodynamics of the system — the object the ensembles are built to
compute.

## Summary

- A thermodynamic system is delimited by walls classified by what they pass:
  diathermal (heat), adiabatic (none), rigid (no work), permeable (matter). A
  reservoir is a system large enough to hold its intensive variables fixed under
  exchange.
- State variables are fixed by the current equilibrium state; they are extensive
  or intensive and pair into conjugates $(P,V)$, $(T,S)$, $(\mu,N)$. State
  functions have exact differentials; heat and work are path-dependent process
  quantities with inexact $\delta Q$, $\delta W$.
- A quasi-static process passes through equilibrium states so that $P$ and $T$
  stay defined; a reversible process is quasi-static and additionally free of
  dissipation, returnable with no net change in the surroundings.
- The zeroth law makes thermal equilibrium transitive, hence an equivalence
  relation whose classes are labeled by temperature. The dilute-gas limit fixes a
  substance-independent absolute scale, and the ideal-gas law $PV=Nk_BT$ is the
  archetypal equation of state, a surface in $(P,V,T)$ space.
