Matter & Energy · Depth 3 · Introductory · 4 min read

Magnetism

Why magnets attract and repel, why every magnet has two poles, and how Earth's own magnetic field guides a compass.

On this page
  1. An ancient mystery
  2. North and south poles
  3. Electricity makes magnetism
  4. Earth, a giant magnet
  5. Magnetism at work
  6. Going further
  7. Real-life examples
  8. Evidence & sources

An ancient mystery

Magnetism has been known since the time of the ancient Greeks.[1] For most of history it seemed completely separate from electricity. Explaining how the two are connected became one of the great achievements of physics.

North and south poles

All magnets have two ends, called the north and south poles. Poles that are alike (both north or both south) repel, and opposite poles attract.[1]

Poles always come in pairs. You cannot isolate a single magnetic pole: every piece of a magnet, no matter how small, that contains a north pole also contains a south pole.[1] This is very different from electric charge, where a lone positive or negative charge is perfectly normal.

Electricity makes magnetism

In 1819 the Danish physicist Hans Oersted noticed that a compass needle moved whenever current flowed in a nearby wire. He concluded that an electric current can cause a magnetic force.[1]

After Oersted’s report in 1820, other scientists, including Ampère, Biot, Savart, Faraday and Davy, rapidly built on his discovery.[1] André-Marie Ampère proposed that electric current is the source of all magnetic phenomena, and that tiny current loops inside materials explain permanent magnets.[1]

Earth, a giant magnet

The idea that our planet is a magnet is more than 400 years old. In 1600 William Gilbert, physician to Queen Elizabeth I, published De Magnete. He had studied how a magnetic needle dips as it is moved around a small ball of lodestone (a naturally magnetic rock), and concluded that Earth itself is a giant magnet.[4]

Today’s science agrees: Earth acts like a very large bar magnet, with its south-seeking pole near the geographic North Pole.[1, 2] That’s why the “north” end of a compass needle is attracted northwards: opposite poles attract.

According to NOAA, more than 90% of the magnetic field measured at Earth’s surface is generated inside the planet, in its conducting, fluid outer core.[2]

Why a compass doesn’t point exactly north

A compass lines up with the horizontal direction of the magnetic field where it is, not with any single point on the globe. The angle between magnetic north and true (geographic) north is called declination, and knowing your local value lets you correct your compass.[2]

A field that moves and flips

Earth’s magnetic poles are not fixed. They move tens to hundreds of kilometres because of daily variations and magnetic storms.[2] Over much longer times the whole field reverses, swapping north and south. The last reversal was about 750,000 to 780,000 years ago, and scientists cannot say for certain if or when the next one will happen.[2]

A shield around the planet

Around the planet, Earth’s magnetism forms a giant bubble of magnetism: the magnetosphere. It deflects most of the solar material streaming towards us from the Sun at 1 million miles per hour or more.[5]

Keeping navigation accurate

To keep navigation accurate, scientists publish the World Magnetic Model. It is the standard model used by the US Department of Defense, the UK Ministry of Defence, NATO and the US Federal Aviation Administration.[2]

Magnetism at work

Magnets quietly store and move information around you. Computer hard drives record data on a coated, spinning disk. Card stripes store data that a playback head reads. A graphics tablet’s pen has a tiny magnetic field at its tip, which the tablet senses as the pen moves.[3]

Magnetism and electricity also work the other way round: a changing magnetic field can create a current. That effect, electromagnetic induction, has its own page.

Going further

  • Build an electromagnet in the free simulation below.
  • NOAA’s World Magnetic Model tools will tell you the compass declination where you live.

Real-life examples

  • Correcting your compass

    The angle between magnetic north and true north is called declination. It changes from place to place, and map readers correct their compass for the local value.[2]

  • Snap a magnet in two

    Break a bar magnet in half and you don't get a separate north and south: you get two smaller magnets, each with both poles.[1]

  • The stripe on your bank card

    The magnetic stripe on a card stores information, which a reader's playback head picks up, much like audio or video tape.[3]

  • Wandering poles

    Earth's magnetic poles aren't fixed points: they move tens to hundreds of kilometres with daily variations and magnetic storms.[2]

Learn more

Short descriptions are our own summaries. The resources belong to, and are run by, their publishers.

Evidence & sources

Level 1 · Established

Supported by extensive evidence and broad scientific consensus.

Why this level? The behaviour of magnets and the link between currents and magnetism are well-established physics. Facts about Earth's field come from NOAA's geomagnetism experts and NASA, and history from the National MagLab.

This is a Knowledge Atlas editorial classification of the sources we could find, not a certificate of truth. How we evaluate knowledge

Sources

Based on 5 sources from 4 institutions: OpenStax, NOAA, National MagLab, NASA.

Show all 5 sourcesHide the list
  1. ScholarlyOpenStax (Rice University)· Academic publisherUniversity Physics Volume 2, 11.1 Magnetism and Its Historical DiscoveriesOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  2. AuthoritativeNational Oceanic and Atmospheric Administration· Government agencyGeomagnetism Frequently Asked Questions (NOAA NCEI)Opened and checked against this page on 29 Sept 2026
  3. ScholarlyOpenStax (Rice University)· Academic publisherUniversity Physics Volume 2, 13.7 Applications of Electromagnetic InductionOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  4. AuthoritativeNational High Magnetic Field Laboratory (National MagLab)· UniversityWilliam Gilbert (Magnet Academy pioneers)Opened and checked against this page on 29 Sept 2026
  5. AuthoritativeNational Aeronautics and Space Administration· Government agencyEarth's Magnetosphere (NASA Science)Opened and checked against this page on 29 Sept 2026