# Classical XY model

The classical XY model (sometimes also called classical rotor (rotator) model or O(2) model) is a lattice model of statistical mechanics. In general, the XY model can be seen as a specialization of Stanley's n-vector model for n = 2.

## Definition

Given a D-dimensional lattice Λ, per each lattice site j ∈ Λ there is a two-dimensional, unit-length vector s$_j$ = (cos θ$_j$, sin θ$_j$)
The spin configuration, s = (s$_j$)$_{j∈Λ}$ is an assignment of the angle −π < θ$_j$ ≤ π for each j ∈ Λ.
Given a translation-invariant interaction J$_{ij}$ = J(i − j) and a point dependent external field $\mathbf {h} _{j}=(h_{j},0)$, the configuration energy is
    $H(\mathbf {s} )=-\sum _{i\neq j}J_{ij}\;\mathbf {s} _{i}\cdot \mathbf {s} _{j}-\sum _{j}\mathbf {h} _{j}\cdot \mathbf {s} _{j}=-\sum _{i\neq j}J_{ij}\;\cos(\theta _{i}-\theta _{j})-\sum _{j}h_{j}\cos \theta _{j}$
The case in which J$_{ij}$ = 0 except for ij nearest neighbor is called nearest neighbor case.
The configuration probability is given by the Boltzmann distribution with inverse temperature β ≥ 0:
    $P(\mathbf {s} )={\frac {e^{-\beta H(\mathbf {s} )}}{Z}}\qquad Z=\int _{[-\pi ,\pi ]^{\Lambda }}\prod _{j\in \Lambda }d\theta _{j}\;e^{-\beta H(\mathbf {s} )}.$
where Z is the normalization, or partition function. The notation $\langle A(\mathbf {s} )\rangle$ indicates the expectation of the random variable A(s) in the infinite volume limit, after periodic boundary conditions have been imposed.

## Rigorous results

* The existence of the thermodynamic limit for the free energy and spin correlations were proved by Ginibre, extending to this case the Griffiths inequality.
* Using the Griffiths inequality in the formulation of Ginibre, Aizenman and Simon proved that the two point spin correlation of the ferromagnetics XY model in dimension D, coupling J > 0 and inverse temperature β is dominated by (i.e. has an upper bound given by) the two point correlation of the ferromagnetic Ising model in dimension D, coupling J > 0 and inverse temperature ⁠β/2⁠ $\langle \mathbf {s} _{i}\cdot \mathbf {s} _{j}\rangle _{J,2\beta }\leq \langle \sigma _{i}\sigma _{j}\rangle _{J,\beta }$ Hence the critical β of the XY model cannot be smaller than the double of the critical β of the Ising model $\beta _{c}^{XY}\geq 2\beta _{c}^{\rm {Is}}$

### One dimension

As in any 'nearest-neighbor' n-vector model with free (non-periodic) boundary conditions, if the external field is zero, there exists a simple exact solution. In the free boundary conditions case, the Hamiltonian is $H(\mathbf {s} )=-J[\cos(\theta _{1}-\theta _{2})+\cdots +\cos(\theta _{L-1}-\theta _{L})]$ therefore the partition function factorizes under the change of coordinates $\theta _{j}=\theta _{j}'+\theta _{j-1}\qquad j\geq 2$ This gives ${\begin{aligned}Z&=\int _{-\pi }^{\pi }d\theta _{1}\cdots d\theta _{L}\;e^{\beta J\cos(\theta _{1}-\theta _{2})}\cdots e^{\beta J\cos(\theta _{L-1}-\theta _{L})}\\&=2\pi \prod _{j=2}^{L}\int _{-\pi }^{\pi }d\theta '_{j}\;e^{\beta J\cos \theta '_{j}}=(2\pi )\left[\int _{-\pi }^{\pi }d\theta '_{j}\;e^{\beta J\cos \theta '_{j}}\right]^{L-1}=(2\pi )^{L}(I_{0}(\beta J))^{L-1}\end{aligned}}$ where $I_{0}$ is the modified Bessel function of the first kind. The partition function can be used to find several important thermodynamic quantities. For example, in the thermodynamic limit ($L\to \infty$), the free energy per spin is $f(\beta ,h=0)=-\lim _{L\to \infty }{\frac {1}{\beta L}}\ln Z=-{\frac {1}{\beta }}\ln[2\pi I_{0}(\beta J)]$ Using the properties of the modified Bessel functions, the specific heat (per spin) can be expressed as ${\frac {c}{k_{\rm {B}}}}=\lim _{L\to \infty }{\frac {1}{L(k_{\rm {B}}T)^{2}}}{\frac {\partial ^{2}}{\partial \beta ^{2}}}(\ln Z)=K^{2}\left(1-{\frac {\mu }{K}}-\mu ^{2}\right)$ where $K=J/k_{\rm {B}}T$, and $\mu$ is the short-range correlation function,
$\mu (K)=\langle \cos(\theta -\theta ')\rangle ={\frac {I_{1}(K)}{I_{0}(K)}}$
Even in the thermodynamic limit, there is no divergence in the specific heat. Indeed, like the one-dimensional Ising model, the one-dimensional XY model has no phase transitions at finite temperature.
The same computation for periodic boundary condition (and still h = 0) requires the transfer matrix formalism, though the result is the same.
The partition function can be evaluated as $Z={\text{tr}}\left\{\prod _{i=1}^{N}\oint d\theta _{i}e^{\beta J\cos(\theta _{i}-\theta _{i+1})}\right\}$ which can be treated as the trace of a matrix, namely a product of matrices (scalars, in this case). The trace of a matrix is simply the sum of its eigenvalues, and in the thermodynamic limit $L\to \infty$ only the largest eigenvalue will survive, so the partition function can be written as a repeated product of this maximal eigenvalue. This requires solving the eigenvalue problem $\oint d\theta '\exp\{\beta J\cos(\theta '-\theta )\}\psi (\theta ')=z_{i}\psi (\theta )$ Note the expansion $\exp\{\beta J\cos(\theta -\theta ')\}=\sum _{n=-\infty }^{\infty }I_{n}(\beta J)e^{in(\theta -\theta ')}=\sum _{n=-\infty }^{\infty }\omega _{n}\psi _{n}^{*}(\theta ')\psi _{n}(\theta )$
$\psi =\exp(in\theta )$
$\beta J$
$\omega _{n}=2\pi I_{n}(\beta J)$
$\beta J$
$I_{0}>I_{1}>I_{2}>\cdots$
$I_{-n}(\beta J)=I_{n}(\beta J)$
$I_{0}$
$Z=[2\pi I_{0}(\beta J)]^{L}$
This transfer matrix approach is also required when using free boundary conditions, but with an applied field $h\neq 0$. If the applied field $h$ is small enough that it can be treated as a perturbation to the system in zero-field, then the magnetic susceptibility $\chi \equiv \partial M/\partial h$ can be estimated. This is done by using the eigenstates computed by the transfer matrix approach and computing the energy shift with second-order perturbation theory, then comparing with the free-energy expansion $F=F_{0}-{\frac {1}{2}}\chi h^{2}$. One finds $\chi (h\to 0)={\frac {C}{T}}{\frac {1+\mu }{1-\mu }}$ where $C$ is the Curie constant (a value typically associated with the susceptibility in magnetic materials). This expression is also true for the one-dimensional Ising model, with the replacement $\mu =\tanh K$.

### Two dimensions

The two-dimensional XY model with nearest-neighbor interactions is an example of a two-dimensional system with continuous symmetry that does not have long-range order as required by the Mermin–Wagner theorem. Likewise, there is not a conventional phase transition present that would be associated with symmetry breaking. However, as will be discussed later, the system does show signs of a transition from a disordered high-temperature state to a quasi-ordered state below some critical temperature, called the Kosterlitz-Thouless transition. In the case of a discrete lattice of spins, the two-dimensional XY model can be evaluated using the transfer matrix approach, reducing the model to an eigenvalue problem and utilizing the largest eigenvalue from the transfer matrix. Though the exact solution is intractable, it is possible to use certain approximations to get estimates for the critical temperature $T_{c}$ which occurs at low temperatures. For example, Mattis (1984) used an approximation to this model to estimate a critical temperature of the system as $(2k_{\rm {B}}T_{c}/J)\ln(2k_{\rm {B}}T_{c}/J)=1$ $k_{\rm {B}}T_{c}/J\approx 0.8816$ The 2D XY model has also been studied in great detail using Monte Carlo simulations, for example with the Metropolis algorithm. These can be used to compute thermodynamic quantities like the system energy, specific heat, magnetization, etc., over a range of temperatures and time-scales. In the Monte Carlo simulation, each spin is associated to a continuously-varying angle $\theta _{i}$ (often, it can be discretized into finitely-many angles, like in the related Potts model, for ease of computation. However, this is not a requirement.) At each time step the Metropolis algorithm chooses one spin at random and rotates its angle by some random increment $\Delta \theta _{i}\in (-\Delta ,\Delta )$. This change in angle causes a change in the energy $\Delta E_{i}$ of the system, which can be positive or negative. If negative, the algorithm accepts the change in angle; if positive, the configuration is accepted with probability $e^{-\beta \Delta E_{i}}$, the Boltzmann factor for the energy change. The Monte Carlo method has been used to verify, with various methods, the critical temperature of the system, and is estimated to be $k_{\rm {B}}T_{c}/J=0.8935(1)$. The Monte Carlo method can also compute average values that are used to compute thermodynamic quantities like magnetization, spin-spin correlation, correlation lengths, and specific heat. These are important ways to characterize the behavior of the system near the critical temperature. The magnetization and squared magnetization, for example, can be computed as
${\frac {\langle M\rangle }{N}}={\frac {1}{N}}|\langle \mathbf {s} \rangle |={\frac {1}{N}}\left|\left\langle \left(\sum _{i=1}^{N}\cos \theta _{i},\sum _{i=1}^{N}\sin \theta _{i}\right)\right\rangle \right|$ ${\frac {\langle M^{2}\rangle }{N^{2}}}={\frac {1}{N^{2}}}\left\langle s_{x}^{2}+s_{y}^{2}\right\rangle ={\frac {1}{N^{2}}}\left\langle \left(\sum _{i=1}^{N}\cos \theta _{i}\right)^{2}+\left(\sum _{i=1}^{N}\sin \theta _{i}\right)^{2}\right\rangle$ where $N=L\times L$ are the number of spins. The mean magnetization characterizes the magnitude of the net magnetic moment of the system; in many magnetic systems this is zero above a critical temperature and becomes non-zero spontaneously at low temperatures. Similarly the mean-squared magnetization characterizes the average of the square of net components of the spins across the lattice. Either of these are commonly used to characterize the order parameter of a system. Rigorous analysis of the XY model shows the magnetization in the thermodynamic limit is zero, and that the square magnetization approximately follows $\langle M^{2}\rangle \approx N^{-T/4\pi }$, which vanishes in the thermodynamic limit. Indeed, at high temperatures this quantity approaches zero since the components of the spins will tend to be randomized and thus sum to zero. However at low temperatures for a finite system, the mean-square magnetization increases, suggesting there are regions of the spin space that are aligned to contribute to a non-zero contribution. The magnetization shown (for a 25x25 lattice) is one example of this, that appears to suggest a phase transition, while no such transition exists in the thermodynamic limit.
Furthermore, using statistical mechanics one can relate thermodynamic averages to quantities like specific heat by calculating $c/k_{\rm {B}}={\frac {\langle E^{2}\rangle -\langle E\rangle ^{2}}{N(k_{\rm {B}}T)^{2}}}$ The specific heat is shown at low temperatures near the critical temperature $k_{\rm {B}}T_{c}/J\approx 0.88$. There is no feature in the specific heat consistent with critical behavior (like a divergence) at this predicted temperature. Indeed, estimating the critical temperature comes from other methods, like from the helicity modulus, or the temperature dependence of the divergence of susceptibility. However, there is a feature in the specific heat in the form of a peak at $k_{\rm {B}}T/J\approx 1.043(4)\approx 1.167(1)T_{c}$. This peak position and height have been shown not to depend on system size, for lattices of linear size greater than 256; indeed, the specific heat anomaly remains rounded and finite for increasing lattice size, with no divergent peak.
The nature of the critical transitions and vortex formation can be elucidated by considering a continuous version of the XY model. Here, the discrete spins $\theta _{n}$ are replaced by a field $\theta ({\textbf {x}})$ representing the spin's angle at any point in space. In this case the angle of the spins $\theta ({\textbf {x}})$ must vary smoothly over changes in position. Expanding the original cosine as a Taylor series, the Hamiltonian can be expressed in the continuum approximation as $E=\int {\frac {J}{2}}(\nabla \theta )^{2}\,d^{2}\mathbf {x}$
The continuous version of the XY model is often used to model systems that possess order parameters with the same kinds of symmetry, e.g. superfluid helium, hexatic liquid crystals. This is what makes them peculiar from other phase transitions which are always accompanied with a symmetry breaking. Topological defects in the XY model lead to a vortex-unbinding transition from the low-temperature phase to the high-temperature disordered phase. Indeed, the fact that at high temperature correlations decay exponentially fast, while at low temperatures decay with power law, even though in both regimes M(β) = 0, is called Kosterlitz–Thouless transition. Kosterlitz and Thouless provided a simple argument of why this would be the case: this considers the ground state consisting of all spins in the same orientation, with the addition then of a single vortex. The presence of these contributes an entropy of roughly $\Delta S=k_{\rm {B}}\ln(L^{2}/a^{2})$, where $a$ is an effective length scale (for example, the lattice size for a discrete lattice) Meanwhile, the energy of the system increases due to the vortex, by an amount $\Delta E=\pi J\ln(L/a)$. Putting these together, the free energy of a system would change due to the spontaneous formation of a vortex by an amount $\Delta F=\Delta E-T\Delta S=(\pi J-2k_{\rm {B}}T)\ln(L/a)$ In the thermodynamic limit, the system does not favor the formation of vortices at low temperatures, but does favor them at high temperatures, above the critical temperature $T_{c}=\pi J/2k_{\rm {B}}$. This indicates that at low temperatures, any vortices that arise will want to annihilate with antivortices to lower the system energy. Indeed, this will be the case qualitatively if one watches 'snapshots' of the spin system at low temperatures, where vortices and antivortices gradually come together to annihilate. Thus, the low-temperature state will consist of bound vortex-antivortex pairs. Meanwhile at high temperatures, there will be a collection of unbound vortices and antivortices that are free to move about the plane.
To visualize the Ising model, one can use an arrow pointing up or down, or represented as a point colored black/white to indicate its state. To visualize the XY spin system, the spins can be represented as an arrow pointing in some direction, or as being represented as a point with some color. Here it is necessary to represent the spin with a spectrum of colors due to each of the possible continuous variables. This can be done using, for example, a continuous and periodic red-green-blue spectrum. As shown on the figure, cyan corresponds to a zero angle (pointing to the right), whereas red corresponds to a 180 degree angle (pointing to the left). One can then study snapshots of the spin configurations at different temperatures to elucidate what happens above and below the critical temperature of the XY model. At high temperatures, the spins will not have a preferred orientation and there will be unpredictable variation of angles between neighboring spins, as there will be no preferred energetically favorable configuration. In this case, the color map will look highly pixellated. Meanwhile at low temperatures, one possible ground-state configuration has all spins pointed in the same orientation (same angle); these would correspond to regions (domains) of the color map where all spins have roughly the same color.
To identify vortices (or antivortices) present as a result of the Kosterlitz–Thouless transition, one can determine the signed change in angle by traversing a circle of lattice points counterclockwise. If the total change in angle is zero, this corresponds to no vortex being present; whereas a total change in angle of $\pm 2\pi$ corresponds to a vortex (or antivortex). These vortexes are topologically non-trivial objects that come in vortex-antivortex pairs, which can separate or pair-annihilate. In the colormap, these defects can be identified in regions where there is a large color gradient where all colors of the spectrum meet around a point. Qualitatively, these defects can look like inward- or outward-pointing sources of flow, or whirlpools of spins that collectively clockwise or counterclockwise, or hyperbolic-looking features with some spins pointing toward and some spins pointing away from the defect. As the configuration is studied at long time scales and at low temperatures, it is observed that many of these vortex-antivortex pairs get closer together and eventually pair-annihilate. It is only at high temperatures that these vortices and antivortices are liberated and unbind from one another.
In the continuous XY model, the high-temperature spontaneous magnetization vanishes: $M(\beta ):=|\langle \mathbf {s} _{i}\rangle |=0$ Besides, cluster expansion shows that the spin correlations cluster exponentially fast: for instance $|\langle \mathbf {s} _{i}\cdot \mathbf {s} _{j}\rangle |\leq C(\beta )e^{-c(\beta )|i-j|}$ At low temperatures, i.e. β ≫ 1, the spontaneous magnetization remains zero (see the Mermin–Wagner theorem), $M(\beta ):=|\langle \mathbf {s} _{i}\rangle |=0$ but the decay of the correlations is only power law: Fröhlich and Spencer found the lower bound
    $|\langle \mathbf {s} _{i}\cdot \mathbf {s} _{j}\rangle |\geq {\frac {C(\beta )}{1+|i-j|^{\eta (\beta )}}}$
while McBryan and Spencer found the upper bound, for any $\epsilon >0$
    $|\langle \mathbf {s} _{i}\cdot \mathbf {s} _{j}\rangle |\leq {\frac {C(\beta ,\epsilon )}{1+|i-j|^{\eta (\beta ,\epsilon )}}}$

### Three and higher dimensions

Independently of the range of the interaction, at low enough temperature the magnetization is positive.
* At high temperature, the spontaneous magnetization vanishes: $M(\beta ):=|\langle \mathbf {s} _{i}\rangle |=0$. Besides, cluster expansion shows that the spin correlations cluster exponentially fast: for instance $|\langle \mathbf {s} _{i}\cdot \mathbf {s} _{j}\rangle |\leq C(\beta )e^{-c(\beta )|i-j|}$.
* At low temperature, infrared bound shows that the spontaneous magnetization is strictly positive: $M(\beta ):=|\langle \mathbf {s} _{i}\rangle |>0$. Besides, there exists a 1-parameter family of extremal states, $\langle \;\cdot \;\rangle ^{\theta }$, such that $\langle \mathbf {s} _{i}\rangle ^{\theta }=M(\beta )(\cos \theta ,\sin \theta )$ but, conjecturally, in each of these extremal states the truncated correlations decay algebraically.

## Phase transition

As mentioned above in one dimension the XY model does not have a phase transition, while in two dimensions it has the Berezinski-Kosterlitz-Thouless transition between the phases with exponentially and powerlaw decaying correlation functions.
In three and higher dimensions the XY model has a ferromagnet-paramagnet phase transition. At low temperatures the spontaneous magnetization is nonzero: this is the ferromagnetic phase. As the temperature is increased, spontaneous magnetization gradually decreases and vanishes at a critical temperature. It remains zero at all higher temperatures: this is the paramagnetic phase.
In four and higher dimensions the phase transition has mean field theory critical exponents (with logarithmic corrections in four dimensions).

### Three dimensional case: the critical exponents

The three dimensional case is interesting because the critical exponents at the phase transition are nontrivial. Many three-dimensional physical systems belong to the same universality class as the three dimensional XY model and share the same critical exponents, most notably easy-plane magnets and liquid Helium-4. The values of these critical exponents are measured by experiments, Monte Carlo simulations, and can also be computed by theoretical methods of quantum field theory, such as the renormalization group and the conformal bootstrap. Renormalization group methods are applicable because the critical point of the XY model is believed to be described by a renormalization group fixed point. Conformal bootstrap methods are applicable because it is also believed to be a unitary three dimensional conformal field theory.
Most important critical exponents of the three dimensional XY model are $\alpha ,\beta ,\gamma ,\delta ,\nu ,\eta$. All of them can be expressed via just two numbers: the scaling dimensions $\Delta _{\phi }$ and $\Delta _{s}$ of the complex order parameter field $\phi$ and of the leading singlet operator $s$ (same as$|\phi |^{2}$ in the Ginzburg–Landau description). Another important field is $s'$(same as $|\phi |^{4}$), whose dimension $\Delta _{s'}$ determines the correction-to-scaling exponent $\omega$. According to a conformal bootstrap computation, these three dimensions are given by:
| $\Delta _{\phi }$ | 0.519088(22) |
| $\Delta _{s}$ | 1.51136(22) |
| $\Delta _{s'}$ | 3.794(8) |
This gives the following values of the critical exponents:
| | general expression ($d=3$) | numerical value |
| α | $2-d/(d-\Delta _{s})$ | -0.01526(30) |
| β | $\Delta _{\phi }/(d-\Delta _{s})$ | 0.34869(7) |
| γ | $(d-2\Delta _{\phi })/(d-\Delta _{s})$ | 1.3179(2) |
| δ | $(d-\Delta _{\phi })/\Delta _{\phi }$ | 4.77937(25) |
| η | $2\Delta _{\phi }-d+2$ | 0.038176(44) |
| ν | $1/(d-\Delta _{s})$ | 0.67175(10) |
| ω | $\Delta _{s'}-d$ | 0.794(8) |
Monte Carlo methods give compatible determinations: $\eta =0.03810(8),\nu =0.67169(7),\omega =0.789(4)$.