What is the definition of magnetic moment in quantum mechanics?

• The general formula for the magnetic moment of a charge configuration is defined as $$\vec{\mu} = \frac{1}{2} \int \vec{r} \times \vec{J} \,d^3r$$

• For an electron it's said that the correct equation relating it's spin and magnetic moment is is $$\vec{\mu} =g\frac{q}{2m}\vec{S}$$

• It's said that the above equation cannot be justified classically and is a quantum mechanical phenomenon.

What is the definition of magnetic moment used in the quantum mechanical equation $$\vec{\mu} =g\frac{q}{2m}\vec{S}$$

The magnetic moment $$\vec{\mu}$$ of a charge configuration is defined by the torque $$\vec{\tau}$$ it feels when being in an external magnetic field $$\vec{B}$$ $$\vec{\tau}=\vec{\mu}\times\vec{B}$$ or equivalently by its potential energy $$U$$ when being in this external field $$\vec{B}$$ (see Magnetic Moment - Effects of an external magnetic field) $$U=-\vec{\mu}\cdot\vec{B}.$$

This definition is used both for classical and for quantum-mechanical systems.

The difference begins when you want to get a relation between magnetic moment $$\vec{\mu}$$ and angular momentum. For orbital momentum $$\vec{L}$$ you have (both classically and quantum-mechanically) $$\vec{\mu} = g\frac{q}{2m}\vec{L}\quad\text{, with } g=1$$ which can be derived theoretically and confirmed experimentally (by measuring the torque or energy).

But for spin angular momentum $$\vec{S}$$ of the electron experiments show $$\vec{\mu} = g\frac{q}{2m}\vec{S}\quad\text{, with } g=2.0023$$ which is roughly double the size than for orbital momentum. This cannot be understood by classical mechanics. But from Pauli's equation (i.e. with non-relativistic quantum mechanics) or from Dirac's equation (i.e. with relativistic quantum mechanics) you can derive this formula with $$g=2$$. And with the full theory of quantum electrodynamics you can even derive it with the exact value $$g=2.0023$$ (see $$g$$-factor).

• The factor $g$ is actually not exactly 2 but 2.00231930436. This value has been found both experimentally and theoretically. Jan 23 at 22:20
• @md2perpe You are right. I have improved the answer for this. Jan 23 at 22:58
• You can understand the factor of 2 using just non relativistic quantum mechanics Jan 23 at 23:33
• @Mauricio You are right. I've reread the derivation from Pauli's equation Jan 24 at 1:56
• @Thomas Fritsch, thank you. I've seen on many places the definition of magnetic moment to be as $\vec{\mu} = \frac{1}{2} \int \vec{r} \times \vec{J} \,d^3r$ ,that's why I got confused. Jan 24 at 4:32