# Magnetic Potential Energy?

• KDPhysics
Yeah, that's what we call an electric field. In fact, the electric field is equivalent to the magnetic field, since it is just a vector field that is generated by a current. So the work done by the electric field is just the magnetic work done times the current:$$W=-\int_{\frac{\pi}{2}}^\theta \tau d\theta = - \int_{\frac{\pi}{2}}^\theta \mu B \sin \theta d\theta = \mu B \cos \theta = \boldsymbol{\mu} \cdot \textbf{B}$$.f

#### KDPhysics

Recently I have encountered the following expression for the potential energy of a magnetic dipole of moment ##\boldsymbol{\mu}## placed in an external magnetostatic field B:
$$U=-\boldsymbol{\mu} \cdot \textbf{B}$$.
However, I was told that magnetic fields are non-conservative, so we can't define a scalar potential and thus potential energy.
Since magnetic fields do no work, how can we have a magnetic potential energy? Is it the magnetic torque that does work?
In such case, then I find that given that the magnetic torque is ##\boldsymbol{\tau} =\boldsymbol{\mu} \times \textbf{B}## and hence the work done is:
$$W=-\int_{\frac{\pi}{2}}^\theta \tau d\theta = - \int_{\frac{\pi}{2}}^\theta \mu B \sin \theta d\theta = \mu B \cos \theta = \boldsymbol{\mu} \cdot \textbf{B}$$
where ##\theta## is the angle between the magnetic moment and the external magnetic field. Thus the potential energy is ##-\boldsymbol{\mu} \cdot \textbf{B}## as required.

But it still isn't clear, what causes this potential energy to exist? Magnetic forces do no work after all.

Last edited:
etotheipi and Delta2
Even if the magnetic field cannot do work on matter it can transfer energy to and from the electric field. If you did not include the energy in the magnetic field then energy would not be conserved at all times.

But where is the electric field?

Delta2
But where is the electric field?
Here and there

anorlunda, KDPhysics and Delta2
But where is the electric field?
Apparently there is no associated electric field cause your B-field in the OP is not time varying (magnetostatics case).
However
In order to realize a magnetic dipole moment we need to have some current (i think a current along a small loop has magnetic dipole moment for example ) or some natural magnet. In the first case we have a free current density and in the second case a bound current density that produces the magnetic dipole. In either case if we can relate the torque of the magnetic dipole to the torque of some BiL force (Laplace Force) (where i is the current that corresponds to the aforementioned free or bound current densities) then i can point you to some threads in physics forums where we show that the work done by the BiL force is actually done by an equivalent electrostatic force.

etotheipi and KDPhysics
Could you kindly redirect me to those threads?
I'm seriously not going to sleep without answering this question

Oooh, so it has to do with Lorentz contraction? The fact that the magnetic interaction is simply a relativistic form of the electric field explains how work is being done? I might have to read up on the Lorentz transformations...

Oooh, so it has to do with Lorentz contraction? The fact that the magnetic interaction is simply a relativistic form of the electric field explains how work is being done? I might have to read up on the Lorentz transformations...
The explanation i had in mind doesn't involve relativity and i think its more interesting. Anyway if you decide to go relativity way i won't be able to comment, i am a scrub in relativity.

I'm seriously not going to sleep without answering this question
What is the question remaining now?

KDPhysics
Summary:: How can we define a magnetic potential energy if the magnetic field is non-conservative?

Recently I have encountered the following expression for the potential energy of a magnetic dipole of moment ##\boldsymbol{\mu}## placed in an external magnetostatic field B:
$$U=-\boldsymbol{\mu} \cdot \textbf{B}$$.
However, I was told that magnetic fields are non-conservative, so we can't define a scalar potential and thus potential energy.
Since magnetic fields do no work, how can we have a magnetic potential energy? Is it the magnetic torque that does work?
In such case, then I find that given that the magnetic torque is ##\boldsymbol{\tau} =\boldsymbol{\mu} \times \textbf{B}## and hence the work done is:
$$W=-\int_{\frac{\pi}{2}}^\theta \tau d\theta = - \int_{\frac{\pi}{2}}^\theta \mu B \sin \theta d\theta = \mu B \cos \theta = \boldsymbol{\mu} \cdot \textbf{B}$$
where ##\theta## is the angle between the magnetic moment and the external magnetic field. Thus the potential energy is ##-\boldsymbol{\mu} \cdot \textbf{B}## as required.

But it still isn't clear, what causes this potential energy to exist? Magnetic forces do no work after all.
This is the mechanical potential energy of a magnetic dipole moving in a magnetic field. This has nothing to do with the fact that magnetic fields are usually not describable by a scalar potential. They are rather "solenoidal fields", i.e., obeying ##\vec{\nabla} \cdot \vec{B}=0## and thus have a vector potential ##\vec{A}##, such that ##\vec{B}=\vec{\nabla} \times \vec{A}##.

To see, where the electric field is that does the work think as a classical model for the magnetic dipole a little wire loop with a current in it. The magnetic dipole moment is then given by ##\vec{\mu}=i \vec{f}##, where ##\vec{f}## is the area normal vector given by the right-hand rule.

Neglecting relativistic effects now you can argue as follows: The electrons making up the current move along the wire and feel a force ##\vec{F}_e=-e (\vec{v}_l + \vec{v}_w) \times \vec{B}##, where ##\vec{v}_w## is the velocity of the wire and ##\vec{v}_l## the relative velocity of the electron wrt. the rest frame of the loop, which is along the loop. Now in order that the current stays constant along the loop there must be an electric field ##\vec{E}=-(\vec{v}_l+\vec{v}_w) \times \vec{B}## (that's the Hall effect).

The positively charged ions feel this electric field, ##\vec{F}_w=q \vec{E}##, and this force can do work. The mechanical power thus is (with ##n## the number density of the ions with charge ##+e##)
$$P_{\text{mech}}=n q \int \mathrm{d}^3 x \vec{v}_w \cdot \vec{E}.$$
For a thin wire the volume integral simplifies to
$$P_{\text{mech}}=n e \int \mathrm{d} \vec{r} \cdot \vec{f} (\vec{v}_w \cdot \vec{E}) = -n e \int |\mathrm{d} \vec{r}| |\vec{f}| \vec{v}_l \cdot (\vec{B} \times \vec{v}_w]=+i \int \mathrm{d} \vec{r} \cdot (\vec{B} \times \vec{v}_w).$$
On the other hand the power consumption from the battery is
$$P_{\text{batt}}=i \mathcal{E}=-i \int \mathrm{d} \vec{r} \cdot \vec{E} = +i \int \mathrm{d} \vec{r} \cdot (\vec{v}_w \times \vec{B})=-P_{\text{mech}},$$
i.e., indeed the work done on the wire loop is provided via the Hall-electric field to the wire.

I must admit, I've not thought about how to make this non-relativistic argument fully consistent, but the essence concerning how work is done on a magnetic dipole in a magnetic field should be ok.

etotheipi, Delta2 and KDPhysics
The advisors can correct me if I am wrong, but this is how I see the problem:
Summary:: How can we define a magnetic potential energy if the magnetic field is non-conservative?

Recently I have encountered the following expression for the potential energy of a magnetic dipole of moment μ placed in an external magnetostatic field B:
U=−μ⋅B.
This can be split up into 2 cases. I believe you are referring to the magnetic force on a current-carrying loop. Try deriving this potential energy formula. You'll notice you are involving the magnetic force on a wire, and you find that the magnetic force is moving the wire. This is not the full picture, as the wire is not a moving charge. In fact, if the wire were not there, the electrons would just move in a circle. The wire exerts a force on the electrons to stop them from doing this, and in turn due to N3, the electrons push on the wire. This, I believe, is the force doing work on the wire. This is definitely a form of electrostatic force, but I'm not 100% sure though if this is equivalent to the Hall Effect answer. There's a similar question/response on Stack Exchange that is worth looking at. See the first answer.

There is, however, another case. What about intrinsic magnetic dipole moments, such as in an electron. Here, the magnetic force actually does act as a conservative force (for example, when analyzing the motion of an electron in a magnetic field in QM, you include this potential energy from the B field in the Hamiltonian--it is truly the magnetic force doing work).
Summary:: How can we define a magnetic potential energy if the magnetic field is non-conservative?

However, I was told that magnetic fields are non-conservative, so we can't define a scalar potential and thus potential energy.
This is not true all the time, and in general I would not consider the magnetic field non-conservative. It is not fully conservative, true, but it doesn't fit the definition of non-conservative either. After all, in the cases where the B field does no work, the work done by the B field is not path-dependent.

This is not true all the time, and in general I would not consider the magnetic field non-conservative. It is not fully conservative, true, but it doesn't fit the definition of non-conservative either. After all, in the cases where the B field does no work, the work done by the B field is not path-dependent.

I would say a field ##\vec{f}## is conservative if ##\vec{f} = -\nabla \phi##. Generally the magnetic field is not conservative but rather solenoidal, i.e. ##\vec{B} = \nabla \times \vec{A}##. But we do have Ampere's law, $$\nabla \times \vec{B} = \mu_0 \left (\vec{J} + \epsilon_0 \partial_t \vec{E} \right)$$and then in special cases with no currents of any sort and no time-varying electric fields, we do have ##\nabla \times \vec{B} = \vec{0}## and can maybe describe ##\vec{B}## as conservative.

There is, however, another case. What about intrinsic magnetic dipole moments, such as in an electron. Here, the magnetic force actually does act as a conservative force (for example, when analyzing the motion of an electron in a magnetic field in QM, you include this potential energy from the B field in the Hamiltonian--it is truly the magnetic force doing work).

This is interesting, I don't really know much about it at all. Sometimes we include the vector potential in the Hamiltonian but this doesn't (necessarily) mean the magnetic field is conservative; for instance classically we could look at the (non-conservative) Lorentz force and use the generalised potential ##U = q(\phi - \vec{v} \cdot \vec{A})##, from which we get$$\hat{H} = \frac{\hat{p} \cdot \hat{p}}{2m} + q\phi = \frac{1}{2m}(\vec{p} -q\vec{A})^2 + q\phi$$I don't know what the Hamiltonian for a dipole in QM looks like, but it seems strange to me that the magnetic field would be conservative (but it might well be). I wonder if you or @vanhees71 could clarify this part?

Last edited by a moderator:
The magnetic field is not conservative, but the mechanical potential energy for a magnetic dipole moving in a magnetic field is
$$U=-\vec{m} \cdot \vec{B}.$$
Note, however that this is a magnetostatic approximation. You can derive it from the magnetic force density on a current,
$$\vec{f}_{\text{mag}}=\vec{j} \times \vec{B}=\rho \vec{v} \times \vec{B}.$$
See, e.g.,

W. Nolting, Theoretical Physics 3 (Electrodynamics), Springer (2016)

etotheipi
The magnetic field is not conservative, but the mechanical potential energy for a magnetic dipole moving in a magnetic field is
$$U=-\vec{m} \cdot \vec{B}.$$
Note, however that this is a magnetostatic approximation. You can derive it from the magnetic force density on a current,
$$\vec{f}_{\text{mag}}=\vec{j} \times \vec{B}=\rho \vec{v} \times \vec{B}.$$
See, e.g.,

W. Nolting, Theoretical Physics 3 (Electrodynamics), Springer (2016)
I get that for a current, but what about for intrinsic magnetic dipoles, such as an electron? The magnetic field does seem to be treated as conservative when, for example, looking at Larmor Precession for an electron.

Magnetization is equivalent to a current density,
$$\vec{j}=\vec{\nabla}\times \vec{M}.$$

etotheipi