2. The Postulates of Thermodynamics
Thermodynamics has three important ingredients: fundamental relations, which describe the relationship between state functions for a particular system; postulates that make statements about the state functions from which all other thermodynamic statements can be derived; and a body of mathematical manipulations that allows one to derive theorems from the postulates, and manipulate the fundamental relations in order to obtain the desired result.
It is worth noting at this stage that fundamental relations cannot be derived from the postulates. The postulates provide some constraint on what is a valid fundamental relation, but otherwise leave a lot of freedom. Fundamental relations must be determined either empirically, or through a model. Statistical mechanics provides a means of deriving fundamental relations from the most generally valid of models, dynamics, either classical or quantum. For now, we will assume that fundamental relations have been obtained via measurement or from a model, and we only manipulate them.
We begin with the postulates of thermodynamics before considering their mathematical manipulation. The postulates are like axioms in mathematics, but with one important difference: they can actually be derived as special cases of the postulates of statistical mechanics, by letting the particle number go to infinity.
Postulate 0: Equilibrium States 

Simple systems have equilibrium states which are fully characterized by a unique set of extensive state functions \(\{U, X_i\}\), where \(U\) is the internal energy of the system (energy for short) and \(X_i\) are other required positive extensive state functions (e.g. \(V\), \(A\), \(L\), \(n_i\), etc.) 
Lemma 

A composite system also has a unique set \(\{U, X_{i\}}\) where \(U=\sum_k U_k\) and \(X_i=\sum_k X_{ik}\); however, this set does not fully characterize the composite system unless the constraints are also specified. 
Postulate 1: Consevation of Energy 

The quantity \(U\) is conserved for a closed system. 
Notes:
 U is usually a relative energy, not an absolute energy. For example, stating that \(U = 0\) under standard conditions for O_{2} neglects the nuclear energy, which however does not change during a chemical reaction. For the second and third postulates, only relative energies U are important.
 Relativistically, \(mc^2\) is a form of energy not conserved by itself. Chemically, mass is conserved; actually, even atomic nuclei are conserved. Strictly speaking, even for a free particle, \[U^2 = p^2c^2 + m^2c^4\].
Postulate 2: Closed Systems 

For a set of simple systems \(\{S_k\}\), there exist singlevalued, continuous, and differentiable extensive state functions \(S_k(U_k, X_{ik})\), defined for stable equilibrium states, such that for a closed composite system \(\{S\}=\sum_k \oplus \{s_k\}\), the state functions \(U_k\) and \(X_{ik}\) take on those values that maximize the entropy \(S=\sum S_k\) of the composite system, subject to its internal constraints. 
Notes:
 \(S_k=S_k(U_k, N_{ik})\) or \(S=\sum_k S_k\) are called the fundamental relations. Think of the \(S_k\) as entropies of the subsystems, and \(S\) as the total entropy of the closed system.
 When dealing only with simple systems, the subscripts k will usually be dropped.
 The total energy \(U=\sum_k U_k\) of the closed composite system is of course conserved even while \(S\) is maximized, alternatively if S is held constant we shall see that U is minimized.
 “Stable” means \(d^2S < 0\) so a welldefined maximum exists.
Postulate 3 

\(S\) is a monotonically increasing function of U and , where is a vector of all independent extensive variables of the closed composite system. 
Note: This will later be seen equivalent to the statement
\[\lim_{t \rightarrow 0} S=0\]
because
\[ \left( \dfrac{\partial U}{\partial S} \right)_x = T\].
We now can outline a method for the general solution of thermodynamic problems:
 Identify subsystems \(\{S_k\}\) of the system \(\{S\}\) (e.g. open system and reservoir).
 Determine fundamental relations \(S_k(U_k, N_{ik})\) (empirically or from model)
 Differentiate to maximize \(S=\sum_kS_k\), subject to constraints (e.g. by Lagrange multipliers)
 \(U_k\) and \(X_{ik}\) at maximum are the equilibrium conditions
Example 2.1 

Consider the following example of this method: a closed box is partitioned into volumes \(V_1\) and \(V_2\) by an impermeable wall, each side of which is filled with \(n_1\) and \(n_2\) moles of a gas having the fundamental relation \(S_k = c + n_kR\ln V_k\). When equilibrium is reached, what is the relationship between volumes \(V_1\) and \(V_2\)?

The main problem with this approach using the postulates directly is that the fundamental relations usually are unknown! Instead, partial information about the system in the form of equations of state such as \(PV=nRT\), \(U = 3/2 nRT\) is usually available, and one must see what information can be extracted from them subject to the known constraints. Note that thermodynamics provides no clue as to the functional nature of \(S(U, N_i)\), except that it must be compatible with the postulates. As we will see in the next chapter, the fundamental relations can be obtained if enough equations of state are known.