Magnetism · interactive
Why do hot magnets lose their order?
The grid holds 256 two-way spins, and its edges wrap around. Coral seams mark neighbors that disagree. The flip panel tests one spin: its neighbors, its energy cost and its odds.
1 See
Each square is a tiny magnet that points up or down. Matching its four neighbors lowers the energy. So why does heat break the matching patches apart?
2 Change
3 Understand
Model notes and sources
Two-dimensional nearest-neighbor Ising model on a 16 × 16 square lattice with wrap-around (periodic) edges, no external field, coupling J = 1 and kB = 1. Each site holds a spin s = +1 or −1. The energy is H = −J Σ sisj, counted once over the 512 neighbor bonds, so H = −512 J + 2 J × (mismatched pairs). Flipping one spin changes the energy by ΔE = 2J si Σ sj over its four neighbors: −8, −4, 0, +4 or +8 J.
The dynamics are sequential Metropolis. Pick one of the 256 sites at random. Flip it if ΔE ≤ 0; otherwise flip it with probability exp(−ΔE / kBT). Each accepted flip applies before the next try. A sweep is 256 tries with replacement, so some sites are tried twice and some not at all. At T = 0 no uphill flip ever passes. Temperature is in model units of J/kB, not kelvin. Sweeps count tries, not physical time: Pace only changes how many sweeps you watch each second.
Readouts come from the lattice on screen: order |m| = |Σ s| / 256; energy per spin H / 256, from −2 J when every pair matches to +2 J when none do; mismatched pairs out of 512; and the share of the last 256 tries that flipped. Runs are seeded and reproducible: the same seed, start and temperature history give the same lattice.
Lars Onsager’s exact solution puts the order–disorder transition of an infinite square lattice at kBT/J = 2 / ln(1 + √2) ≈ 2.269. A 16 × 16 lattice has no sharp transition. One run fluctuates, need not change steadily, and is not an averaged measurement. This is a toy model, not a material. It leaves out chemistry, vector spins, anisotropy, external fields, long-range forces, defects and real magnetic dynamics, and it predicts no Curie temperature.
Sources: E. Ising, “Beitrag zur Theorie des Ferromagnetismus,” Zeitschrift für Physik 31, 253–258 (1925), doi:10.1007/BF02980577; L. Onsager, “Crystal Statistics. I. A Two-Dimensional Model with an Order-Disorder Transition,” Physical Review 65, 117 (1944), doi:10.1103/PhysRev.65.117, the infinite-lattice solution; N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller and E. Teller, “Equation of State Calculations by Fast Computing Machines,” The Journal of Chemical Physics 21, 1087–1092 (1953), doi:10.1063/1.1699114, which introduced the acceptance rule but was not an Ising study.
An ExplainerTools Original. The model is named for Ernst Ising, who studied a chain of two-way spins in 1925. Lars Onsager solved the infinite square lattice exactly in 1944. Each flip try follows the 1953 Metropolis rule.


