# How the potential energy of the dipole is $m.\vec{B}$ when work done by any magnetic field is Zero?

We know that magnetic fields don't do any work on ANY CHARGE from the form of Lorentz force we have here. But we still have magnetic dipole getting oriented by external magnetic fields. Now, intuition says that it has to be the currents in the magnetic dipoles which are causing some electric fields to get induced which in turn produces a magnetic field and so on. Something similar to this has come up in the past Is the work done by magnetic field always zero?. But the answer given here is very vague as to what really happens in microscopic physics. I want to know what exactly is happening in the view of classical electrodynamics and how the two pictures are not contradicting each other.

On The Side Note

I have faced similar problems before too in which I am comparing two pictures in electrodynamics and couldn't move forward without stamping out the assumptions of either of the theories/pictures. Like in this case, we have derived all the electromagnetism (I think!) from the point of view of a macroscopic world in which a constant current is driving the magnetic field. And the net charge inside such current flow is zero. All the microscopic interactions, on average, give rise to these macroscopic phenomena. So telling in some situations that you really have to go to sub-atomic to explain this phenomenon seems wrong. So, there shouldn't be any difference between microscopic and macroscopic physics as we took care of all those while averaging out.

• In terms of a free current density distribution, modelling an e.g wire, the net force appears to do work This is because we "force" the distribution to maintain its shape by inputting a specific current distribution that is non maliable. There are hidden forces that you don't consider when modelling these distributions since in reality they would fly apart. The individual electrons in the wire for example would not have any work done on them but they collide with the lattice and accelerating it(also non em forces,) Modelling a simple fixed distribution therefore has work done on it, since - Jan 28, 2023 at 18:15
• The premise of the magnetic force not doing work is based on particles, not fixed distributions. ( which would otherwise be impossible distributions without taking into account other forces) Jan 28, 2023 at 18:16
• I found a nice paper that mentioned the same thing in III section: aapt.scitation.org/doi/pdf/10.1119/1.15782 Feb 4, 2023 at 7:23

Suppose we have some kind of static external magnetic field acting on a current loop. There are a few ways in which the overall process can result in the loop acquiring energy:

• The loop is lifted against a gravitational field
• The loop accelerates linearly because the magnetic field is non-uniform
• The loop accelerates angularly in the direction tending to align its magnetic dipole moment with the external magnetic field

In all of these cases, a back emf will develop in the loop (Faraday's law), tending to reduce the magnitude of the magnetic dipole moment. If our assumption is that the magnetic dipole moment is held constant, then it must be the case that the loop contains a battery and a regulator, or something of the sort. The battery does work on the charges; the magnetic field does not.

From the point of view of classical electrodynamics, a point magnetic dipole such as an electron is basically just an infinitesimal version of this, and no special treatment is required. We just take the limit as the size of the current loop goes to zero, and imagine that the regulator is so perfect that there are not even slight fluctuations in the magnitude of the magnetic dipole moment.

Magnetic dipole vs magnetic moment

You ask about magnetic dipole, but you mean magnetic moment due to current loops. Strictly speaking, magnetic dipole is a collection of two magnetic poles with non-zero magnetic dipole moment (the Coulomb magnetic moment). It is a useful model of a magnet from the Coulomb theory of magnetostatics, where magnetic field can do work on magnetic poles; in this theory, force on physical magnetic dipole made of two particles with magnetic pole charge $$q,-q$$ at positions $$\mathbf r_1,\mathbf r_2$$ is

$$\mathbf F = q \bigg(\mathbf H(\mathbf r_1) -\mathbf H(\mathbf r_2) \bigg).$$ Deriving the formula for potential energy for such a dipole in magnetic field $$E_p = - \mathbf m \cdot \mathbf B$$ is easy, the derivation is just like that for potential energy of an electric dipole in external field in electrostatics.

$$E_p = - \mathbf m \cdot \mathbf B$$

is consistent with the idea that magnetic field cannot do work on charged particles (due to the Lorentz formula), you are asking about magnetic moment that is due to a current loop, not about magnetic moment due to magnetic dipole (which belongs to the theory above).

Energy of magnetic moment in external magnetic field

The potential energy formula

$$E_p = - \mathbf m \cdot \mathbf B$$

is still valid in a limited sense for systems where the magnetic moment $$\mathbf m$$ is due to a current loop, but it is harder to derive. It is easier to derive it in special cases, such as magnetic moment due to loop of current.

Work of external forces on a current loop in changing external magnetic field

Consider a planar current loop, placed in an external field $$\mathbf B_{ext}$$ that we can control. Let the loop be in unstable position in the magnetic field (held in place by some external forces), so that magnetic field is $$\mathbf B_{ext,1}$$ (rougly in the direction of the $$z$$-axis), the current is $$I_1$$ (negative), $$\mathbf S = A\mathbf e_z$$ is the surface area vector of the circuit, and magnetic moment is $$\mathbf m_1 = I_1 \mathbf S = I_1 A \mathbf e_z$$ (roughly of opposite orientation to the magnetic field).

Then during a small time interval $$\Delta t$$ we slowly increase the external magnetic field by a little to a value $$\mathbf B_{ext,2} = \mathbf B_{ext,1} + \Delta \mathbf B_{ext}$$.

Due to this change, during that time the current will experience induced electric field due to external sources $$\mathbf E_{i,ext}$$ and entire circuit will experience induced EMF that boosts the current in the original direction. As this proceeds, the external induced electric field will do work on the current, and since this is a conservative system, this work will get stored in the system (as increased magnetic energy). So we can use this work to define potential energy:

$$\text{increase of potential energy when going from state 1 to state 2} :=$$ $$\text{work of external induced electric force on the current}.\tag{**}$$

Formally

$$E_{p,2} - E_{p,1} = \Delta W.$$

We can express the work done as function of magnetic field and magnetic moment of the current loop. The procedure could be as follows.

Work done during $$\Delta t$$ can be expressed as the product

$$\Delta W = \mathscr{E}_{ext} I_1 \Delta t$$ where $$\mathscr{E}_{ext}$$ is external induced EMF. This is, due to Faraday's law, equal to minus rate of change of magnetic flux due to external magnetic field through the circuit:

$$\mathscr{E}_{ext} = - \frac{\Delta\mathbf B_{ext} \cdot \mathbf S}{\Delta t}$$

Combining the two last equations, we get

$$\Delta W = - \Delta\mathbf B_{ext} \cdot \mathbf S I_1.$$

However the circuit has, initially, the magnetic moment

$$\mathbf m_1 = I_1 \mathbf S.$$

So the work done is

$$\Delta W = - \Delta\mathbf B_{ext} \cdot \mathbf m_1.$$

Defining potential energy for a "frozen" magnetic moment

If the current loop system is such that current (and thus also magnetic moment) stays almost the same during all the changes of external field we do, we can approximate and say the only changing term on the right-hand side of work done (above) is the external magnetic field. This may be the case when there is already a much greater current in the system than the current changes we can cause by the external magnetic field. Then we can define the following potential energy function of the external magnetic field:

$$E_p (\mathbf B_{ext}) = - \mathbf m \cdot \mathbf B_{ext}. \tag{*}$$

As long as $$\mathbf m$$ changes only negligibly during all changes of magnetic field we do, this potential energy obeys (**). This is somewhat applicable to a ferromagnet in a weak external magnetic field. Its magnetization and magnetization current is almost " frozen" and changes only very little due to weak external field.

The correct potential energy for the current loop in perfect conductor

The potential energy derived above is not valid for an ordinary current loop when the current is entirely induced by changes in external magnetic field.

In general, if the magnetic moment changes are partially non-conservative (e.g. the changes of magnetic moment produce some heat inside), then there is no potential energy that can be defined.

However, if our current loop system is conservative (perfect conductor), exact potential energy function can still be derived. We start with the expression for work done during infinitesimal change:

$$d W = - d\mathbf B_{ext} \cdot \mathbf m.$$

Now, if both $$\mathbf B_{ext}$$ and $$\mathbf m$$ were functions of the same quantity, we could integrate this and find the correct potential energy function.

From Kirchhoff's second circuital law applied to perfect conductor, we have

$$\mathscr{E}_{ext} + \mathscr{E}_{self} = 0,$$

$$\frac{dB}{dt} A = - L\frac{dI}{dt}$$ where $$L$$ is self-inductance of the circuit and $$B$$ is normal component of $$\mathbf B_{ext}$$ effective in calculating the magnetic flux. From this and the initial condition $$I=0, B=0$$ we find that magnetic field is a function of current: $$B = - \frac{L}{A}I.$$ Similarly, magnetic moment magnitude is function of current $$m = IA$$. So now we can express the work done as

$$dW = d\bigg(\frac{1}{2}L I^2\bigg)$$ which suggests that potential energy is $$E_p = \frac{1}{2}L I^2.$$ This can be expressed in terms of external field and magnetic moment: $$E_p = -\frac{1}{2}\mathbf m \cdot \mathbf B_{ext}.$$ This energy expression is half of that given by the sought-for formula (*). The different factor is due to fact that during the process of increase of magnetic field, magnetic moment in

$$- \Delta \mathbf B_{ext} \cdot \mathbf m$$ is built up from zero. Work on zero or very small magnetic moment as field changes by $$\Delta B_{ext}$$ is almost zero, but in the end, work on the final magnetic moment is much larger. Magnetic moment is a linear function of the external magnetic field, so net work is one half of the product of the final values.

This question can be addressed differently if you are working with the macroscopic or the microscopic Maxwell’s equations.

If you use the macroscopic equations then the Lorentz force law is more complicated (M. Mansuripur. Physical Review E 79, 026608, pp 1-10. 2009): $$\mathbf F = \rho_f \mathbf E + \mathbf J_f \times \mu_0 \mathbf H + (\mathbf P \cdot \nabla)\mathbf E + (\mathbf M \cdot \nabla) \mathbf H + (\partial \mathbf P/\partial t)\times \mu_0 \mathbf H -(\partial \mathbf M/\partial t)\times \epsilon_0 \mathbf E$$ where it is clear that work can be done by the magnetic field $$\mathbf H$$ and not just by the electric field $$\mathbf E$$.

If you use the microscopic equations then the question does not arise in a fundamental sense because there is no magnetization on which to do work. However, with the microscopic equations you could make a magnetic dipole from a current loop. Then, the question becomes how to account for the work done on a current loop.

The microscopic Poynting's theorem work term $$\mathbf E \cdot \mathbf J$$ can be expanded by transforming to the rest-frame of the loop. Assuming that $$v\ll c$$ the transformation equations are: $$\mathbf E' = \mathbf E + \mathbf v \times \mathbf B$$ $$\mathbf J' = \mathbf J - \rho \mathbf v$$ where the primed quantities are quantities in the rest frame of the loop. Substituting those into $$\mathbf E \cdot \mathbf J$$ and simplifying, we get: $$\mathbf E \cdot \mathbf J = \mathbf E' \cdot \mathbf J' + \mathbf v \cdot (\rho \mathbf E + \mathbf J \times \mathbf B)$$

So, that means that the $$\mathbf E \cdot \mathbf J$$ term itself contains within it the mechanical work due to the magnetic field. If you pull out the non-mechanical work, then the mechanical work is exactly what you would expect from the macroscopic Lorentz force law, including a term from the magnetic field.

The idea is that an expression like $$\mathbf E \cdot \mathbf J$$ can actually include work done by the magnetic field. The fields are highly inter-related and depend on each other, so it is just a matter of investigating those dependencies.

• This is an interesting relation showing how $\mathbf E\cdot \mathbf J$ transforms between frames, but then you make some incorrect statements. Both sides of that equation give work (per unit time and volume) of electric forces when acting on the current-carrying particles in the lab frame (where the loop element also moves with velocity $\mathbf v$). This cannot be interpreted as "electric work includes the work of magnetic forces in the lab frame", regardless of the fact that this electric work can be expressed as $\mathbf v \cdot \mathbf f_{EM~force~on~loop}$ and some other term. Jan 29, 2023 at 0:32
• Relating electric work in one frame to electric work in other frame has no bearing on the fact that we are evaluating purely electric work. One example to see this easily. Consider the case where in the lab frame, electric field vanishes but there is magnetic field $\mathbf B$. Then work of electric forces in the lab frame is zero, and in the loop frame it is $\mathbf E'\cdot \mathbf J' = -\mathbf v\cdot(\mathbf J \times \mathbf B)$. The right-hand side is minus the work of macroscopic magnetic force acting on the moving loop element in the lab frame. Jan 29, 2023 at 0:33
• So electric work in the frame of the loop has the same value as macroscopic magnetic work on the loop in the lab frame. But this is relating different kinds of work in different frames. It does not show that electric work in the lab frame already contains magnetic work in the lab frame. In this example, the first is zero, but the second is not. Jan 29, 2023 at 0:33
• One physical way to interpret this last relation is to rewrite $-\mathbf v \cdot (\mathbf J \times \mathbf B)$ into $(\mathbf v\times \mathbf B)\cdot \mathbf J$ which is a well-known work of motional EMF (due to motion of the loop in external magnetic field) on current in the lab frame. This work in the lab frame is, in general, non-zero, as opposed to work of electric field (which is zero). Jan 29, 2023 at 1:06
• Let the motion of the element in consideration be such that this work is positive. Then the loop element transfers energy to current and has to lose equal energy itself; this is achieved by the work of macroscopic magnetic force on the loop element that is of the same magnitude, but opposite sign. Neither of these works are part of electric work in the lab frame. The working forces are due to the loop lattice (when acting on the current), or due to macroscopic magnetic force (when acting on the loop lattice). Jan 29, 2023 at 1:06