What is on the screen
Every cell is a spin that is either up or down. Each one wants to agree with its four neighbours — that is the entire physics, one line: the energy is E = −J Σ sᵢsⱼ summed over neighbouring pairs. Temperature is the only thing fighting that: at each step a random spin is offered a flip, and it is accepted with probability min(1, e−ΔE/T), so uphill moves happen, and happen more often when it is hot.
Hot, and the fight is a rout — the picture is static noise, no spin knows what its neighbours are doing beyond a cell or two. Cold, and agreement wins — the lattice picks up or down and commits. The interesting part is neither of those.
Sit exactly on 2.269 and look
Press Go to Tc. The picture is not noise and it is not uniform: it is blobs inside blobs inside blobs, at every size from a few cells to the whole lattice, changing constantly. That is what a critical point looks like. The correlation length — the distance over which spins still know about each other — diverges, so there is no characteristic scale left, and the pattern looks statistically the same however far you zoom.
Move a tenth of a degree either way and it goes away. That is how sharp the transition is, and it is the same sharpness measured in the percolation experiment on this site, where 1.5 percentage points of occupancy took the spanning probability from 0% to 100%, with the critical point at 0.59249 ± 0.00043. Different model, same structure: a quantity that is exactly zero on one side of a threshold and grows as a power law on the other.
Watch it fail near the transition
Set the temperature just below 2.269 from a randomised start and time how long the magnetisation takes to settle. Then do the same at 1.5. The near-critical run takes far longer, and it is not a coding problem — it is critical slowing down. Single-spin flips move information one cell per step, so a lattice whose correlated regions are the size of the whole system needs on the order of L² times longer to decorrelate.
This is the practical reason cluster algorithms — Wolff, Swendsen–Wang — exist: they flip whole correlated regions at once and sidestep the problem entirely. This page uses plain Metropolis on purpose, because the slowing down is the thing worth seeing.
Comparing against the exact answer
Below the critical temperature and with no external field, the magnetisation per spin of the infinite lattice is known in closed form: M = [1 − sinh⁻⁴(2/T)]1/8, and it is zero above. That is the curve drawn on the plot.
The simulated points will sit below it near the transition and will not be exactly zero above it. The cooling sweep in particular runs faster than the lattice can equilibrate, so its points fall short of the curve on purpose — that gap is the critical slowing down, drawn. Both are finite-size effects rather than errors: a 128×128 lattice cannot support a correlation length longer than 128, which rounds off the sharp corner, and a finite system has magnetisation fluctuating around zero rather than sitting at it — which is why the plot uses |M| and not M. Increase the lattice to 256 and the corner gets sharper.
Turning on the field
Give h a small positive value and the symmetry between up and down is gone: there is no longer a phase transition at all, just a smooth crossover, because the system no longer has to choose — the answer is given to it. Set the temperature below the critical point, let it order, and then push h to the opposite sign: it will resist for a while and then flip over in an avalanche. That hysteresis is the reason a fridge magnet stays magnetised.