Temperature, Pressure and Chemical Potential from Entropy Maximization
Statement
For an isolated composite of two subsystems free to exchange energy, volume and particles across a movable, permeable wall, maximizing the total entropy \( S = S_A + S_B \) at fixed total energy, volume and particle number forces the intensive quantities \( \left(\dfrac{\partial S}{\partial E}\right)_{V,N} \), \( \left(\dfrac{\partial S}{\partial V}\right)_{E,N} \) and \( \left(\dfrac{\partial S}{\partial N}\right)_{E,V} \) to be equal across the wall. Identifying these common equilibrium values with temperature, pressure and chemical potential defines \( \dfrac{1}{T} \equiv \left(\dfrac{\partial S}{\partial E}\right)_{V,N} \), \( \dfrac{p}{T} \equiv \left(\dfrac{\partial S}{\partial V}\right)_{E,N} \) and \( \dfrac{\mu}{T} \equiv -\left(\dfrac{\partial S}{\partial N}\right)_{E,V} \).
Why it matters
These three partial derivatives are the bridge between statistical mechanics and classical thermodynamics. Once entropy is known as a function of the extensive variables \( (E,V,N) \) — the fundamental relation \( S(E,V,N) \) — every equation of state, every heat capacity and every phase boundary follows by differentiation. Temperature, pressure and chemical potential are not imposed from outside; they are read off the entropy surface.
The derivation also explains why heat flows from hot to cold, why volume shifts toward lower pressure, and why particles migrate down a chemical-potential gradient: all three are the single statement that an isolated system moves to the macrostate of overwhelmingly greatest multiplicity. Equilibrium is where that drive stops.
Assumptions
Derivation
Result
Reading. The entropy surface \( S(E,V,N) \) encodes all three intensive variables as its slopes. A steeper rise of entropy with energy means a colder body (larger \(1/T\)): adding a little energy buys a lot of extra multiplicity. Two bodies in contact equilibrate to a common slope in each direction, which is exactly \(T_A=T_B\), \(p_A=p_B\), \(\mu_A=\mu_B\). Off equilibrium, the second law \( dS_{\text{tot}}\ge 0 \) makes energy flow from high \(T\) to low \(T\), volume grow where \(p\) is higher, and particles move from high \(\mu\) to low \(\mu\).
Units check. \([S]=\mathrm{J\,K^{-1}}\), \([E]=\mathrm{J}\), so \([\partial S/\partial E]=\mathrm{K^{-1}}=[1/T]\). \([\partial S/\partial V]=\mathrm{J\,K^{-1}\,m^{-3}}=(\mathrm{Pa})/(\mathrm{K})=[p/T]\) since \(\mathrm{Pa}=\mathrm{J\,m^{-3}}\). \([\partial S/\partial N]=\mathrm{J\,K^{-1}}\) per particle \(=[\mu/T]\) with \([\mu]=\mathrm{J}\). All three definitions are dimensionally consistent.
Limiting cases
- Only energy exchange (rigid, impermeable wall): \(dV_A=dN_A=0\), so only \( \partial S_A/\partial E_A=\partial S_B/\partial E_B \) survives, i.e. \(T_A=T_B\) alone — the classic thermal-contact result.
- Movable but impermeable wall (diathermal piston): \(T_A=T_B\) and \(p_A=p_B\); particle numbers stay fixed.
- Fixed volume, permeable membrane: \(T_A=T_B\) and \(\mu_A=\mu_B\) — the setting of osmosis and semipermeable equilibria.
- Ideal gas, \( S = Nk_B\ln(E^{3/2}V/N^{5/2}) + \text{const} \): \( \partial S/\partial E = \tfrac{3}{2}Nk_B/E \) gives \( E=\tfrac{3}{2}Nk_BT \), and \( \partial S/\partial V = Nk_B/V \) gives \( pV=Nk_BT \). The definitions reproduce the equation of state.
- \( T\to 0 \): \( \partial S/\partial E\to\infty \); the entropy slope diverges and (by the third law) \(S\) flattens, so the intensive variables become singular near absolute zero.
Breaks when
- Non-additive / long-range interactions. For self-gravitating systems or unscreened Coulomb matter, \( S_{\text{tot}}\neq S_A+S_B \); the entropy can be non-concave and the "equal-slope" equilibrium is unstable — gravitating systems have negative heat capacity and heat flows the "wrong" way.
- First-order phase transition / phase coexistence. At a latent-heat plateau \( S(E) \) has a straight segment or a kink, so \( \partial S/\partial E \) is constant or undefined over a range; temperature stays fixed while energy changes, and the smooth maximization is replaced by the common-tangent (Maxwell) construction.
- Small systems. When \(N\) is not large the entropy maximum is broad, fluctuations of \(E_A\) are comparable to \(E_A\) itself, and a single sharp \(T\) does not exist — one must work with the full probability distribution, not its peak.
- Negative-temperature or bounded-spectrum systems. If the density of states decreases with energy (e.g. a spin system with an energy ceiling), \( \partial S/\partial E<0 \) so \(T<0\); the maximization still holds formally but "hotter than infinite" ordering inverts naive intuition.
Failure modes
- Sign error on \(\mu\). Writing \( \mu/T = +\partial S/\partial N \). The minus sign is required so that \( dE=T\,dS-p\,dV+\mu\,dN \) and so particles flow toward lower \(\mu\); dropping it reverses the direction of diffusion.
- Forgetting to reciprocate. Claiming \( T=\partial S/\partial E \) instead of \( 1/T=\partial S/\partial E \). Then temperature would go to zero as the entropy slope grows — backwards.
- Holding the wrong variables fixed. Evaluating \( \partial S/\partial E \) at fixed \(T\) or \(p\) rather than at fixed \(V,N\). The definitions are specifically the natural-variable derivatives of \( S(E,V,N) \).
- Treating \(dE_A\) and \(dE_B\) as independent. Ignoring \( dE_B=-dE_A \) and setting each subsystem's derivative to zero separately, which would wrongly force \( \partial S/\partial E=0 \) rather than an equality across the wall.
- Assuming the extremum is automatically a maximum. Skipping the concavity check; \( dS=0 \) also holds at unstable saddle points that trigger phase separation.
- Confusing chemical potential with a potential energy. Reading \(\mu\) as "the energy of one particle" rather than the entropic cost/benefit of adding a particle at fixed \(E,V\).
Discussion
The deep content is that temperature, pressure and chemical potential are defined by how entropy responds to changes in energy, volume and particle number — they are geometric slopes of the fundamental surface \( S(E,V,N) \), not primitive concepts. Classical thermodynamics postulates \( dE=T\,dS-p\,dV+\mu\,dN \); statistical mechanics, via \( S=k_B\ln\Omega \), derives it, giving each intensive variable a microscopic meaning. Temperature measures how sharply the number of accessible microstates grows with energy; a large heat capacity is just a slowly changing slope.
The equilibrium conditions \( T_A=T_B \), \( p_A=p_B \), \( \mu_A=\mu_B \) are the statistical origin of the zeroth law and of the direction of spontaneous change. Nothing here invokes forces or dynamics: the arrow of heat flow is pure counting. Energy redistributes to the partition \( (E_A,E_B) \) that has, by an astronomically large factor, the most microstates. That the peak is sharp — that macroscopic bodies have definite temperatures at all — rests on \(N\) being of order \(10^{23}\), which makes the Gaussian around the maximum vanishingly narrow.
At the next level of rigour the equalities are only the first-order (stationarity) conditions; genuine stability requires the entropy to be concave, \( d^2 S\le 0 \), equivalently that the Hessian of \( S(E,V,N) \) be negative-semidefinite. This yields the stability inequalities \( C_V\ge 0 \) and \( \kappa_T\ge 0 \): a fluctuation that moves energy or volume from \(A\) to \(B\) must lower the total entropy so the system returns. Where concavity fails — inside a spinodal, or for systems with long-range forces — the homogeneous state is not the entropy maximum, and the true maximum is an inhomogeneous, phase-separated configuration reached by the Maxwell common-tangent construction. This is why the same variational principle that defines \(T,p,\mu\) also predicts phase transitions.
Common misconceptions. A hotter body is not the one whose entropy increases faster with energy — the opposite: \( 1/T=\partial S/\partial E \) means the steeper slope is the colder body. Chemical potential is not a potential energy per particle; it is the entropic exchange rate \( -T\,\partial S/\partial N \) and can be negative (as for a classical ideal gas). And equilibrium is not the state of maximum entropy of one subsystem — it is the maximum of the total, which is why the condition is an equality between subsystems, not an extremum of either alone.
Worked examples
Reading. Heat flows from the hot block to the cold one until the entropy slopes match at \( T_f=320\ \mathrm{K} \); the total entropy rises by \(3.5\ \mathrm{J\,K^{-1}}\), confirming the process is spontaneous and irreversible.
Units check. \( C\ln(\cdot) \) has units \( \mathrm{J\,K^{-1}} \) (log is dimensionless), matching \(\Delta S\).
Reading. The piston settles where the volume slopes of entropy match, i.e. equal pressures; the gas with twice the moles claims twice the volume, both at \(\approx 2.5\ \mathrm{bar}\).
Units check. \( nRT/V = \mathrm{mol}\cdot\mathrm{J\,mol^{-1}K^{-1}}\cdot\mathrm{K}/\mathrm{m^3}=\mathrm{J\,m^{-3}}=\mathrm{Pa} \).
Problems
- Starting from \( S(E)=\tfrac{3}{2}Nk_B\ln E + \text{const} \) for a monatomic ideal gas at fixed \(V,N\), derive the relation between \(E\) and \(T\).
Solution
\( \frac{1}{T}=\frac{\partial S}{\partial E}=\frac{3}{2}\frac{Nk_B}{E} \), so \( E=\frac{3}{2}Nk_BT \). Each degree of freedom carries \( \tfrac{1}{2}k_BT \): three translational modes give \( \tfrac{3}{2}k_BT \) per atom, the equipartition result. - Two systems exchange only particles at fixed \(E,V\). Show that equilibrium requires equal chemical potential, and state the direction of particle flow if \( \mu_A>\mu_B \).
Solution
With \(dE_A=dV_A=0\), \( dS_{\text{tot}}=\big(\frac{\partial S_A}{\partial N_A}-\frac{\partial S_B}{\partial N_B}\big)dN_A=-\frac{1}{T}(\mu_A-\mu_B)dN_A \). Setting it to zero gives \( \mu_A=\mu_B \). If \( \mu_A>\mu_B \), then \( dS_{\text{tot}}>0 \) requires \( dN_A<0 \): particles leave \(A\) and flow to the lower-\(\mu\) system \(B\). - A block of heat capacity \( C=500\ \mathrm{J\,K^{-1}} \) at \( 400\ \mathrm{K} \) is placed in contact with a huge reservoir at \( 300\ \mathrm{K} \). Compute \(\Delta S_{\text{block}}\), \(\Delta S_{\text{reservoir}}\) and \(\Delta S_{\text{tot}}\).
Solution
\( \Delta S_{\text{block}}=C\ln\frac{300}{400}=500\ln 0.75=-143.8\ \mathrm{J\,K^{-1}} \). Heat given to reservoir \( Q=C(400-300)=5.0\times10^4\ \mathrm{J} \) at \(300\ \mathrm{K}\): \( \Delta S_{\text{res}}=+Q/T=50000/300=+166.7\ \mathrm{J\,K^{-1}} \). Total \( \Delta S_{\text{tot}}=+22.9\ \mathrm{J\,K^{-1}}>0 \), so the process is spontaneous. - For a two-level spin system the entropy as a function of energy is \( S(E)=k_B\ln\Omega(E) \) with \( \Omega \) peaked at \(E=0\) and decreasing for \(E>0\). Explain how \( 1/T=\partial S/\partial E \) can be negative and what "negative temperature" means physically.
Solution
Above the energy that maximizes \(\Omega\), adding energy reduces the number of microstates, so \( \partial S/\partial E<0 \) and \( T<0 \). Such a state has a population inversion (more spins in the high-energy level). It is "hotter than \(T=+\infty\)": placed in contact with any positive-\(T\) body it gives up energy. Negative \(T\) arises only for systems with a bounded energy spectrum, where \(\Omega\) is non-monotonic in \(E\). - A membrane permeable to solvent (not solute) separates pure solvent (side \(B\)) from a dilute solution (side \(A\)) at common \(T\). Using \( \mu_A=\mu_B \) for the solvent and the dilute-solution result \( \mu_A=\mu^0 - k_B T\, x_s + (\text{pressure term}) \) with solute mole fraction \(x_s\), derive the osmotic pressure \( \Pi \) (van 't Hoff). Take \( x_s=0.010 \), \( T=298\ \mathrm{K} \), solvent molar volume \( \bar v=1.8\times10^{-5}\ \mathrm{m^3\,mol^{-1}} \).
Solution
Equality of solvent chemical potential requires the pressure term to offset the concentration lowering: \( \bar v\,\Pi = R T\, x_s \) per mole, i.e. \( \Pi = \frac{RT\,x_s}{\bar v} \). Numerically \( \Pi = \frac{8.314\cdot 298\cdot 0.010}{1.8\times10^{-5}} \approx 1.38\times10^{6}\ \mathrm{Pa}\approx 13.6\ \mathrm{atm} \). Equivalently, in dilute form \( \Pi = c\,RT \) with \( c\approx x_s/\bar v \) the solute concentration — van 't Hoff's law, following directly from \( \mu_A=\mu_B \).