# Magnetization Vector from XY Model for an AntiFerromagnetic System

I am working on an XY model and I'm trying to calculate the magnetization and direction for an anti-ferromagnetic (AF) system. So I have a collection of spins in the $XY$ plane represented as vectors $s$ and when cooled then they will order (anti-align). The magnetization is normally calculated as

$$M = \frac{1}{N}\sum_i^N s_i,$$

This formula does not describe how aligned the spins are (it's like it only works accurately for a ferro-type behavior). What suggestions are available for measuring the order in an AF system (I'm also interested in the invariance as well)?

I believe that you need the staggered magnetization (you can search for the term online). For a simple geometry, such as a square lattice, assuming that the ordered phase is like a checkerboard (spins on the black squares point one way and spins on the white squares point the opposite way) you can define it as $$\mathbf{M}^{\dagger} = \frac{1}{N_x N_y} \sum_{i_x=1}^{N_x} \sum_{i_y=1}^{N_y} (-1)^{i_x+i_y} \mathbf{s}_{i_x,i_y}$$ where the spins are labelled by their 2D lattice position $(i_x,i_y)$ (both integers) and there are $N=N_xN_y$ spins in total.
For more complicated phases, the term multiplying the spin is $\exp[i \mathbf{q}\cdot(i_x,i_y)]$ where $\mathbf{q}$ is the ordering wave-vector in units consistent with the lattice spacing (usually this exponential factor will turn out to be $\pm 1$ at each lattice site).