Thought Toys · Emergence · Exhibit 43

The Ising model

A grid of tiny magnets, each one only caring which way its four neighbours point. Heat has no opinion about direction — yet at one precise temperature the whole sheet suddenly agrees, or suddenly forgets. Order appears from nothing, and vanishes just as sharply.

The lattice — 100×100 spins updown

Order parameter |m| versus temperature this runexact (Onsager)

your turn — drag T slowly through Tc and watch the domains dissolve

What you're seeing

Every cell is a spin — amber for up, blue for down. It has no memory and no leader; each moment it only asks whether flipping would lower the energy of its four immediate neighbours. If so, it tends to flip. If flipping would raise the energy, it still flips sometimes — more often when it's hot. That single rule, run over and over, is the whole model.

At low temperature the neighbour-pull wins: spins fall into step and grow large amber or blue domains that swallow most of the grid, and the magnetization |m| — how lopsided the up/down vote is — sits near 1. Crank the temperature up and thermal flips overpower the pull; the grid dissolves into a fine, even speckle and |m| drops to 0. The remarkable part is how it drops: not gradually, but almost vertically, at one exact temperature. That's a phase transition — the same kind of sudden, collective switch as ice melting or a magnet losing its pull when heated red-hot.

Park the slider right at Tc and watch: the domains never settle: blotches of every size flicker in and out, the lattice can't decide. That critical shimmer is the system poised exactly between order and chaos.

The rule, exactly. Energy favours agreement: E =J Σ sisj summed over neighbour pairs (spins s = ±1, J=1). A candidate flip changes energy by ΔE = 2si·(sum of its 4 neighbours); accept it if ΔE ≤ 0, else with probability eΔE/T (the Metropolis rule). In two dimensions Onsager solved it exactly: order appears below Tc = 2 / ln(1+√2) 2.269 with spontaneous magnetization m = (1 − sinh(2/T)−4)1/8, and exactly zero above it. That exact curve is for an infinite sheet, where the collapse at Tc is perfectly vertical; our finite 100×100 grid rounds the corner a little, so near Tc the live dot doesn't drop quite as sharply as the dashed line. Verified in node (improve/verify/43-ising.js): the page's own Metropolis lattice, started aligned, holds |m| ≈ 0.98 at T = 1.5 but melts to ≈ 0.06 at T = 3.5 (a 0.9 drop across Tc), and the ΔE shortcut matches a full-energy recompute exactly on every one of 400 test flips. Negative control: strip out the Boltzmann bias — accept every proposed flip — and the lattice never orders even at T = 1.5 (|m| ≈ 0.02), proving the order is manufactured by the energy-lowering rule, not by the grid or the low temperature alone.

Also in Emergence: Phantom Traffic Jams →

All 11 in Emergence
  1. 01Phantom Traffic Jams
  2. 02Schelling's Segregation
  3. 07Conway's Game of Life
  4. 11Percolation
  5. 15Reaction & diffusion
  6. 18Sandpiles & self-organized criticality
  7. 22Diffusion-limited aggregation
  8. 29The simplest rule that makes complexity
  9. 32Fireflies that sync
  10. 41Small-world networks
  11. 43The Ising model — you are here

← the cabinet · Thought Toys — a cabinet of explorable explanations. Exhibit 43.