# Statistical mechanics
Statistical mechanics is the machinery that turns microscopic mechanics plus [[Probability_theory]] into [[Thermodynamics]]: given 10²³ molecules obeying [[Hamiltonian_mechanics]] (or [[Quantum_mechanics]]), it derives pressure, temperature, and [[Entropy]] as statements about *distributions* over [[Phase_space]] rather than about any particular trajectory. Built by [[James_Clerk_Maxwell]] (velocity distribution, 1860), [[Ludwig_Boltzmann]] (kinetic equation and H-theorem, 1872; S = k_B ln Ω, 1877), and [[Josiah_Willard_Gibbs]] (the ensemble formalism, 1902), it is physics' oldest and most successful theory of [[Emergence]]: temperature is meaningless for one molecule and inevitable for a mole. Its stance — ignore the trajectory, count the [[Microstate_(statistical_mechanics)|microstates]] — has since escaped physics entirely, powering the [[Monte_Carlo_method]], models of magnetism and matter at the [[Critical_point_(thermodynamics)]], and the statistical treatment of networks, automata, and learning machines.
## Microstates, macrostates, and S = k_B ln Ω
A macrostate ("1 mol of gas at 300 K in 22 L") is compatible with an astronomical number Ω of [[Microstate_(statistical_mechanics)|microstates]] — exact molecular positions and momenta. Boltzmann's 1877 identification
S = k_B ln Ω, k_B = 1.380649×10⁻²³ J/K (exact since 2019)
says the thermodynamic [[Entropy]] that [[Rudolf_Clausius]] had defined through heat engines (1865) is just the logarithm of that count. The logarithm makes entropy additive when systems combine (Ω multiplies), and the [[Second_law_of_thermodynamics]] stops being a mysterious decree: macrostates with more microstates are overwhelmingly more probable, and for N ~ 10²³ "overwhelmingly" means deviations of order 1/√N — a part in 10¹¹. Irreversibility is not in the equations of motion, which are time-symmetric; it is in the counting, plus a low-entropy past. [[Henri_Poincaré]]'s recurrence theorem guarantees a gas will eventually reassemble in its corner — after times that dwarf the age of the universe.
## Ensembles, Liouville, and the ergodic gamble
Gibbs replaced "one system followed forever" with an *ensemble*: a probability cloud over [[Phase_space]], evolving as an incompressible fluid by [[Liouville's_theorem_(Hamiltonian)]]. Three ensembles do most work: microcanonical (isolated, energy fixed), canonical (thermostatted at T, states weighted by the Boltzmann factor e^(−E/k_BT)), and grand canonical (particle exchange allowed). Their equivalence for large N is a theorem in good cases, not an assumption. The quiet gamble underneath is ergodicity: that the time average a thermometer measures equals the ensemble average theory computes. For which [[Dynamical_system|dynamical systems]] this actually holds is deep and mostly open — hard-sphere gases yes (Sinai, 1960s-70s), integrable systems no, glasses conspicuously not — yet the formalism works even where the proof is missing, one of the honest scandals of the subject.
## The partition function: one sum that knows everything
For the canonical ensemble every equilibrium property flows from a single generating object,
Z = Σᵢ e^(−Eᵢ/k_B T), F = −k_B T ln Z,
where F is the Helmholtz free [[Energy]]: derivatives of ln Z yield mean energy, pressure, entropy, heat capacity, fluctuations. Equipartition follows: each quadratic degree of freedom carries ½k_BT on average, which nails the [[Kinetic_theory_of_gases]] result for monatomic heat capacities and the speed distribution over [[Hydrogen]] or [[Argon]] alike. Its failures were more productive still: frozen vibrational modes in diatomic gases and the ultraviolet catastrophe in radiation could not be fixed classically — Planck's 1900 quantization of oscillator energies, injected precisely into this machinery, is where [[Quantum_mechanics]] began. Computing Z for interacting systems is generally impossible in closed form; that is exactly what the Metropolis [[Monte_Carlo_method]] (1953) samples around, and what makes exactly solvable cases precious.
## Fluctuations, phase transitions, criticality
With interactions, ensembles can develop singularities in the thermodynamic limit: [[Phase_transition]]s. The Ising model (1925) — spins ±1 on a lattice, nearest-neighbor coupling — was solved in two dimensions by Onsager (1944), proving that short-range interactions alone generate spontaneous magnetization, symmetry breaking, and a genuine [[Critical_point_(thermodynamics)]]. Near criticality, fluctuations stop obeying 1/√N: the correlation length diverges, response functions blow up, and microscopically different systems (magnet, fluid, alloy) share identical critical exponents — universality, explained by renormalization-group coarse-graining (Wilson, early 1970s). This is the template for modern [[Complex_system]] science: [[Self-organized_criticality]], percolation on lattices and graphs, and avalanche statistics all run on the same mathematics of scale-free fluctuation, and [[Pattern_formation]] far from equilibrium borrows its order parameters.
## Quantum statistics: bosons, fermions, and cold matter
Identical quantum particles are counted differently. Symmetric wavefunctions ([[Boson]]s, integer [[Spin_(physics)]]) obey Bose–Einstein statistics; antisymmetric ones ([[Fermion]]s) obey Fermi–Dirac, both formulated 1924–1926. Consequences are macroscopic: bosons pile into one state below a critical temperature — the [[Bose–Einstein_condensate]], realized in dilute gases in 1995 — and the same statistics underlies [[Superfluidity]], with [[Superfluid_helium-4]] appearing below the 2.17 K [[Lambda_point]] and [[Helium-3]] condensing only via pairing near 2.5 mK; fermionic exclusion produces degeneracy pressure, electron bands, and the stability of matter itself. [[Superconductivity]] is Bose–Einstein condensation of paired [[Electron]]s. All of it is partition-function arithmetic with the counting rule changed.
## The method beyond physics
Because it is really a theory of inference over enormous state spaces, statistical mechanics exports well. Shannon's [[Entropy_(information_theory)]] (1948) is formally Gibbs entropy, and Jaynes (1957) recast equilibrium ensembles as maximum-entropy inference — the bridge between [[Information_theory]] and [[Thermodynamics]] that [[Claude_Shannon]] himself left implicit. Spin models live on arbitrary [[Graph_theory|graphs]], giving exponential random graphs in [[Network_theory]]; [[Cellular_automaton]] gases reproduce hydrodynamics; Hopfield networks and Boltzmann machines made the Ising model a [[Neural_network_(machine_learning)]], ancestral to modern [[Machine_learning]]. Wherever a [[Complex_system]] has many parts and a countable state space — traffic, flocking, epidemics on networks — the microstate-to-macrostate playbook applies.
**On the spine:** [[Thermodynamics]] · [[Entropy]] · [[Phase_space]] · [[Ludwig_Boltzmann]] · [[Phase_transition]] · [[Monte_Carlo_method]].
## Wikipedia : Wikitube
**Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Statistical_mechanics) : [Wikitube](https://en.wikitube.io/wiki/Statistical_mechanics)
## Previous hub tags
Hubs: `Systems`. Portals: [[PORTAL_Systems]], [[PORTAL_Dynamical_system]], [[PORTAL_Network_theory]], [[PORTAL_Cellular_automaton]], [[PORTAL_Phase_space]].
---
*Repopulated 2026-08-12 · redlink fill · 0 deletions.*