Legendre transform from internal energy to Gibbs free energy

Construct Gibbs free energy by Legendre transforming internal energy in both entropy and volume (replace S,V by T,p).
Legendre transform from internal energy to Gibbs free energy

Let the internal energy be written in the energy representation U=U(S,V,N)U=U(S,V,N) (see ). The conjugate variables are temperature T=(U/S)V,NT=(\partial U/\partial S)_{V,N} and pressure p=(U/V)S,Np=-(\partial U/\partial V)_{S,N}.

Definition (Gibbs free energy as a double Legendre transform).
The Gibbs free energy G(T,p,N)G(T,p,N) is obtained by trading (S,V)(S,V) for (T,p)(T,p) via a two-variable :

G(T,p,N)=minS,V{U(S,V,N)TS+pV}. G(T,p,N)=\min_{S,V}\Bigl\{\,U(S,V,N)-T\,S+p\,V\Bigr\}.

At the minimizer (S,V)(S^\star,V^\star), the stationarity conditions enforce

T=(US)V,N(S,V),p=(UV)S,N(S,V). T=\left(\frac{\partial U}{\partial S}\right)_{V,N}\Bigg|_{(S^\star,V^\star)}, \qquad p=-\left(\frac{\partial U}{\partial V}\right)_{S,N}\Bigg|_{(S^\star,V^\star)}.

Equivalently, one can perform the transform sequentially: first form H(S,p,N)H(S,p,N) by transforming in VV, then transform in SS to get G=HTSG=H-T S; or start from and transform in VV to get G=F+pVG=F+pV at the volume where p=(F/V)T,Np=-(\partial F/\partial V)_{T,N}.

Differential and physical meaning.
The Gibbs free energy obeys

dG=SdT+Vdp+μdN, dG=-S\,dT+V\,dp+\mu\,dN,

so at fixed (T,p,N)(T,p,N) the equilibrium macrostate minimizes GG. This is why GG (the ) governs phase coexistence and chemical equilibrium under laboratory conditions where TT and pp are controlled.

Statistical-mechanical representation.
In the , GG is obtained from the Δ(T,p,N)\Delta(T,p,N) by the same rule as other equilibrium potentials:

G(T,p,N)=kBTlogΔ(T,p,N). G(T,p,N)=-k_B T\log \Delta(T,p,N).

Derivatives of GG recover response variables; for example, the chemical potential satisfies μ=(G/N)T,p\mu=(\partial G/\partial N)_{T,p}, connecting this construction to and .