The Spacetime Metric
Level 3 · Undergraduate coreFirst- and second-year universityAbout 16 hours

Statistical mechanics

Connect microscopic states to temperature, entropy, fluctuations, phases, and quantum statistics.

Develop ensembles and partition functions, derive thermodynamic quantities, and learn when fluctuations or nonequilibrium resources can—and cannot—support useful work.

Established foundations

Before you begin

  • Calculus and probability
  • Level 2 thermodynamics
  • Introductory quantum mechanics

By the end, you can

  • Use microcanonical, canonical, and grand-canonical ensembles.
  • Derive observables from partition functions.
  • Calculate fluctuation scales and phase probabilities.
  • Separate equilibrium noise from nonequilibrium work resources.

Interactive model

Explore before calculating

A fluctuating field-like background represented as many local modes.
Statistical fluctuations require an ensemble, dynamics, and measurement definition; visual turbulence alone is not an energy source.

Live laboratory

Canonical two-level ensemble

Change a level gap, temperature, and excited-state multiplicity. Boltzmann weights turn microscopic possibilities into measurable populations, energy, entropy, and heat capacity.

groundall excited microstates

Excited population: 27.55%

Mean energy: 6.89 meV

Entropy: 0.589 kB

Heat capacity: 0.187 kB

These are equilibrium probabilities for a declared reservoir. Population fluctuations do not by themselves provide sustained cyclic work; a gradient, drive, measurement resource, or other nonequilibrium change must enter the ledger.

Level 3 · Undergraduate core teaching kit

Record the investigation. Teach the reasoning.

A learner-facing lab record and a course-specific instructor guide turn the live model into a repeatable classroom investigation.

Learner record

Two-level ensemble population and heat-capacity map

How do temperature, energy gap, and degeneracy turn microscopic possibilities into macroscopic averages?

Download learner record

Instructor guide

Teach for evidence, not button pushing

Learners derive qualitative ensemble behavior from Boltzmann weights and distinguish microstate multiplicity from energy alone.

Download instructor guide
Open the complete print-friendly teaching kit →

Lesson 1 of 3

Microstates, macrostates, and ensembles

How can many microscopic configurations share one measured temperature and pressure?

A macrostate specifies coarse variables while many microstates realize them. Boltzmann entropy S=kB lnΩ counts compatible microstates.

An ensemble is a probability model over microstates given constraints. Choosing the ensemble means declaring what can exchange energy, particles, or volume.

microstatemacrostateensembleBoltzmann entropy

Worked example

A macrostate has four times as many microstates as another. Find entropy difference.

  1. 1. Use ΔS=kB ln(Ω₂/Ω₁).
  2. 2. Insert ratio 4.
  3. 3. Keep logarithmic form or evaluate.

ΔS=kB ln4.

Try it

Multiplicity counting

Materials: Coins or binary-state simulation.

  1. 1. Enumerate heads counts for small N.
  2. 2. Compute binomial multiplicities.
  3. 3. Plot multiplicity versus macrostate.
  4. 4. Increase N.

Notice: Equilibrium-like macrostates dominate because vastly more microstates realize them.

Check your understanding: Does high entropy mean each microstate is disordered in a subjective visual sense?

Answer: No.

Entropy is defined from state probabilities or multiplicities under specified macroscopic constraints.

Lesson 2 of 3

Partition functions and thermodynamic derivatives

How can one weighted sum generate energy, entropy, heat capacity, and populations?

The canonical partition function Z=Σe⁻ᵝᴱ weights energy eigenstates in contact with a heat reservoir. Its logarithm generates thermodynamic quantities.

Free energy F=−kBT lnZ balances energy and entropy and determines equilibrium under fixed temperature and volume.

partition functionBoltzmann factorfree energyheat capacity

Worked example

For a two-level system with energies 0 and ε, find Z.

  1. 1. Weight the ground state by 1.
  2. 2. Weight excited state by e⁻ᵝε.
  3. 3. Add allowed-state weights.

Z=1+e⁻ᵝε and excited population is e⁻ᵝε/Z.

Try it

Two-level heat capacity

Materials: Notebook and temperature range.

  1. 1. Compute excited population versus T.
  2. 2. Compute mean energy.
  3. 3. Differentiate numerically for heat capacity.
  4. 4. Locate its maximum.

Notice: Heat capacity peaks where thermal energy competes with the level gap.

Check your understanding: Why is Z not usually a probability itself?

Answer: It is the normalization sum for Boltzmann weights.

Individual probabilities are e⁻ᵝᴱ/Z.

Lesson 3 of 3

Fluctuations, phases, and quantum statistics

When do collective fluctuations reveal a transition rather than a new energy reservoir?

Canonical energy variance is tied to heat capacity. Relative fluctuations usually shrink with system size but grow near some critical points.

Bosons and fermions obey different occupation statistics. Nonequilibrium gradients can drive work; equilibrium detailed balance forbids passive rectification into sustained cyclic output.

fluctuation–dissipationphase transitionBose–EinsteinFermi–Dirac

Worked example

If N independent contributions fluctuate with standard deviation proportional to √N, how does relative fluctuation scale?

  1. 1. Mean scales as N.
  2. 2. Standard deviation scales as √N.
  3. 3. Divide √N/N.

Relative fluctuations scale as 1/√N and become small macroscopically.

Try it

Ising-style phase exploration

Materials: Simple lattice simulation.

  1. 1. Run at high and low temperature.
  2. 2. Track magnetization and energy.
  3. 3. Sweep through transition.
  4. 4. Plot fluctuations and hysteresis checks.

Notice: Collective order and large fluctuations emerge from local interactions without implying free energy beyond the modeled bath.

Check your understanding: Can equilibrium thermal noise be passively rectified forever by an isothermal ratchet?

Answer: No.

The ratchet itself fluctuates; detailed balance cancels sustained directed work at one temperature.

Formula-to-meaning deck

Read the equation in ordinary language.

S=k_B lnΩ

Entropy measures multiplicity for equally likely constrained microstates.

Z=Σ_i e^(−βE_i)

Partition function normalizes canonical state weights.

F=−k_BT lnZ

Helmholtz free energy generates fixed-temperature equilibrium thermodynamics.

Independent practice

Problem set

Work each problem before opening its hint and solution.

  1. 1. Find the probability ratio p₂/p₁ for states separated by ΔE at temperature T.

    Reveal hint

    Divide their Boltzmann factors.

    Reveal solution

    p₂/p₁=e^(−ΔE/kBT).

  2. 2. For Z=1+e⁻ᵝε, find mean energy.

    Reveal hint

    Only the excited state contributes ε.

    Reveal solution

    ⟨E⟩=εe⁻ᵝε/(1+e⁻ᵝε).

  3. 3. A system multiplicity doubles. Find ΔS.

    Reveal hint

    Use the multiplicity ratio.

    Reveal solution

    ΔS=kB ln2.

Derivation studio

Build the result, line by line.

Keep the assumptions visible so the mathematics remains auditable.

Starting point

Canonical distribution

Small system plus large isolated reservoir with fixed total energy

  1. 1. Probability of system energy E is proportional to reservoir multiplicity ΩR(Etot−E).
  2. 2. Expand reservoir entropy SR around Etot.
  3. 3. Use ∂S/∂E=1/T.
  4. 4. Exponentiate the first-order entropy change and normalize.

p_i=e^(−βE_i)/Z

Boltzmann weights arise from counting reservoir-compatible states.

Starting point

Energy variance and heat capacity

⟨E⟩=−∂lnZ/∂β

  1. 1. Differentiate ⟨E⟩ with respect to β.
  2. 2. Recognize second moment minus mean squared.
  3. 3. Use dβ/dT=−1/(kBT²).
  4. 4. Relate d⟨E⟩/dT to heat capacity.

Var(E)=kBT²C_V

Equilibrium energy fluctuations are quantitatively tied to response.

Computational notebook

Turn the model into an experiment.

Two-level and oscillator ensembles

How do discrete spectra shape energy, entropy, and heat capacity across temperature?

Inputs

  • Energy gap or oscillator frequency
  • Temperature grid
  • State cutoff for oscillator

Algorithm

  1. 1. Build Boltzmann weights.
  2. 2. Normalize probabilities.
  3. 3. Compute E, F, S, and C.
  4. 4. Test cutoff convergence.

Evidence to produce

  • Population and thermodynamic curves
  • Heat-capacity peak comparison
  • Numerical convergence report

Continue into the evidence