Skip to content
Tutorials Center
My learning

Topics

Statistical Mechanics Tutorial

Learn Statistical Mechanics step by step: 39 lessons in 9 chapters with examples, quizzes, diagrams and practice.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is Statistical Mechanics? Meet statistical mechanics: how the random motion of enormous numbers of atoms produces steady temperature, pressure and entropy, with a runnable simulation.
  2. 2 Probability for Physicists Review the probability you need for statistical mechanics: distributions, averages, variance, the binomial and Gaussian distributions, and why sums of many terms become sharp.
  3. 3 Combinatorics and Stirling's Approximation Count arrangements with factorials and binomial coefficients, then learn Stirling's approximation ln N! = N ln N - N, the tool behind entropy calculations.
  4. 4 Constants and Units: k_B, N_A, R and the Thermal Energy Learn the constants of statistical mechanics (Boltzmann, Avogadro, gas constant, Planck) with exact SI values, and how to compute kT in joules, electronvolts and kJ/mol.

Microstates, Macrostates and Entropy

  1. 5 Microstates and Macrostates Learn how microstates group into macrostates, compute multiplicities with binomial coefficients, and see why the most probable macrostate dominates, using coins and spins.
  2. 6 Counting the Einstein Solid Count the microstates of an Einstein solid with the stars-and-bars formula, verify by brute force in Python, and see how multiplicity explodes with energy and size.
  3. 7 Boltzmann Entropy: S = k ln ฮฉ Define entropy as S = k_B ln Omega, see why it must be a logarithm, and compute entropy changes for coins, spin systems and the free expansion of a gas.
  4. 8 Entropy and the Second Law Watch two Einstein solids share energy and see the second law emerge from counting: the most probable split has the highest entropy and fluctuations vanish for large systems.
  5. 9 Temperature from Entropy Derive the statistical definition of temperature, 1/T = dS/dU, from equilibrium between two systems, and compute the temperature of an Einstein solid from its multiplicity.

The Microcanonical and Canonical Ensembles

  1. 10 The Microcanonical Ensemble Learn the microcanonical ensemble for isolated systems at fixed energy, volume and particle number, and derive the temperature of N two-level systems from S = k ln Omega.
  2. 11 The Canonical Ensemble and the Boltzmann Distribution Derive the Boltzmann distribution p = e^(-E/kT)/Z for a system in contact with a heat bath, then compute and sample level populations in Python.
  3. 12 The Two-Level System Solve the two-level system in the canonical ensemble: partition function, average energy, entropy, the Schottky heat-capacity peak, and the meaning of negative temperature.
  4. 13 Energy Fluctuations and Heat Capacity Show that in the canonical ensemble the energy variance equals k_B T^2 C_V, check it by simulation, and see why relative fluctuations scale like 1/sqrt(N).
  5. 14 Gibbs Entropy and Information Generalize Boltzmann entropy to the Gibbs form S = -k_B sum p ln p, connect it to Shannon information and bits, and compute the Landauer limit kT ln 2.

Partition Functions and Thermodynamics

  1. 15 The Partition Function Master the partition function Z: how to compute it, how it factorizes for independent systems, and how to extract the average energy, with a reusable Python function.
  2. 16 Helmholtz Free Energy Connect the partition function to thermodynamics with F = -k_B T ln Z, derive S, U, P from F, and see why systems at fixed T and V minimize their free energy.
  3. 17 The Harmonic Oscillator and the Einstein Solid Compute the partition function of a quantum harmonic oscillator, derive its energy and heat capacity, and build the Einstein model of solids that explains why heat capacity falls at low T.
  4. 18 The Paramagnet and Curie's Law Solve the ideal spin-1/2 paramagnet with the partition function: derive M = N mu tanh(mu B / kT), the Curie law at weak field, and saturation, and compute real numbers.

The Ideal Gas and Equipartition

  1. 19 The Ideal Gas Partition Function Derive the partition function of a classical ideal gas, the thermal wavelength, the Sackur-Tetrode entropy and the role of the 1/N! factor, with runnable numbers.
  2. 20 The Maxwell-Boltzmann Speed Distribution Derive the Maxwell-Boltzmann distribution of molecular speeds, compute the most probable, mean and rms speeds, and check them with numerical integration and sampling.
  3. 21 The Equipartition Theorem and Gas Heat Capacities Prove the equipartition theorem, use it to predict heat capacities of monatomic and diatomic gases, and see where quantum freezing of vibrations breaks the classical rule.
  4. 22 Heat Capacity of Solids: Einstein and Debye Models Model a crystal as quantum oscillators: derive the Einstein and Debye heat capacities, recover Dulong-Petit at high T and the T-cubed law at low T, and compute both numerically.

Quantum Statistics: Fermi-Dirac and Bose-Einstein

  1. 23 Identical Particles and Quantum Statistics Learn why indistinguishable quantum particles split into bosons and fermions, count their microstates, and derive the Fermi-Dirac, Bose-Einstein and Maxwell-Boltzmann distributions.
  2. 24 The Fermi Gas at Zero Temperature Fill single-particle states up to the Fermi energy, derive the density of states, compute Fermi energy, Fermi temperature and degeneracy pressure for metals with runnable code.
  3. 25 The Degenerate Fermi Gas at Finite Temperature Compute the chemical potential and electronic heat capacity of a degenerate Fermi gas, derive the linear-in-T law with the Sommerfeld idea, and check it by numerical integration.
  4. 26 Blackbody Radiation: The Photon Gas Treat light in a cavity as a gas of bosons with zero chemical potential, derive Planck's law, the Stefan-Boltzmann law and Wien's displacement law, and compute them numerically.
  5. 27 Bose-Einstein Condensation Derive the critical temperature of an ideal Bose gas, the condensate fraction and the role of the zeta function, and compute numbers for liquid helium and trapped ultracold atoms.

Phase Transitions and the Ising Model

  1. 28 The Ising Model in One Dimension Define the Ising model, solve the one-dimensional chain exactly with the transfer-matrix method, check it against brute-force enumeration, and see why there is no phase transition.
  2. 29 Mean-Field Theory of the Ising Model Derive the mean-field equation m = tanh(ฮฒ(zJm + h)) for the Ising model, find the critical temperature and exponents, and compare with exact results in different dimensions.
  3. 30 The 2D Ising Model: Onsager's Exact Results Meet Onsager's exact solution of the square-lattice Ising model: critical temperature, spontaneous magnetization, critical exponents, and a brute-force 4x4 enumeration you can run.
  4. 31 Landau Theory and Universality Build Landau's free energy in powers of the order parameter, derive second-order and first-order transitions, mean-field exponents, and see how universality classes organize critical behavior.

Non-Equilibrium and Monte Carlo Methods

  1. 32 The Metropolis Algorithm Learn how Markov chain Monte Carlo samples the Boltzmann distribution: detailed balance, the Metropolis acceptance rule, step size, equilibration and autocorrelation, with runnable examples.
  2. 33 Monte Carlo Simulation of the 2D Ising Model Simulate the 2D Ising model with the Metropolis algorithm in NumPy, watch domains form, measure magnetization, energy, specific heat and susceptibility, and see critical slowing down.
  3. 34 Random Walks and Diffusion Connect random walks to the diffusion equation, derive mean-square displacement 2Dt, use the Stokes-Einstein relation D = kT/(6 pi eta a), and simulate Brownian motion in Python.
  4. 35 The Langevin Equation and the Fluctuation-Dissipation Theorem Model a particle with friction plus random thermal kicks, derive equipartition and D = kT/gamma from the Langevin equation, and apply the fluctuation-dissipation idea to optical traps and Johnson noise.

Projects and Practice

  1. 36 Practice Set 1: Ideal Gases and Quantum Statistics Work through eight problems on the thermal wavelength, molecular speeds, heat capacities, Fermi gases, blackbody radiation and Bose-Einstein condensation, each with a runnable solution.
  2. 37 Practice Set 2: Ising Model and Monte Carlo Eight problems on the Ising model, mean-field theory, Onsager's results, Metropolis acceptance and detailed balance, diffusion and trapped particles, each with a runnable solution.
  3. 38 Project: Finite-Size Scaling and the Ising Critical Point Locate the 2D Ising critical temperature from Monte Carlo data using the Binder cumulant and finite-size scaling of the susceptibility, and compare with Onsager's exact result.
  4. 39 Project: A Hard-Disk Gas and the Maxwell-Boltzmann Distribution Simulate a two-dimensional gas of hard disks from a non-equilibrium start, watch the speeds relax to the 2D Maxwell-Boltzmann (Rayleigh) distribution and track Boltzmann's H function.