Skip to content
Math Visualizer
Statistical mechanicsintermediate

Potts Model

Each site on a grid takes one of q colors and prefers to match its neighbors. With up to 4 colors the order melts gradually at the critical temperature; with more it breaks abruptly.

What this shows

Each square is a site that holds one of qq states, drawn as qq colors. Neighboring sites lower their energy by matching, while temperature changes them at random. The temperature is shown as a multiple of the critical temperature TcT_c, so the phase transition is always at 1:

  • Below TcT_c, matching wins. Regions of one color grow, and given enough time one color covers most of the grid.
  • Above TcT_c, the random changes win, and every color covers about 1/q1/q of the grid.
  • At TcT_c, what happens depends on qq. Up to 4 states the transition is continuous: regions of every size appear at once, as in the Ising model. With 5 or more it is discontinuous: ordered and disordered regions can sit side by side, and the order disappears abruptly.

The corner shows the temperature, qq and the share of sites in the most common state.

Things to try: at the default 3 states, drag the temperature from 1.2 down to 0.8 and back. Then set 10 states and do the same, and compare how sharply the order appears and disappears.

How the visualization works

  • Sites are updated with the Metropolis algorithm. Each attempt picks a site at random and proposes one of the other q−1q - 1 states. If the energy would not go up, the change is made. Otherwise it is made with probability e−ΔE/Te^{-\Delta E/T}.
  • One sweep is as many attempts as there are sites.
  • The grid wraps around at the edges, so no site sits on a boundary.
  • All randomness comes from a seeded pseudo-random generator, and the acceptance probabilities use only addition, subtraction, multiplication and division, so a shared link replays exactly in every browser.
  • The simulation runs in a Web Worker so the page stays responsive.

Parameters

  • Grid size: sites along each side. Restarts the run.
  • States: qq, from 2 to 10. Restarts the run.
  • Temperature: as a multiple of TcT_c. Applies from the next sweep.
  • Starting state: random (as if infinitely hot) or all the same (as if at absolute zero). Restarts the run.
  • Speed: sweeps per second. Never changes the results.

Mathematical background

A configuration assigns a state σi∈{1,…,q}\sigma_i \in \{1, \dots, q\} to every site ii. Its energy is

H=−∑⟨i,j⟩δ(σi,σj),H = -\sum_{\langle i, j \rangle} \delta(\sigma_i, \sigma_j),

summed over neighboring pairs, where δ(a,b)\delta(a, b) is 1 when a=ba = b and 0 otherwise. At temperature TT a configuration occurs with probability proportional to e−H/Te^{-H/T}. With q=2q = 2 this is the Ising model with every temperature halved: TcT_c is about 1.135 here and 2.269 there.

Renfrey Potts introduced the model in 1952 and located its critical point on the square lattice by a duality argument. Beffara and Duminil-Copin proved in 2012 that the transition is at

Tc=1ln⁡(1+q),T_c = \frac{1}{\ln\bigl(1 + \sqrt{q}\bigr)},

about 0.995 for q=3q = 3. Whether the transition is continuous was settled by Duminil-Copin, Sidoravicius and Tassion for q≤4q \le 4 and by Duminil-Copin, Gagnebin, Harel, Manolescu and Tassion for q>4q > 4.

Each configuration also has a random-cluster (Fortuin–Kasteleyn) picture, in which bonds between equal neighbors are kept at random and the spins are read off the clusters. At TcT_c with q≤4q \le 4 the boundaries of those clusters are expected to look like Schramm–Loewner evolution (SLE) curves. A 2026 manuscript from OpenAI's openai/math collection proves this for 1≤q<41 \le q < 4. It has not been refereed, and its main result is not formalized in Lean. This page shows the spins, not those cluster boundaries.

References

Full citations are listed below.

  1. R. B. Potts. Some generalized order-disorder transformations (1952). Mathematical Proceedings of the Cambridge Philosophical Society 48, 106–109. Introduces the model.
  2. F. Y. Wu. The Potts model (1982). Reviews of Modern Physics 54, 235–268. A survey of the model and its exact results.
  3. V. Beffara and H. Duminil-Copin. The self-dual point of the two-dimensional random-cluster model is critical for q ≥ 1 (2012). Probability Theory and Related Fields 153, 511–542. Proves the critical temperature T_c = 1/ln(1 + √q).
  4. H. Duminil-Copin, V. Sidoravicius and V. Tassion. Continuity of the phase transition for planar random-cluster and Potts models with 1 ≤ q ≤ 4 (2017). Communications in Mathematical Physics 349, 47–107.
  5. H. Duminil-Copin, M. Gagnebin, M. Harel, I. Manolescu and V. Tassion. Discontinuity of the phase transition for the planar random-cluster and Potts models with q > 4 (2016). arXiv preprint.
  6. OpenAI. Square-lattice FK interfaces and nested loops for 1 ≤ q < 4 (2026). Unrefereed manuscript in the openai/math collection (family 223); its main result is not Lean-formalized. It proves that cluster boundaries in this model's random-cluster picture converge to SLE curves at T_c. This page shows the spins, not those boundaries.
  7. N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller and E. Teller. Equation of State Calculations by Fast Computing Machines (1953). The Journal of Chemical Physics 21, 1087–1092. The sampling algorithm used here.