Ages

Now you know how magnets work!

What next?

Try it yourself ↓

How do magnets work?

▶ 4:39 video · Watch on YouTube

  1. 0:00 Start
  2. 0:33 Two poles, one field
  3. 1:13 A magnet in every atom
  4. 1:58 Line them up
  5. 2:52 Earth is a magnet
  6. 3:39 Magnets with a switch

Your turn

Play with the magnets yourself

Play with magnets!

Each lab is one step from the video. Drag, flip and switch, and see what happens.

Each lab isolates one idea. The models are simplified to show the physics, not to scale.

Drag the magnets and tap the buttons.

1

Which things does it grab?

Ferromagnetic or not?

What does the magnet grab?

Drag the magnet over each object. Which ones jump up to it?

Iron, nickel, cobalt and some alloys respond strongly. Test the steel clip, the can, the pencil and the spoon.

Drag the magnet to each thing. Which ones jump?

2

Poles and filings

Two dipoles, one field

Push and pull

Drag or flip the second magnet. When do they pull, and when do they push?

Rotate the second magnet and watch the combined field lines rearrange.

Flip the magnet. Do they pull together or push apart?

Filings follow a simple two-pole (charge) model of each magnet.

3

Paper vs iron

Paired vs unpaired spins

Switch between paper and iron. Why does only one of them pull?

Paired, opposite spins cancel; iron has unpaired electrons whose spins line up, so each atom has a net moment.

4

Magnetise a nail

Align the domains

Make a nail magnet

Stroke the nail with the magnet, always the same way. How many clips can it hold?

Sweep the magnet along the nail, then knock or heat it and watch the domains scramble.

Rub the nail with the magnet. Now can it pick up clips?

5

Carry a compass round Earth

Follow the dipole field

Take a compass for a trip

Drag the compass around the planet. Where does its north end point?

The needle follows the tilted dipole field; note which pole it points to in the Arctic.

Move the compass around the Earth. Where does it point?

6

Build an electromagnet

Turns, current and core

A magnet with a switch

Switch the current, add turns and try the iron core. How many clips can you lift?

Field grows with turns and current; an iron core multiplies it. Cut the current and it vanishes.

Turn it on and off. Add more wire. What changes?

How do magnets work?

A magnet pulls on some metals without even touching them. It can hold a picture on the fridge, or make a paperclip jump. But it does not grab an aluminum can, a wooden pencil or a plastic spoon.

1. Two ends

Every magnet has two ends, called north and south. Two different ends pull together. Two same ends push apart.

2. Tiny magnets inside

Inside iron are lots and lots of tiny magnets. Most of the time they point every which way, so they don't pull together. Rub a nail with a magnet, and they all turn the same way. Now the nail is a magnet too! A hard bump or lots of heat mixes them up again.

3. Earth is a magnet

Deep inside the Earth, hot melted metal swirls around. That makes the whole planet a giant magnet. A compass needle is a little magnet, so it turns to point north.

4. A magnet with a switch

Wrap a wire around an iron bar and send electricity through it. It becomes a magnet! Turn it off and the magnet stops. Big cranes use these to lift old cars and then let go.

Did you know? A permanent magnet, big or small, is lots of tiny magnets all lined up and pulling together.

← More explainers

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

MaterialDoes a fridge magnet grab it?Why
Iron, most steelYes, stronglyAtoms are tiny magnets that form domains
Nickel, cobaltYesFerromagnetic, like iron
Aluminum (cans, foil)No noticeable pullNot ferromagnetic
Copper, gold, silverNo noticeable pullNot ferromagnetic
Paper, wood, plasticNoElectron magnets pair up and cancel

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

  1. Take an iron nail and a strong magnet.
  2. 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.
  3. 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

  1. Melt and cast the alloy of neodymium, iron and boron.
  2. Crush and mill it into a very fine powder, with grains about 5 micrometres across.
  3. Press the powder into shape inside a magnetic field, so the grains all line up in the same direction.
  4. Sinter: heat the pressed block until the grains fuse into a solid, then heat-treat and machine it to size.
  5. 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

MagnetField strength
Earth's field at the surfaceabout 0.25–0.65 gauss6
Fridge magnetabout 10 gauss (0.001 T)4
Strongest permanent magnetsabout 1.5 T4
MagLab resistive electromagnets (sustained field)35 T4

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.

Did this help it click?

Sources

  1. OpenStax College Physics 2e, 22.1 Magnets
  2. OpenStax College Physics 2e, 22.2 Ferromagnets and Electromagnets
  3. OpenStax College Physics 2e, 22.3 Magnetic Fields and Magnetic Field Lines
  4. National MagLab Magnet Academy, Magnets from Mini to Mighty
  5. NASA Science, Earth's Magnetosphere: Protecting Our Planet from Harmful Space Energy
  6. NOAA National Centers for Environmental Information, Geomagnetism FAQ
  7. National Geographic Education, Magnetism
  8. Encyclopaedia Britannica, Magnetism: fundamentals
  9. Encyclopaedia Britannica, Ferromagnetism
  10. Encyclopaedia Britannica, Curie point
  11. Encyclopaedia Britannica, Compass
  12. British Geological Survey, Magnetic reversals (how the outer core makes Earth's field)
  13. USGS, This Dynamic Earth: Inside the Earth
  14. U.S. Consumer Product Safety Commission, new safety standard for high-powered magnets (2022)
  15. NHS, What to do if your child has an accident (swallowed button battery or magnet)
  16. NIBIB (U.S. National Institutes of Health), Magnetic Resonance Imaging (MRI)
  17. U.S. FDA, Magnets in cell phones and smart watches may affect implanted medical devices
  18. Ormerod et al. (2023), Sourcing, Refining and Recycling of Rare-Earth Magnets, Sustainability 15(20)