A magnetic moment in an externally produced magnetic field has a potential energy U:
U=-oldsymbol{mu}cdotmathbf{B}
In a case when the external magnetic field is non-uniform, there will be a force, proportional to the magnetic field gradient, acting on the magnetic moment itself. There has been some discussion on how to calculate the force acting on a magnetic dipole. There are two expressions for the force acting on a magnetic dipole, depending on whether the model used for the dipole is a current loop or two monopoles (analogous to the electric dipole).[6] The force obtained in the case of a current loop model is
mathbf{F}_ ext{loop}=
abla left(oldsymbol{mu}cdotmathbf{B}
ight)
In the case of a pair of monopoles being used (i.e. electric dipole model)
mathbf{F}_ ext{dipole}=left(oldsymbol{mu}cdot
abla
ight) mathbf{B}
and one can be put in terms of the other via the relation
mathbf{F}_ ext{loop}=mathbf{F}_ ext{dipole} + oldsymbol{mu} imes left(
abla imes mathbf{B}
ight)
In all these expressions μ is the dipole and B is the magnetic field at its position. Note that if there are no currents or time-varying electrical fields ∇ × B = 0 and the two expressions agree.
An electron, nucleus, or atom placed in a uniform magnetic field will precess with a frequency known as the Larmor frequency