# Where do magnets get the energy to repel?

If I separate two magnets whose opposite poles are facing, I am adding energy. If I let go of the magnets, then presumably the energy that I added is used to move the magnets together again.

However, if I start with two separated magnets (with like poles facing), as I move them together, they repel each other. They must be using energy to counteract the force that I'm applying.

Where does this energy come from?

-
The reasoning in the second paragraph about energy is wrong and should be compared to the reasoning in the first paragraph which is more correct. – j.c. Nov 2 '10 at 20:29
Conceptually, I try to compare magnetic (and electric) attraction to gravitational attraction. I think of separating the magnets on opposite poles as moving one "uphill" from the other (adding potential energy), so when I release it, it "falls" down (potential turns into kinetic). I believe my problem in the second paragraph is that I'm trying to apply that analogy to facing poles too, except that it's not quite as nice. When the poles are facing, moving them together is still "uphill", but they "fall" away from each other. – Seth Nov 2 '10 at 21:01
Is your question really about energy or are you more or less asking what causes a magnetic force or are you asking how permanent magnets are created? I'm trying to get more at the spirit of your question – Greg Petersen Feb 7 at 18:03
@GregPetersen - It's really about energy. The magnetic force between the two magnets becomes stronger as they move closer together ("up hill"). By pushing, I'm applying a larger counter force, and I'm doing work because I'm moving the magnet. If I let go of said magnet, then the magnetic field will do work on the magnet and move it away. I thought it might be an interesting question to get the site started (this is question #35 :) and clear up how it's possible to store energy in a magnetic field with two opposite movements. – Seth Feb 9 at 23:30
Also, magnets are fabulous little pieces of nature that have inspired me to wonder how the universe works for as long as I can remember. – Seth Feb 9 at 23:33

Magnetic field in this case (a set of magnets in space, no relativity involved) is conservative, which means it has a potential -- each positional configuration of charges (or dipoles in this case) has its fixed energy which does not depend on history or momenta of charges. So, the work you put or get from displacing them is just exchanged with the potential energy of the field, which means no energy is created or destroyed, just stored.

-
Magnetic field is conservative ? That absolutely WRONG ... A field is conservative if its rot F = 0, then you can have a potential defined as F = - grad P. rot H = m0 J , so ... In addition I think there is a confusion between that and the concept of state variable, as you said "history". – Cedric H. Nov 2 '10 at 21:11
@Cedric Not in this approximation; J=0, D is at least static. – mbq Nov 2 '10 at 21:21
What is you D ? The electric displacement field ? ( Note: I agree that you can associate a potential to certain magnetic fields, but your clearly wrote "magnetic field is conservative" ...) – Cedric H. Nov 2 '10 at 21:24
@Cedric This is a good point. I've fixed my answer. – mbq Nov 2 '10 at 21:28

As is said in a comment, the reasoning in the first paragraph is correct but the one in the second paragraph is wrong.

If you apply a force on something without "moving" the work is null and there is no energy exchange involved (this is not the same thing than doing that with your muscles, but that's another story :p). ( Work = integral[a to b] of F dot dx ; so Work = 0 if there is not "circulation").

Thus the magnets do not need any energy to statically counteract the force.

However, if you do move the magnets, then you need to give some energy. This energy is stored in the system because you cause a variation of magnetic flux: magnet 1 moving induce a variation of flux seen by magnet 2, and this will change the state of magnet 2, increasing its potential energy.

-
+1 A nice take on the topic. – tsudot Nov 2 '10 at 21:07

As others have pointed out, the question is somewhat misworded.

The correct question is probably just "Why do magnets repel?", which can be traced back to the question of why electromagnetism (EM) is a fundamental force of nature. Like gravity, it's one of the four known fundamental forces of nature.

Regarding the use of the word "energy". Energy is the same thing as work. Work = Force x distance. If there is a 10N [Newton] force acting on a ball, and you move the ball by 1m [meter], you have done 10N x 1M = 10Nn = 10J [Joule] of work (provided the force is constant). So, if you move the magnetic poles against each other, you do work (against the EM field). Then, if you attach the magnets to a spring and let go, the springs will compress. The 10J of work you invested is now stored in the springs! Then, if you remove the magnets and put a bullet on the spring, and let go, you can use the 10J of energy to launch the bullet (work is converted to kinetic energy), and so on =)

What happens when you push two magnets against each other, but then just hold them in place? Per the above definition of Work = Force x distance, you're not doing work, because distance = 0. But clearly your muscles are straining, and you're burning calories (which is just another unit of energy or work, like Joules), so what's going on? From a physics textbook point of view, no work is being done. This is similar to placing an apple on a table. The table is countering the force of gravity, like your muscles in the magnet example. The table has no muscles, because it is made of wood, and it won't collapse under the weight of the apple. In reality, the stiffness of the table/wood is provided by the electromagentic interactions of the atoms making up the table, so in the end it is the EM force counteracting the gravitational force. In the original magnet/muscle example, your arms are not made up of wood, so your body is doing biochemical/mechanical work to stiffen the cells in your arms by burning the food you ate. (The fact that this process is not perfect means that heat is a by product of this process, that's why your muscles get hot and you start sweating.)

-
OK, but what if you actually displace the magnets while they are repelling each other ? – Cedric H. Nov 2 '10 at 21:15

I'll make some guesses about the motivation for the question. I think you're looking for a simple answer. You're choosing magnets because you feel that you understand how electric charges work.

In this case, if you bring two positive charges close to one another you will also feel a repulsion. The source of the energy for this repulsion is a place similar to, but a little less complicated than, the source of the energy for the repulsion of two magnets.

-

You are right about how in the first scenario the energy you put into the magnets results in kinetic energy, but the second scenario is incorrect. Saying that the magnets are using energy to repel each other is like saying that the chair I'm sitting in is using energy to keep me from sinking into the ground. I hope this clarifies your understanding.

-

Magnetic fields is created by the low atomic magnets inside the piece of metal, piece of iron aligning together in a line. The actual magnetism in a piece of iron or in a permanent magnet is actually caused essentially by electrons orbiting in one direction more than the other, and the electrons are going to keep on orbiting forever until something interrupts it.

Moreover, the work you put or get from displacing 2 magnets is just exchanged with the potential energy of the field, which means no energy is created or destroyed, just stored.