# How can an electron's magnetic moment precess around the direction of an external magnetic field?

I am reading this article: The Nature of the Electron by Don Lincoln in The Physics Teacher, Volume 54 (2016), pg. 203, and I ran across the part where he talks about measuring the magnetic moment of the electron by placing it in a magnetic field.

A magnetic moment in an external magnetic field experiences a torque, causing it (the magnetic moment) to precess around the direction of the external field. That makes sense, except, the magnetic moment of the electron is proportional to its spin. So aren't we effectively performing a measurement of the spin of an electron when we place it in a magnetic field to measure its magnetic moment? Shouldn't it have to then choose to be either aligned or anti-aligned with the external magnetic field, just like when we measure the spin along some arbitrary axis, we find either spin up or spin down? If so, then it seems that it shouldn't precess, because the torque would be zero.

Let the magnetic field be in the $\hat z$ direction. If you calculate the expectation values of $S_x$ and $S_y$, you find that they have time dependence like $\cos(\omega t),\sin(\omega t)$ while the expectation value of $S_z$ is constant.
Explicitly, the Hamiltonian is $H = -\omega \sigma_z$. Using the Heisenberg equation of motion, \begin{align} \dot \sigma_z = \frac{i}{\hbar} [H,\sigma_z] & = 0 \\ \dot \sigma_x = \frac{i}{\hbar} [H, \sigma_x]&= \omega \sigma_y\\ \dot \sigma_y = \frac{i}{\hbar} [H, \sigma_y]&= -\omega \sigma_x\end{align} and these are precisely the equations for the components of a vector precessing around $\hat z$.
As far as I know, the external magnetic field that produces a torque on the magnetic moment is not necessarily the reason for the precession of it around the direction of the magnetic field. The magnetic moment of an electron is proportional to it's spin and its revolving motion around the nucleus. so when an external field acts on it, it tends to align in the direction of the field. in an atom, the electron revolves around the nucleus, similar to a circular wire with current I. That current produces the magnetic moment. Normally (in wires), the magnetic moment is perpendicular to the surface of the loop and, after equilibrium, will align to the direction of field (say in z-axis). however, in atoms, the quantum uncertainty principle adds restrictions to the uncertainty of position of the electron with respect to the z-coordinate, and so, the effect is something like as the electron orbits the z-axis, it somehow does not follow a perfect path, but 'wobbles' up and down (so as to produce the uncertainty), and the resulting magnetic moment will not align exactly with the field, but rather at an angle $\theta$ around it, which produces what we call 'precession'. But the average direction of those magnetic moments will be aligned to the magnetic field.