2.1 The canonical ensemble
A system in contact with a heat bath at temperature is found in configuration with the Boltzmann probability
The partition function contains all the thermodynamics, through the free energy . The average of any observable is .
2.2 Thermodynamic quantities and fluctuations
The quantities we will compute are the energy and the magnetization,
and their responses: the specific heat and the magnetic susceptibility . They are all derivatives of :
where . These fluctuation–dissipation relations are very useful in simulations: they give the responses and from the fluctuations of and at fixed temperature and field, without having to take numerical derivatives. Since , , and are proportional to , we give their values per spin: , , and , which we still call .
The difficulty is the number of terms in . A lattice already has configurations: summing over all of them, even at configurations per second, would take years. Exact results require mathematical tricks (Sections 3 and 5); otherwise we must sample the configurations (Section 6).
2.3 Symmetry and spontaneous symmetry breaking
At , the energy (1) does not change when all the spins are flipped, . For every configuration with magnetization there is one with and the same probability, so
A finite system therefore never has a spontaneous magnetization in the strict sense. A phase transition can only occur in the thermodynamic limit . There, the spontaneous magnetization is defined by taking the limit of a small field in the right order,
If , the system has chosen one of the two directions although the energy has no preferred one: the symmetry is spontaneously broken. The magnetization is the order parameter of the transition. Mathematically, a phase transition is a point where the free energy per spin, in the limit , is not an analytic function of and . Since each finite is a finite sum of exponentials, the non-analyticity can only appear in the limit.
In a large but finite system below the transition, the magnetization does not vanish at a given moment: it fluctuates around or , and very rarely jumps from one to the other. This is why simulations measure rather than . For the same reason, the 2D simulations at measure the fluctuations of ,
instead of Eq. (4), which in a finite system at reduces to and grows like below because flips between . Below , measures the response within one ordered state; above , where has Gaussian fluctuations, . Both diverge at with the same exponent. All the 2D results at below use ; the 1D results, and all results in a field, use Eq. (4).
2.4 Warm-up: independent spins
Without interactions (), the spins are independent:
This is a paramagnet: the field aligns the spins against thermal agitation, and the susceptibility follows Curie's law . There is no spontaneous magnetization. Interactions are needed for order.