What you're seeing
A grid of tiny magnets — spins — each pointing one of just two ways: up (amber) or down (teal). Every spin would "prefer" to point the same way as its four immediate neighbours, because that arrangement has the lowest energy. Fighting that preference is temperature: heat jostles spins and randomly flips them. The whole picture is the tug-of-war between these two tendencies, order versus agitation, playing out one spin at a time.
The striking thing is what happens as you turn the temperature knob. Cool the grid and large same-coloured domains sweep across it — the system has spontaneously chosen a direction to magnetize. Heat it and the domains shatter into a fizzing salt-and-pepper of no net direction. And in a narrow window around one special temperature, Tc ≈ 2.27, you see neither: domains of every size, from a few pixels to nearly the whole screen, churning and reforming. That scale-free restlessness at the critical point is the heart of this entry.
The rule
Each spin s is either +1 or −1. The energy of the whole lattice is a sum over neighbouring
pairs, E = −J · Σ s_i·s_j with coupling J = 1: aligned neighbours
(s_i·s_j = +1) lower the energy, opposed ones raise it. The system seeks low energy but is bathed
at temperature T, so it samples configurations with the Boltzmann weight e^(−E/T)
(Boltzmann's constant set to 1). High T flattens that weight — every configuration is roughly
equally likely, so order washes out; low T sharply favours the aligned ground states.
We sample with Metropolis Monte Carlo. Repeatedly: pick a random site, compute the energy
change ΔE = 2·J·s_i·(sum of its 4 neighbours) that flipping it would cause, and flip it with
probability min(1, e^(−ΔE/T)). Energetically favourable flips (ΔE ≤ 0) always
happen; unfavourable ones happen sometimes, more often when it is hot. One sweep is
N such attempts (N = number of cells). The grid wraps at its edges (a torus), so there are no walls,
and only five distinct values of ΔE are possible, which we precompute per temperature for speed.
Why it matters
The Ising model is the simplest system that has a real phase transition. Below the critical temperature it is magnetized; above it is not; and the change between these is genuinely sharp in the infinite-lattice limit. Crucially, the magnetized state has to pick a direction — up or down — even though the rule treats the two perfectly symmetrically. This is spontaneous symmetry breaking, the same idea that runs through superconductivity, the Higgs mechanism, and the early universe, in its most strippeddown form.
Lars Onsager exactly solved the 2D model in 1944, deriving the critical temperature
Tc = 2 / ln(1 + √2) ≈ 2.269 in closed form — one of the landmark calculations of twentieth
century physics. And the model is the cleanest illustration of universality: near Tc the
microscopic details stop mattering, and the behaviour is governed by a handful of critical
exponents shared across systems as different as magnets, fluids, and alloys. Wildly unlike materials
fall into the same "universality class" purely by their dimensionality and symmetry. Few models in physics
have been more important or more studied.
In the wild
The Ising transition is not just a metaphor — it is the textbook account of a real effect:
- Ferromagnets lose their magnetism when heated. Iron is magnetic up to its Curie temperature (1043 K), above which thermal agitation destroys the alignment of its atomic spins — exactly the order-to-disorder transition simulated here.
- The liquid–gas critical point. A fluid at its critical point shows critical opalescence: density fluctuations at every scale scatter light and turn the fluid milky. This is the same physics; the liquid–gas critical point sits in the same universality class as the 3D Ising model.
- Lattice gases and binary alloys. Relabel +1/−1 as "atom present / absent" and you have a lattice gas; relabel as "copper / zinc" and you have an order–disorder transition in brass. The same equations describe all three.
- Beyond physics — flagged honestly as analogy. Ising-like models are borrowed as tools and metaphors in neuroscience (Hopfield networks and "neural" spin models), in opinion and voter dynamics, and in finance. These are suggestive caricatures: the mathematics transfers, but whether a brain or a market is "really" an Ising system near criticality is an open, contested question, not an established fact.
Try this
- Jump straight to the regimes: deep cold (a solid magnet), exactly at Tc (domains of every size), and hot (featureless noise) — then drag the slider between them.
- Or start cold / aligned and slowly raise the temperature through ≈2.27. Watch a solid block of one colour develop ragged domains, then dissolve entirely into noise. You have just melted a magnet.
- Press set T = Tc and just watch. The domains never settle — blobs of every size appear, merge, and break apart. This scale-free fluctuation is the signature of criticality, the same thing that makes a fluid go opalescent.
- Start hot / random and drop the temperature to ~1.5. Domains coarsen: small patches merge into bigger ones and compete, with curved domain walls slowly straightening. Often the grid gets stuck in a stalemate of two big stripes — a metastable state the torus allows.
- Nudge the external field slider away from zero. A bias toward one colour breaks the symmetry by hand and pushes the system to magnetize that way, even above Tc.
References
- Ising, E. (1925). "Beitrag zur Theorie des Ferromagnetismus." Zeitschrift für Physik 31, 253–258. (The original 1D model, which famously has no phase transition.)
- Onsager, L. (1944). "Crystal Statistics. I. A Two-Dimensional Model with an Order-Disorder Transition." Physical Review 65, 117–149. (The exact solution and the critical temperature Tc.)
- Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. H., Teller, E. (1953). "Equation of State Calculations by Fast Computing Machines." Journal of Chemical Physics 21(6), 1087–1092. (The Monte Carlo algorithm used by this simulation.)
- Brush, S. G. (1967). "History of the Lenz–Ising Model." Reviews of Modern Physics 39(4), 883–893. (How the model came to be and why it bears Ising's name.)