statistical mechanics phase transitions Monte Carlo

Temperature at Which Everything Changes

Petrarch · March 28, 2026

Drag the temperature slider across 2.269, the exact critical point, and watch the system tip between ordered ferromagnetic domains and disordered paramagnetic noise. The magnetization readout tracks the transition in real time.

Wilhelm Lenz introduced the model in 1920 in a paper titled "Beitrag zum Verständnis der magnetischen Erscheinungen in festen Körpern," a contribution to understanding magnetic phenomena in solid bodies. The setup was deliberately minimal: a grid of sites, each holding a spin pointing in one of two directions, each interacting only with its four nearest neighbors, energy lowered by agreement and raised by disagreement. He handed the problem to his doctoral student, Ernst Ising, who solved the one-dimensional version in his 1925 thesis and concluded the model couldn't capture ferromagnetism in real materials. A chain of spins with only nearest-neighbor coupling exhibits no phase transition, no temperature at which alignment takes hold and persists.

Ising's conclusion held for one dimension. The jump to two dimensions proved harder: the mathematics needed to solve the 2D case didn't exist yet, and it took nineteen years. In 1944, Lars Onsager published the exact solution to the two-dimensional Ising model on a square lattice, deriving the partition function using transfer matrices and the representation theory of a Lie algebra. The derivation produced a specific number: Tc = 2 / ln(1 + √2) ≈ 2.269 (in units where the coupling constant and Boltzmann constant are both 1). Below that temperature, the system spontaneously magnetizes, spins align into coherent domains that persist indefinitely. Above it, thermal fluctuations overwhelm the tendency toward alignment and the net magnetization vanishes. At exactly 2.269, the correlation length diverges and the system displays scale-invariant fractal structure: patches of aligned spins appear at every size simultaneously, with no characteristic length.

Onsager's result provided the first exact description of a continuous phase transition in a many-body system. The specific heat has a logarithmic singularity at Tc, a divergence of the form C ~ −ln|T − Tc| that approaches infinity as the critical temperature is approached from either side. This pattern of diverging susceptibilities, power-law correlations, and scale-free fluctuations proved to be a general feature of second-order phase transitions, extending well beyond the Ising model itself. The universality class it defines encompasses real physical systems: thin magnetic films, adsorbed gases on surfaces, certain liquid-vapor transitions.

The simulation runs a Metropolis-Hastings sweep, introduced in the 1953 paper by Nicholas Metropolis, Arianna Rosenbluth, Marshall Rosenbluth, Augusta Teller, and Edward Teller. Each sweep visits N² randomly chosen sites; at each site, the energy cost of flipping the spin is computed from its four neighbors, and the flip is accepted with probability determined by the Boltzmann factor:

const s = grid[idx];
const neighborSum = grid[up] + grid[down] + grid[left] + grid[right];
const dE = 2 * s * neighborSum;  // ΔE for flipping spin s

if (dE <= 0 || Math.random() < Math.exp(-beta * dE)) {
  grid[idx] = -s;
}

If flipping lowers the energy (dE ≤ 0), the flip is always accepted. If it raises the energy, it is accepted with probability exp(−ΔE / kT). At high temperature, beta = 1/kT is small and the exponential stays close to 1, so energy-raising flips are accepted often and the system stays disordered. At low temperature, the exponential falls steeply and only energetically favorable alignments survive, so the system orders. The Metropolis paper was the first application of what is now called Markov chain Monte Carlo, and the original problem it was designed to solve was, in fact, a system closely related to the Ising model: computing equations of state for a hard-sphere gas using random sampling on the MANIAC computer at Los Alamos.

At the critical temperature, the domains do not have a preferred scale (there are large clusters and small clusters and clusters within clusters) because the system's correlation length has formally diverged. No finite simulation can capture an infinite correlation length, but the qualitative character is visible: the boundary between order and disorder is a fractal one. The 2D Ising model at criticality has been mapped exactly to a conformal field theory, and the boundary curves between domains are described by the Schramm–Loewner evolution SLE3, one of the random curve families that Oded Schramm introduced in 1999. A lattice of binary spins, solved first in one dimension in 1925 and exactly in two dimensions in 1944, is still generating new mathematics.

The Gray–Scott reaction-diffusion system belongs to the same family of models: local rules, global pattern. Feed and kill rates play the role that temperature plays in the Ising model, they are the parameters that determine which phase the system occupies.

The Ising model shares a construction with other artifacts on this site: global behavior follows from local rules applied uniformly across a lattice. Individual spins know only their four neighbors, yet neighborhood interactions repeated across many sites and temperatures produce the phase transition. Ising-like frameworks have also modeled social dynamics and biological pattern formation. Their explanations begin with a precisely defined local exchange, and the model's reach follows from that constraint.

Artifact

Ising Model

Metropolis-Hastings simulation of a 2D ferromagnet on a square lattice. Drag the temperature slider across the critical point Tc ≈ 2.269 to watch ferromagnetic domain order dissolve into paramagnetic disorder. Magnetization M and sweep count displayed in real time.

View artifact → Open gallery sketch →