# What energy is used by a magnet to attract another magnet?

People sometimes ask, “What is the source of the energy expended by a magnet to attract another magnet, giving it kinetic energy? After all, the magnet doesn’t get colder.” The energy aspects of a magnet accelerating another magnet can indeed seem mysterious.

Here is a brief summary of an argument presented in the mechanics section of our “Matter & Interactions” textbook that shows that it must be energy in the magnetic or electric or gravitational field that is the source of the increased kinetic energy. Consider two similar stars A and B far from each other, initially at rest. They accelerate each other, moving toward each other faster and faster. It is customary (and gives the correct results) to take the two stars as the system of choice and quantify the energy of the system (neglecting the constant rest masses) as kinetic energy plus gravitational potential energy of the two stars. The change in the energy of the system plus the change in the energy of the surroundings is zero (energy conservation). Since there is nothing in the surroundings, the change of kinetic energy plus change of potential energy is zero, from which we can calculate the final kinetic energy of the two stars.

If we choose star A as the system, the surroundings consist of star B. The kinetic energy of our chosen system, star A, increases, so for energy to be conserved the energy of the surroundings must decrease. However, the kinetic energy star B increases, not decreases. How can one deal with this paradox?

We state that there is energy in the “field,” field being a concept to be introduced in the second-semester course, and we’re even able to calculate the amount by which the field energy changes despite not even knowing what it is. Keep in mind that single objects don’t have potential energy, only pairs of interacting particles in a system have potential energy. Therefore the change K in the kinetic energy of the system (star A) plus the change K in the kinetic energy of star B (part of the surroundings) plus the change in the field energy (also part of the surroundings) must be equal to zero, so the change in the field energy is -2K. We then comment that calculations based on the concept of potential energy give the correct result, but that in general there’s an issue. The case of an electron and a positron attracting each other is entirely similar to the two-star case, but the field energy is associated with electric and magnetic fields.

The article on the net work done by magnetic forces shows that forces exerted by a magnetic dipole can do positive work on another magnetic dipole as long as these forces also do the same amount of negative work. In the case illustrated with a VPython program in that article, the rotational kinetic energy of a magnetic dipole decreases with increasing translational kinetic energy, and vice versa. A question was raised about how we might understand the energetics of two magnets attracting each other. In response to this and others’ questions about this, Ruth Chabay and I had a conversation that resulted in some understanding, which I want to share.

The mystery of where does the energy come from to accelerate a magnet is no more (and no less) mysterious than the mystery of where does the energy come from for an electron to accelerate a positron. We don’t typically think about where the energy comes from when electric charges attract each other, but for some reason we do puzzle over the attraction of two magnets. In both cases the answer is field energy.

A VPython program models an electron and positron starting from rest and attracting each other. In a large cylindrical region of space, as the particles approach each other, the field energy is summed repeatedly over a volume much larger than the particle separation. As a computational convenience, the change in the total kinetic energy is repeatedly calculated from the change in electric potential energy, but it could also have been done in terms of iterative use of force and momentum, without using the concept of potential energy. The change in the kinetic energy plus the change in the field energy is seen to be zero as expected. The program also treats the case of two electric dipoles attracting each other, and for calculational purposes one can think of this as modeling two magnetic dipoles, each modeled as two magnetic monopoles. (In the case of the two moving charges, their magnetic field is ignored, and in the case of the two moving magnetic dipoles thought of as consisting of magnetic monopoles, their electric field is ignored, because the speeds are small.)

A tricky part of the calculation is to avoid the singularity of the infinite field near a point charge. Steve Spicklemire suggested a simple scheme, which is to model the point charge as a thin hollow uniformly charged sphere, so that this charge’s own contributions inside that sphere are zero. The space is divided into a large number of volume elements in the form of cyindrical shells, each of length and wall thickness equal to the diameter of the sphere. Since the sphere nearly fills its volume element, it’s a good approximation to say that the field contributed by this charge is zero throughout the volume element, and only the other charges contribute field in this volume element.

I exploit the axial and near-mirror symmetry of both situations, the two-charge case and the two-dipole case. I sum E2 only in the right half plane, because the net field in a volume element points in opposite directions in two “mirror” containers while the magnitude is the same. So I get the sum of E2 for the entire volume simply by multiplying by two the sum for the right half plane.

I sum E2 throughout a large cylinder which is subdivided into cylindrical shells of length d and thickness d. Looking end-on at a cylinder with inner diameter r and outer diameter r+d (and depth d), I compute E at location r+d/2 (and at the longitudinal center of the shell), take that as a good average to the field everywhere in the shell, and multiply E2 by the volume of the shell, $dV = \pi ((r+d)^2 - r^2)d$. The field energy content of this volume element is $0.5\epsilon_0 E^2 dV$.

At first I couldn’t get the two-dipole sum to stay zero. It turned out that my choice of a volume that was supposed to represent all space was too small. When I made the total volume significantly bigger, the change in particle energy plus the change in field energy stayed (nearly) zero.

There’s another aspect to this computation worth pointing out. In M&I, as in other introductory treatments of electric field, we choose an object with charge q, calculate the field E contributed by all the other charges in the universe, and calculate the force F on the chosen object as F = qE. There is another way of dealing with electric field, of particular importance in plasma physics, which is to calculate the field due to all charges in the universe, and then draw conclusions from the pattern of this field. I calculate the field everywhere, made by all of the charges, and from this field I calculate the total field energy. This is a different way of thinking about electric field.

Jarrett Lancaster tells me that it is possible to calculate analytically the change in field energy for two charges approaching each other. I asked how the singularities are handled, and he explained that when you set up the integrals it is possible to identify a component that though infinite doesn’t change. He also said that it is useful to recognize that $E^2 = (\vec{E}_1 + \vec{E}_2) \centerdot (\vec{E}_1 + \vec{E}_2) = E_1^2 + 2\vec{E}_1 \centerdot \vec{E}_2 + E_2^2$, since the integrals of $E_1^2$ and $E_2^2$ do not change. He wasn’t sure whether the two-dipole case has an analytical solution, but it seems likely. Nevertheless, the numerical approach described here has the advantage that it can work for more complex situations than the ones described, though of course some of the symmetry properties exploited here might not be valid.

Bruce Sherwood

This entry was posted in Uncategorized. Bookmark the permalink.

### 7 Responses to What energy is used by a magnet to attract another magnet?

1. Amrit says:

Thankyou very very much for this information! This is what I struggle to understand at past few years even though many of the concept are new for me which I don’t understand yet but thanks for adding new direction in my thought.

2. Hunter Close says:

Thanks for this work, Bruce. I’ve read this one and also “Magnetic forces do no (net) work”. I’m still wondering though about a question that seems to have been raised but not answered: How do we reconcile the basic ideas of each of the two articles? When magnet 1 attracts magnet 2, and the energy comes from the field, that would seem to be positive work on magnet 2. Is magnet 1 somehow doing negative (microscopic? / internal, through induced currents?) work on magnet 2 while doing positive work to increase its macro kinetic energy?

3. BruceSherwood says:

Good questions. The key issue is that when analyzing the two magnets attracting each other, the system is the Universe, which contains two magnets and space filled with magnetic field, which is where energy resides. When one computes the field energy one finds that that the total field energy decreases if/when the magnets move closer to each other, so they do, with a corresponding increase in their kinetic energy. In contrast, in the other article (“Magnetic forces do no (net) work”) the system is just the wheel on the right, acted upon by magnetic fields generated by the current loop on the left, and initially the translational kinetic energy of the wheel increases as its rotational kinetic energy decreases, with the total kinetic energy staying constant. It’s important to note that the wheel is treated as a single object, not two interacting objects, so the system of the wheel does not undergo any change in potential energy. Note that one can analyze a falling rock either by considering the rock as the system (in which case there is no potential energy; dK = W = mgh) or consider the rock plus Earth as the system (in which case there is potential energy (dK+dU = 0). Presumably one could do the latter analysis not in terms of “potential energy” but instead in terms of “gravitational field energy”. Similarly, we could analyze the two magnets approaching each other in terms of magnetic potential energy (mu.B) instead of in terms of field energy. Does this make sense? If not, ask again!

4. Hunter Close says:

Thank you, but no, I don’t think this addresses my question. I read your response carefully, and I believe I already understood all of those points. I can ask my question more directly. Let’s say we have magnet 1 and magnet 2. Magnet 1 is held in place, and magnet 2 is released from rest and allowed to move in response to its attraction to magnet 1. Let’s also define a system that contains just magnet 2. Magnet 2 increases in kinetic energy as it speeds up toward magnet 1. Where was this energy when magnet 2 was at rest? Was it in the field? If so, then there was positive work on magnet 2 by the field. And, more importantly, it would seem then that magnets are not really that special; this would be the analysis we would give for a gravitational or electrostatic attraction. Alternatively, was the energy somehow contained in magnet 2 already, as in the wheel example? This would mean that something would have to be changing internally to magnet 2, perhaps through induced currents or something inside magnet 2. This would be consistent with the idea that magnetic fields do no (net) work, and it seems that this is a distinguishing feature of magnetic fields. So, my question amounts to: in the case of two magnets, are magnetic fields still special (no net work) or are they just like other fields?

5. BruceSherwood says:

My first comment is to repeat that one may ask why a proton attracts an electron: what is the source of the energy? The answer would seem to be, taking the universe as the system, that the energy is in the field. As the electron moves closer and faster, the field energy decreases. If we take the electron as the system, we have two possible approaches, either (again) note that the field energy (in the “surroundings”) decreases as the electron’s kinetic energy increases. Or we can invent for bookkeeping purposes “potential energy” (a better term would be “configurational energy”), which gives the same answer but with far less effort than calculating the change in the field energy, integrating over all space. In our textbook we note briefly that while a magnetic field cannot do work on a moving charge, it can do work on, for example, on a compass needle released from rest in an east-west orientation, acting on the point-like electrons’ spin-related angular momentum (with these objects bound to the needle). We also comment that there’s a similar issue with why a current-carrying wire jumps when you turn on a magnetic field perpendicular to the wire. The fact that the moving electrons are bound into the wire means that the electrons’ attempts to change direction pulls the wire along with those electrons (there’s also the fact that an energy source is the battery that drives the current in the wire). I guess a careful statement is that a magnetic field cannot do net work on a moving charge, but it can do work on stationary magnetic dipoles, and it can indirectly do work on a current-carrying wire by invoking electric forces that bind the moving charges into the wire. I may have to add or subtract some comments in this and the “no new work” blog. Thanks.

6. Chris Fuller says:

Great post, thank you. For an antenna to generate magnetic fields requires energy to be input to the antenna, but the energy stored in the field of a bar magnet does not appear to be diminished no matter how many times it is used to perform work such as when it is used to aid in turning a motor or generator via a permanent magnet combined with an electromagnet. Field energy is converted into kinetic energy or acceleration both as the rotor/electromagnet approaches the permanent magnet and then the sign of the magnetic field is changed at the midpoint in the electromagnet so kinetic energy is further imparted as the rotor/electromagnet moves away from the stator. Adding energy to the electromagnet is required to impart continuous motion, but why is the field energy stored in the permanent magnet never increased or diminished?

• BruceSherwood says:

Field energy isn’t stored “in” the permanent magnet, it is stored in all of space. Consider a magnet “A” that is held in a fixed position. It attracts another magnet “B” that is released from rest and moves toward the fixed magnet. As the kinetic energy of “B” increases, the total field energy decreases. Let’s suppose that “B” compresses a spring and comes to a stop. The sum of the field energy plus the potential energy stored in the spring is equal to the original field energy. It is important to note that to move “B” back to its original location will require that you do work to push it there, and the work you do goes into restoring the original field energy. It is really important to keep in mind that the field energy is not a property of one of the magnets but of both of them, and it certainly is not the case that the field energy is “in” a magnet. As for the difference between a magnet and a current-carrying coil, it takes energy to keep the current running the coil, unless it’s a superconducting coil, and in the latter case the situation is just like that of the two magnets.