Pressure from the partition function

In equilibrium, pressure is obtained by differentiating log Z (or log Ξ) with respect to volume at fixed temperature (and chemical potential if applicable).
Pressure from the partition function

Definition (canonical pressure).
In the , the pressure is defined thermodynamically by

p=(FV)T,N, p = -\left(\frac{\partial F}{\partial V}\right)_{T,N},

where FF is the . Using F=kBTlnZF=-k_B T\ln Z with the Z(β,V,N)Z(\beta,V,N), this becomes the standard partition-function formula

p=1β(VlnZ(β,V,N))β,N. p = \frac{1}{\beta}\left(\frac{\partial}{\partial V}\ln Z(\beta,V,N)\right)_{\beta,N}.

This identity is one of the central instances of .

Grand canonical form.
In the , with Ξ(β,μ,V)\Xi(\beta,\mu,V),

p=1β(VlnΞ(β,μ,V))β,μ. p = \frac{1}{\beta}\left(\frac{\partial}{\partial V}\ln \Xi(\beta,\mu,V)\right)_{\beta,\mu}.

For homogeneous systems in the , lnΞ\ln \Xi is extensive in VV, and one commonly writes the equivalent scaling relation

p=1βVlnΞ(β,μ,V)(in the limit of large V, under translation invariance). p = \frac{1}{\beta V}\,\ln \Xi(\beta,\mu,V) \quad\text{(in the limit of large }V\text{, under translation invariance).}

Physical interpretation.
Pressure measures the reversible work required to change volume: dWrev=pdVdW_{\text{rev}} = -p\,dV. The partition function ZZ (or Ξ\Xi) encodes how the weighted count of microstates changes when the accessible configuration space expands or contracts. Differentiating lnZ\ln Z with respect to VV extracts precisely that response, producing the macroscopic force per area. This statistical definition is consistent with .

Example (ideal gas).
For a classical ideal gas, Z(β,V,N)Z(\beta,V,N) is proportional to VNV^N, so lnZ=NlnV+(terms independent of V)\ln Z = N\ln V + \text{(terms independent of }V), and the formula above yields

pV=NkBT. pV = Nk_B T.

Lattice systems note.
On a lattice in a finite region Λ\Lambda, “volume” is Λ|\Lambda|. One often defines the (dimensionless) pressure/free-energy density as limΛΛ1lnZΛ\lim_{|\Lambda|\to\infty} |\Lambda|^{-1}\ln Z_\Lambda, which is the lattice analogue of the continuum scaling behind the formulas above.