How do magnets work? The short answer
A permanent magnet works because it is packed with billions of tiny magnets that mostly point the same way. Every electron behaves like a minuscule magnet because of a property called spin.47 In most materials, electrons pair up pointing in opposite directions, so their magnetism cancels out.7 In iron, nickel and cobalt, many electrons spin the same way, so each atom becomes a little magnet.7 Inside the metal, atoms team up in regions called domains. When the domains are lined up, all those tiny pulls add together into one big magnet with a north and a south pole.24
That's the secret of a permanent magnet: lots of tiny magnets line up and pull together. (An electromagnet gets its magnetism straight from an electric current; more on that below.)
What is a magnet?
A magnet is any object that attracts iron and makes a magnetic field around itself.1 Every magnet has two ends, called the north pole and the south pole. If you hang a magnet on a thread so it can turn freely, the same end always swings round to face north, which is where the names come from.1
Two rules hold for every magnet ever tested:1
- Opposite poles attract. North pulls on south.
- Like poles repel. North pushes north away, and south pushes south away.
And a third, stranger rule: north and south poles always come as a pair. Nobody has ever found a lonely north pole on its own.12
What is a magnetic field?
A magnet pushes and pulls without touching, so scientists describe the space around it as a magnetic field. We draw the field as field lines. They are a picture, not real strings, but they follow simple rules:3
- Outside the magnet, the lines run from the north pole round to the south pole, and they form closed loops.
- Where the lines are close together, the field is strong. That's near the poles.
- Field lines never cross.
- A small compass needle turns to lie along the line where it sits, with its north end pointing along the line.
You can see field lines for yourself. Sprinkle iron filings around a magnet (on a sheet of paper, to keep things tidy). Each filing becomes a tiny temporary magnet and lines up with the field, drawing the curved loops.4
Why are some metals magnetic and others not?
Only a few materials react strongly to magnets. They're called ferromagnetic, from ferrum, the Latin word for iron. The main ones are iron, nickel, cobalt and gadolinium, plus alloys such as steel and the rare-earth alloys used in super-strong neodymium magnets.24 Everything else, including aluminum, copper, wood and plastic, reacts so weakly that you'd need sensitive instruments to notice.2
So why does a magnet stick to plain iron that isn't a magnet? When you bring a magnet close, its field swings the domains in the iron round so that the iron becomes a magnet too, with its opposite pole facing the magnet. Opposite poles attract, and the two cling together.2
What are magnetic domains?
If every iron atom is a magnet, why isn't every iron nail a magnet? Because of domains. Inside iron, neighbouring atoms team up into small regions where all their tiny magnets point the same way. But in ordinary iron, each domain points in its own random direction, so the domains cancel each other out and the nail as a whole isn't magnetic.29
Put the iron in a magnetic field and the domains that point the "right" way grow, while the others turn to line up. Domains can grow to around a millimetre across.2 When most of them point the same way, their pulls add up, and the iron has become a magnet.4
How to magnetise a nail
- Take an iron nail and a strong magnet.
- Stroke one pole of the magnet along the nail, from the head to the tip, many times. Always go in the same direction, and lift the magnet well away between strokes.
- Test it: the nail should now pick up a paperclip or two.
Rubbing iron along a magnet lines up its atoms' poles, and the iron becomes a magnet.7 A nail made of pure, soft iron won't stay magnetised for long, only minutes in the case of pure iron, but steel and special alloys hold on much longer.4
How are magnets made?
People first found magnets in nature: a mineral called magnetite, known before 600 BC. A naturally magnetised piece of it is called lodestone.4 Today most strong magnets are made in factories. The strongest everyday kind, neodymium-iron-boron ("neo") magnets, are made roughly like this:12
- Melt and cast the alloy of neodymium, iron and boron.
- Crush and mill it into a very fine powder, with grains about 5 micrometres across.
- Press the powder into shape inside a magnetic field, so the grains all line up in the same direction.
- Sinter: heat the pressed block until the grains fuse into a solid, then heat-treat and machine it to size.
- Magnetise it with a very short, very strong pulse of magnetic field, which locks the domains into line.
Neo magnets keep their domains lined up very well. A magnet of this material just 3 millimetres thick makes a field comparable to a copper loop carrying several thousand amps. A light bulb uses about half an amp.8 Two other common kinds of permanent magnet are ceramic magnets and alnico, an alloy of aluminum, nickel and cobalt.4
Can a magnet lose its magnetism?
Yes. Anything that knocks the domains out of line weakens a magnet. A hard blow from a hammer can do it, and so can heat, because heat makes atoms jiggle.24 Every ferromagnetic material has a Curie temperature. Above it, its tiny magnets can no longer stay lined up and it stops being a magnet; only a very weak magnetic response is left.210
Is Earth a magnet?
Yes. Earth behaves roughly like a giant bar magnet whose axis is tilted from its spin axis (about 9.4 degrees in the 2020 world model; often rounded to "about 11").6 The field is made deep underground. Earth's outer core is a layer of molten iron and nickel about 2,250 km thick. Heat churns it, and Earth's spin swirls it. As this metal moves, it carries huge electric currents, and those currents make the magnetic field. Scientists call this the geodynamo.51314
A compass needle is just a small magnet balanced on a pin, so it turns to line up with Earth's field.111 Here's the twist: the magnetic pole in the Arctic is really a magnetic south pole. That's exactly why it attracts the north end of your compass needle.17
Earth's field is fairly weak at the surface, about 0.25 to 0.65 gauss.6 Even so, it wraps the planet in a protective bubble, the magnetosphere, that deflects most of the charged particles streaming from the Sun.5 The magnetic poles also wander. The north magnetic pole has drifted more than 1,100 km since 1831, and in recent decades it has moved up to about 55 km a year.5 Over millions of years the poles have even swapped places, 183 times in the last 83 million years.5
How does an electromagnet work?
In 1820 the Danish scientist Hans Christian Ørsted noticed something surprising. A wire carrying an electric current made a nearby compass needle swing.24 Every current-carrying wire has a magnetic field circling it. Wind the wire into a coil, and the little circles add up to a field shaped just like a bar magnet's, with a north and a south pole.24
more turns + more current + an iron core = a stronger electromagnet
Ten turns make a field about ten times stronger than one.4 Slide an iron core into the coil and the iron's domains line up with the coil's field, boosting it a lot without using any more electricity.4 Best of all, an electromagnet has an off switch: stop the current and the field disappears.7 That's why scrapyard cranes use giant electromagnets to lift old cars and then simply let go.2 Magnets and electromagnets are also at work in electric motors, loudspeakers and MRI scanners, which use very powerful magnets to take pictures of the inside of the body.2417 Computer hard drives store data as tiny magnetised regions that can be flipped or erased, although many newer devices use flash memory instead.2
In fact, scientists think electric currents are behind all magnetism. In a permanent magnet, the "currents" are the spins and motions of electrons inside the atoms.2
How strong are magnets?
Magnetic field strength is measured in tesla (T) or gauss, where 1 tesla = 10,000 gauss.4
Common misconceptions
"Magnets stick to all metals." Only ferromagnetic metals like iron, nickel and cobalt. A fridge magnet ignores aluminum cans and copper coins.
2
"Cut a magnet in half and you separate north from south." You get two complete magnets, each with both poles.
1
"Iron is magnetic, so an iron nail is a magnet." Its domains point every which way until something lines them up.
2
"The North Pole is a magnetic north pole." It's a magnetic south pole, which is why it pulls the north end of a compass.
1
"Permanent magnets last forever." Heat, hard knocks and strong opposing fields can weaken them.
4
Magnet safety
Never put magnets in your mouth. Small, strong magnets (like magnetic balls) are dangerous if swallowed: two or more can pull toward each other through the walls of the gut and cause serious injuries.15 If anyone swallows a magnet, or you think they might have, tell a grown-up straight away; they should get medical help immediately (the NHS advice: call 999 or go to A&E straight away).1516 Keep small magnets away from little children.15
Strong magnets can also affect some medical devices: the FDA advises keeping phones, smart watches and other devices with strong magnets at least 6 inches (15 cm) from implanted devices such as pacemakers.18 And because magnetic data can be erased, a strong magnet held against the magnetic stripe of an old-style card can scramble it.2
FAQ
How does a magnet work in simple terms?
Every electron acts like a tiny magnet because of its spin. In iron, nickel and cobalt, many of these tiny magnets point the same way, and when big regions of them (domains) are lined up, their pulls add together into one strong magnet with a north and a south pole.
What causes a magnet to attract?
A magnet's field turns the domains in nearby iron so they line up with it. The iron briefly becomes a magnet itself, with its opposite pole facing the magnet, and opposite poles attract. Another magnet is attracted or pushed away depending on which poles face each other.
Do magnets lose their strength over time?
It depends on the material. Pure iron keeps its magnetism for only a few minutes, while magnets made from alnico or neodymium-iron-boron alloys, or from ceramic (ferrite) keep it for a long time. Even these can be weakened by a hard blow, by strong heat, or by another strong magnet knocking their domains out of line. Above its Curie temperature (770 °C for iron) a material stops being a magnet, leaving only a very weak response to magnets.
How are magnets made?
Strong modern magnets are made from alloys such as neodymium-iron-boron. The metal is ground into a fine powder, pressed into shape inside a magnetic field so the grains line up, heated until the grains fuse (sintering), and finally magnetised with a very strong pulse of magnetic field.
Why do magnets only stick to some metals?
Only ferromagnetic materials, mainly iron, nickel, cobalt and many of their alloys, including most steels (some stainless steels aren't magnetic), have atoms whose tiny magnets can line up in domains. Aluminum, copper, gold, wood and plastic don't, so a fridge magnet has almost no pull on them.
What happens if you cut a magnet in half?
You get two smaller magnets, each with its own north and south pole. North and south poles always come in pairs; nobody has ever found a single, separate magnetic pole.
Why doesn't a compass point exactly north?
A compass follows Earth's magnetic field, and Earth's magnetic poles are not in the same place as the geographic poles. The difference, called magnetic declination, changes from place to place and slowly over time as the magnetic poles drift.
Are magnets dangerous for kids?
Small, strong magnets can be very dangerous if swallowed, because two of them can pull together through the intestines. If anyone swallows a magnet, tell a grown-up straight away so they can get medical help. Keep strong magnets away from pacemakers, and play with them only when a grown-up says it's OK.
Sources
- OpenStax College Physics 2e, 22.1 Magnets
- OpenStax College Physics 2e, 22.2 Ferromagnets and Electromagnets
- OpenStax College Physics 2e, 22.3 Magnetic Fields and Magnetic Field Lines
- National MagLab Magnet Academy, Magnets from Mini to Mighty
- NASA Science, Earth's Magnetosphere: Protecting Our Planet from Harmful Space Energy
- NOAA National Centers for Environmental Information, Geomagnetism FAQ
- National Geographic Education, Magnetism
- Encyclopaedia Britannica, Magnetism: fundamentals
- Encyclopaedia Britannica, Ferromagnetism
- Encyclopaedia Britannica, Curie point
- Encyclopaedia Britannica, Compass
- British Geological Survey, Magnetic reversals (how the outer core makes Earth's field)
- USGS, This Dynamic Earth: Inside the Earth
- U.S. Consumer Product Safety Commission, new safety standard for high-powered magnets (2022)
- NHS, What to do if your child has an accident (swallowed button battery or magnet)
- NIBIB (U.S. National Institutes of Health), Magnetic Resonance Imaging (MRI)
- U.S. FDA, Magnets in cell phones and smart watches may affect implanted medical devices
- Ormerod et al. (2023), Sourcing, Refining and Recycling of Rare-Earth Magnets, Sustainability 15(20)