Statistical mechanics is a branch of physics that uses probability theory and statistics to explain the macroscopic thermodynamic behavior of systems composed of a large number of microscopic particles (such as atoms or molecules). By averaging over the possible microscopic states consistent with given macroscopic constraints (e.g., energy, volume, particle number), it provides a rigorous foundation for classical thermodynamics and extends it to non‑equilibrium phenomena. Key concepts include ensembles, partition functions, and the principle of maximum entropy.

1 Fundamentals

1.1 Microstates and Macrostates

A microstate specifies the exact positions and momenta (or quantum states) of all particles in a system, while a macrostate is defined by a small set of measurable thermodynamic variables (e.g., total energy \(E\), volume \(V\), number of particles \(N\)). Many microstates can correspond to a single macrostate; the number of such microstates is called the multiplicity \(\Omega\). Statistical mechanics postulates that, for an isolated system in equilibrium, all accessible microstates are equally probable.

1.2 Phase Space and Liouville’s Theorem

Classical phase space is a \(6N\)-dimensional space spanned by the coordinates and momenta of \(N\) particles. The time evolution of a system is represented by a trajectory in this space. Liouville’s theorem states that the density of a swarm of systems in phase space remains constant along any trajectory if the dynamics are Hamiltonian. This conservation underpins the equal‑a‑priori probability postulate and the definition of statistical ensembles.

1.3 Ensembles

An ensemble is a large collection of virtual copies of a system, each in one possible microstate consistent with the same macroscopic constraints. Different ensembles correspond to different types of thermal contact with a reservoir.

1.3.1 Microcanonical Ensemble

The microcanonical ensemble describes an isolated system with fixed \(E\), \(V\), and \(N\). All microstates sharing these fixed values are equally probable. The entropy is given by \(S = k_B \ln\Omega\), where \(k_B\) is Boltzmann’s constant.

1.3.2 Canonical Ensemble

The canonical ensemble describes a system in thermal contact with a heat bath at temperature \(T\). The system can exchange energy but not particles or volume.

1.3.2.1 Boltzmann Factor

The probability of a microstate with energy \(E_i\) is proportional to \(\exp(-E_i/k_B T)\), known as the Boltzmann factor.

1.3.2.2 Partition Function

The canonical partition function \(Z = \sum_i \exp(-E_i/k_B T)\) normalizes the probabilities and encodes all thermodynamic information. Thermodynamic quantities, such as the average energy and the Helmholtz free energy, are derived from \(Z\).

1.3.3 Grand Canonical Ensemble

The grand canonical ensemble describes a system in contact with both a heat bath and a particle reservoir, thus exchanging energy and particles while keeping \(V\) and \(T\) fixed.

1.3.3.1 Grand Potential

The grand potential \(\Phi = -k_B T \ln \Xi\), where \(\Xi\) is the grand partition function, yields the pressure, particle number, and other thermodynamic variables. It is related to the Gibbs free energy by \(\Phi = -PV\).

1.4 Ergodic Hypothesis

The ergodic hypothesis asserts that, over a long time, a system’s trajectory in phase space will visit all microstates consistent with the macroscopic constraints. This allows ensemble averages to be equated with time averages, justifying the use of statistical ensembles for equilibrium systems.

2 Thermodynamic Connection

2.1 Entropy and the Boltzmann Formula

The Boltzmann formula \(S = k_B \ln \Omega\) (carved on Boltzmann’s tombstone) directly links the microscopic multiplicity to macroscopic entropy. In the canonical ensemble, entropy can also be expressed as \(S = -k_B \sum_i p_i \ln p_i\), where \(p_i\) are microstate probabilities.

2.2 Free Energy and Thermodynamic Potentials

Thermodynamic potentials derived from partition functions provide the fundamental relations for equilibrium systems.

2.2.1 Helmholtz Free Energy

The Helmholtz free energy is \(F = -k_B T \ln Z\). For a system at constant \(T\) and \(V\), the equilibrium state minimizes \(F\). From \(F\) one obtains pressure, entropy, and chemical potential by differentiation.

2.2.2 Gibbs Free Energy

The Gibbs free energy \(G = F + PV\) is appropriate for constant \(T\) and \(P\). It is related to the chemical potential \(\mu\) by \(G = \mu N\) for a pure substance.

2.3 Temperature, Pressure, and Chemical Potential

From the fundamental thermodynamic relation \(dE = T\,dS - P\,dV + \mu\,dN\), temperature is defined as \(T = (\partial E/\partial S)_{V,N}\), pressure as \(P = -(\partial E/\partial V)_{S,N}\), and chemical potential as \(\mu = (\partial E/\partial N)_{S,V}\). In statistical mechanics, these quantities emerge as ensemble averages or derivatives of the partition function.

3 Classical Statistical Mechanics

3.1 Ideal Gases

The ideal gas is a model where particles interact only through elastic collisions, with negligible potential energy.

3.1.1 Maxwell–Boltzmann Distribution

The Maxwell–Boltzmann distribution gives the probability density for the speeds of particles in a classical ideal gas: \(f(v) \propto v^2 \exp(-mv^2/2k_B T)\). This result follows from the Boltzmann factor and the density of states in momentum space.

3.1.2 Equipartition Theorem

The equipartition theorem states that each quadratic degree of freedom contributes \(\frac{1}{2} k_B T\) to the average energy. For a monatomic ideal gas, this yields \(\langle E \rangle = \frac{3}{2} N k_B T\). The theorem holds for classical systems with degrees of freedom appearing in the Hamiltonian as squares.

3.1.3 Sackur–Tetrode Equation

The Sackur–Tetrode equation gives the entropy of a monatomic ideal gas in the classical limit: \(S = Nk_B \left[ \ln\left(\frac{V}{N\lambda^3}\right) + \frac{5}{2} \right]\), where \(\lambda = h/\sqrt{2\pi m k_B T}\) is the thermal de Broglie wavelength. It resolves the Gibbs paradox by incorporating indistinguishability through the factor \(1/N!\).

3.2 Non‑Ideal Gases

Real gases exhibit interactions that lead to deviations from the ideal gas law.

3.2.1 Virial Expansion

The virial expansion expresses the equation of state as \(PV = Nk_B T \left(1 + B_2(T)\frac{N}{V} + B_3(T)\frac{N^2}{V^2} + \cdots\right)\), where \(B_2, B_3, \ldots\) are virial coefficients derived from interparticle potentials.

3.2.2 Van der Waals Equation of State

The van der Waals equation \((P + a N^2/V^2)(V - N b) = N k_B T\) incorporates a mean‑field attraction (parameter \(a\)) and a hard‑core repulsion (parameter \(b\)). It qualitatively describes the liquid–gas phase transition and the critical point.

4 Quantum Statistical Mechanics

4.1 Quantum Ensembles

Quantum statistical mechanics treats particles as indistinguishable quantum objects, using the density operator formalism.

4.1.1 Density Operator

The density operator \(\hat{\rho}\) (or density matrix) describes a statistical mixture of quantum states. Its trace equals one, and expectation values are given by \(\langle \hat{A} \rangle = \mathrm{Tr}(\hat{\rho} \hat{A})\). For an equilibrium ensemble, \(\hat{\rho} = e^{-\beta \hat{H}}/Z\), where \(\hat{H}\) is the Hamiltonian.

4.1.2 Quantum Partition Functions

The partition function is \(Z = \mathrm{Tr}\, e^{-\beta \hat{H}}\). In the grand canonical ensemble, the grand partition function is \(\Xi = \mathrm{Tr}\, e^{-\beta(\hat{H} - \mu \hat{N})}\), where \(\hat{N}\) is the number operator.

4.2 Quantum Ideal Gases

Quantum ideal gases are classified by the spin statistics of the particles: bosons (integer spin) and fermions (half‑integer spin).

4.2.1 Bose–Einstein Statistics

Bose–Einstein statistics apply to bosons, which are symmetric under exchange. The average occupation number for energy level \(i\) is \(\langle n_i \rangle = 1/(e^{\beta(\epsilon_i - \mu)} - 1)\).

4.2.1.1 Photon Gas and Black‑Body Radiation

A photon gas consists of massless bosons with \(\mu = 0\). The Planck distribution \(\langle n(\omega) \rangle = 1/(e^{\hbar\omega/k_B T} - 1)\) leads to the Stefan–Boltzmann law and the Wien displacement law, describing black‑body radiation.

4.2.1.2 Bose–Einstein Condensation

Bose–Einstein condensation (BEC) occurs at low temperatures when a macroscopic fraction of bosons occupies the ground state. The critical temperature for a uniform ideal Bose gas is \(T_c = (2\pi\hbar^2/mk_B)(n/2.612)^{2/3}\). BEC was first observed in dilute atomic gases in 1995.

4.2.2 Fermi–Dirac Statistics

Fermi–Dirac statistics apply to fermions, which obey the Pauli exclusion principle. The occupation number is \(\langle n_i \rangle = 1/(e^{\beta(\epsilon_i - \mu)} + 1)\).

4.2.2.1 Fermi Gas and Degeneracy Pressure

A Fermi gas at zero temperature fills all states up to the Fermi energy \(E_F\). The associated degeneracy pressure arises from the Pauli principle and stabilizes white dwarfs and neutron stars against gravitational collapse.

4.2.2.2 Electrons in Metals

The free‑electron model treats conduction electrons in a metal as a Fermi gas. It explains the electronic specific heat (linear in \(T\)) and the Pauli paramagnetism. The Fermi surface determines many transport and thermodynamic properties.

5 Phase Transitions and Critical Phenomena

5.1 Ising Model

The Ising model consists of spins \(\sigma_i = \pm 1\) on a lattice, with Hamiltonian \(H = -J \sum_{\langle i,j\rangle} \sigma_i \sigma_j - h \sum_i \sigma_i\). It is a paradigm for ferromagnetism and phase transitions.

5.1.1 MeanField Theory

Mean‑field theory approximates the interaction of a single spin with the average magnetization of its neighbors, reducing the problem to a self‑consistent equation. It predicts a second‑order phase transition at a critical temperature \(T_c\) and yields mean‑field critical exponents (e.g., \(\beta = 1/2\)).

5.1.2 Exact Solution in 1D and 2D

The one‑dimensional Ising model (with nearest‑neighbor interactions) has no phase transition at finite \(T\). In two dimensions, Lars Onsager (1944) solved the zero‑field Ising model exactly, obtaining the spontaneous magnetization and critical exponents (e.g., \(\beta = 1/8\)).

5.2 Landau Theory

Landau theory describes phase transitions using a free energy expanded in powers of an order parameter. For a continuous (second‑order) transition, the free energy near the critical point is analytic and symmetric in the order parameter.

5.2.1 Order Parameters

An order parameter is a thermodynamic quantity that is zero in the disordered phase and nonzero in the ordered phase (e.g., magnetization for a ferromagnet, density difference for a liquid–gas transition). Its behavior near the critical point defines critical exponents.

5.2.2 Critical Exponents and Universality

Critical exponents (e.g., \(\alpha\), \(\beta\), \(\gamma\), \(\nu\)) describe how thermodynamic quantities diverge or vanish near the critical point. Universality asserts that systems with the same spatial dimension and symmetry class share the same critical exponents, regardless of microscopic details.

5.3 Renormalization Group

The renormalization group (RG) is a framework for understanding scale invariance at critical points. By systematically integrating out short‑wavelength degrees of freedom, RG transformations reveal fixed points that control the critical behavior. The method accurately calculates critical exponents and explains universality.

6 Fluctuations and Non‑Equilibrium Statistical Mechanics

6.1 Fluctuation–Dissipation Theorem

The fluctuation–dissipation theorem relates the spontaneous fluctuations of a system at equilibrium to its linear response to an external perturbation. For example, the electrical noise (Johnson‑Nyquist noise) in a resistor is proportional to its resistance and temperature.

6.2 Brownian Motion and Langevin Equation

Brownian motion is the random motion of a particle suspended in a fluid, first described by Einstein (1905). The Langevin equation models this with a deterministic friction term and a stochastic force: \(m \dot{v} = -\gamma v + \xi(t)\), where \(\xi(t)\) is Gaussian white noise. The fluctuation–dissipation theorem ensures consistency with thermodynamics.

6.3 Time‑Correlation Functions

Time‑correlation functions measure how a dynamical variable at time \(t\) is correlated with its value at an earlier time. For example, the velocity autocorrelation function \(\langle v(t) v(0) \rangle\) determines the diffusion coefficient via the Green–Kubo relation.

6.4 Boltzmann Equation and Transport Phenomena

The Boltzmann equation describes the time evolution of a single‑particle distribution function \(f(\mathbf{r}, \mathbf{p}, t)\) under the influence of external forces and binary collisions. It is the foundation for kinetic theory and transport phenomena (e.g., viscosity, thermal conductivity, electrical conductivity). The H‑theorem provides a microscopic derivation of the increase of entropy in irreversible processes.