In the previous post, I talked about the second law of thermodynamics: there can be do thermodynamic transformation whose overall effect is to move heat from a cooler body to a hotter one. Since the *reverse* of such a transformation (moving heat from a hotter body to a cooler one) happens naturally by conduction, the second law naturally contains an element of *irreversibility* which it is natural to expect is expressed by an *inequality*. The quantity to which this applies is the famous **entropy**.

As in the previous post, consider a heat engine operating between two heat reservoirs, the “hot” side at absolute temperature \(t_1\) and the “cold” side at temperature \(t_2\). From Carnot’s formulation of the second law of thermodynamics we know that the efficiency of our engine can be at most \(1-t_2/t_1\), which is the efficiency of the Carnot engine (or any other reversible engine). Let \(Q_1,Q_2\) be the quantities of heat energy delivered to the engine by the two reservoirs (and watch the signs! we expect \(Q_2\) to be negative). Then the efficiency is \(1+Q_2/Q_1\) and, writing that this is less than \(1-t_2/t_1\) and rearranging things a bit we get

\[ \frac{Q_1}{t_1} + \frac{Q_2}{t_2} \le 0 \]

with equality only for a reversible engine.

Now it is natural to generalize the above inequality to a more complicated engine, exchanging heat with \(n\) reservoirs successively, at temperatures \(t_1,\ldots,t_n\); it is no surprise that we get the generalized formulation \(\sum Q_i/t_i \le 0 \). Finally, let \(n\) go to infinity, replace the sum by an integral, and obtain that

\[ \oint \frac{dQ}{t} \le 0 \]

over any cycle, with equality for reversible cycles.

**Remark** From its origins in the theory of heat engines, one sees that in the above inequality, \(t\) is the temperature of the heat bath with which the system is instantaneously in contact; this may not be the same as the temperature of the system itself. However, for a *reversible* engine, these temperatures must agree (simply because the flow of heat by conduction is irreversible); thus, for reversible cycles, \(\oint dQ/t = 0 \) where \(t\) may be taken to denote the *system* temperature.

From the above remark, we may define a function \(S\) of the equilibrium states of the system by picking an arbitrary reference state and then integrating the 1-form \(dQ/t\) along any path of equilibrium states. This defines \(S\) up to an additive constant. \(S\) is the **entropy**, and Carnot’s principle becomes the statement that no transformation can decrease the entropy of any isolated system – and, unless the transformation is reversible, it must strictly increase it.