where, $\vec{M}$ is the magnetic moment of the loop and $\vec{B}$ is the magnetic field.
or $\quad \tau=M B \sin \theta$ where $\theta$ is angle between $M$ and $B$ When $\vec{M}$ and $\vec{B}$ are parallel (i.e. $\theta=0^{\circ}$ ) the equilibrium is stable and when they are antiparallel (i.e. $\theta=\pi$ ) the equilibrium is unstable.


