Spins on a lattice point up or down, and neighbors prefer to align. That is all, yet below a critical temperature Tc a magnetization appears spontaneously, without any external field. Explore the model directly, compute its thermodynamics exactly for small lattices, compare it with non-interacting spins, and measure the quantities of interest near the critical point.
Based on lecture notes by Sang Hoon Lee for Chapter 2 (part 1), following K. Christensen and N. R. Moloney, Complexity and Criticality (2005). Units: kB = 1 and J = 1, so temperatures and fields are in units of J. References
Up spins are white and down spins are black, as in the lecture notes. Periodic boundaries.
Every site i of a lattice carries a spin si = +1 or −1, like a magnetic dipole that can point only along one axis. A pair of neighboring spins has energy −J when parallel and +J when antiparallel, and a uniform external field H adds −H for each spin along it and +H for each against it:
The first sum runs over distinct nearest-neighbor pairs. For J > 0 parallel spins are favored, a ferromagnet; for J < 0 antiparallel ones, an antiferromagnet. Click spins below to flip them. Even this 5 × 5 lattice has 225 = 33 554 432 microstates, while a macrostate such as “14 up and 11 down” lumps many of them together.
Free boundaries, 40 nearest-neighbor pairs. Blue bonds lower the energy and red bonds raise it: for J > 0 blue joins parallel spins, for J < 0 antiparallel ones.
| si | sj | Configuration | Interaction energy −J sisj |
|---|---|---|---|
| +1 | +1 | ↑ ↑ | −J |
| −1 | −1 | ↓ ↓ | −J |
| +1 | −1 | ↑ ↓ | +J |
| −1 | +1 | ↓ ↑ | +J |
The interest is in how the model behaves as the temperature changes. When kBT ≪ J the interactions dominate and spins align to lower the energy; when kBT ≫ J they are effectively independent and point up and down at random, maximizing the entropy. Between these limits a high-temperature disordered (paramagnetic) phase gives way to a low-temperature ordered (ferromagnetic) phase. Try the temperature presets at the top: the lattice looks random at 4Tc, grows ever larger domains on the way down, is a fractal of droplets within droplets at Tc, and is almost fully aligned at 0.7Tc.
In the canonical ensemble, a system in contact with a heat reservoir at temperature T is found in microstate {si} with probability P = e−βE/Z, with β = 1/kBT. Every observable is an ensemble average, and everything follows from the partition function and the free energy:
Per spin: m = −(∂f/∂H)T, ε = −(1/N)(∂ ln Z/∂β)H, S/N = (ε − f)/T, and the response functions are second derivatives, χ = (∂m/∂H)T and c = (∂ε/∂T)H. Differentiating Z once more gives the fluctuation–dissipation relations kBTχ = (⟨M²⟩ − ⟨M⟩²)/N and kBT²c = (⟨E²⟩ − ⟨E⟩²)/N: the response to a small push equals the size of the spontaneous fluctuations. For a small periodic lattice the page sums over every microstate exactly and checks both relations.
| Quantity | Relation | Response function |
|---|---|---|
| Partition function | Z = Σ{si} e−βE{si} | |
| Free energy per spin | f = −(1/N) kBT ln Z | |
| Magnetization per spin | m = −(∂f/∂H)T | χ = (∂m/∂H)T = −(∂²f/∂H²)T |
| Energy per spin | ε = −(1/N)(∂ ln Z/∂β)H = f − T(∂f/∂T)H | c = (∂ε/∂T)H = −T(∂²f/∂T²)H |
| Entropy per spin | S/N = −(∂f/∂T)H = (ε − f)/T |
With 2N terms, Z is a finite sum of analytic functions, so f is analytic and nothing can be singular: no finite system has a phase transition. Only in the thermodynamic limit N → ∞, where boundary effects vanish and f → Fbulk/N, can derivatives of f become discontinuous or diverge.
With J = 0 the partition function factorizes into N identical terms, and everything is exact:
Only the ratio H/kBT matters. When it is small the entropy wins and spins point at random; when it is large the energy wins and all spins follow the field. f is analytic for every T and H, and at H = 0 the magnetization is zero for any T > 0: there is no spontaneous magnetization and no phase transition, because a transition is a cooperative phenomenon that needs interactions. The energy is ε = −H tanh(βH) and the specific heat c = (H/kBT)² sech²(βH), a Schottky peak.
Back to the interacting model at H = 0. On the square lattice Onsager’s exact solution puts the transition at kBTc/J = 2/ln(1 + √2) ≈ 2.269. The page simulates 16 × 16, 32 × 32 and 64 × 64 lattices with the Wolff cluster algorithm at temperatures across Tc, and compares them with the exact infinite-lattice results. As in percolation, the singular behavior is described by power laws:
| Exponent | Definition | 2D Ising (exact) | Mean field | 2D percolation | This run |
|---|
The correlation length ξ is the typical size of the largest cluster of aligned spins, or equivalently the scale of the largest fluctuations away from the fully aligned state below Tc and away from the random state above it. It diverges as ξ ∝ |T − Tc|−ν and is defined through the spin–spin correlation function g(ri, rj) = ⟨sisj⟩ − ⟨si⟩⟨sj⟩. Summing g over all sites gives kBTχ, so a diverging χ means g cannot decay exponentially at Tc; it decays as r−(d−2+η). The correlation chart under the live lattice shows this when it runs at Tc.
At H = 0 flipping every spin leaves the energy unchanged, so the microstates {si} and {−si} are equally probable and their magnetizations cancel: ⟨M⟩ = 0 exactly, at every temperature. A small field changes the ratio of their probabilities to
Taking H → 0 first, at fixed N, the ratio returns to 1 and ⟨M⟩ = 0. Taking N → ∞ first, the ratio becomes infinite for H → 0+ and zero for H → 0−: one half of configuration space becomes inaccessible. This is ergodicity breaking, and it is what lets a nonzero magnetization survive. Simulations therefore usually record |m|.
The demo button sets the live lattice at the top to 8 × 8, T = 0.95Tc, H = 0 and Metropolis updates at 16 sweeps per frame: its magnetization jumps between +m and −m every few hundred sweeps, and the distribution of m fills in both peaks. At 16 × 16 the jumps are already about ten times rarer. A 128 × 128 lattice practically never does, and any small field picks the side.
Key reference. K. Christensen and N. R. Moloney, Complexity and Criticality, Imperial College Press, London (2005), Chapter 2.