Pro 🔒~10 min

Magnetism & Magnetic Fields

Attract, repel, and explore invisible magnetic forces

How it works

Magnetism is a force produced by moving electric charges. All magnets have two poles: North (N) and South (S). Opposite poles attract each other; like poles repel each other. You cannot separate the poles — if you cut a magnet in half, each half becomes a new magnet with its own N and S pole. Magnetic fields are invisible regions of force that surround magnets, shown by field lines that go from N to S. Only certain materials (iron, nickel, cobalt, and their alloys) are attracted to magnets — these are called ferromagnetic materials. Earth itself behaves like a giant bar magnet, which is why compasses point north. The geographic North Pole is actually near Earth's magnetic South Pole (compass needles are attracted to it).

Upgrade to Pro to access this experiment

Step-by-step

  1. Arrange the two magnets and watch the field lines appear.
  2. Set Polarity to Opposite — see the field lines connect between poles (attraction).
  3. Set to Same — field lines push away from each other (repulsion).
  4. Drag the distance slider and watch the force change.
  5. Enable Earth's Field (Pro) to see how a compass needle aligns.

Key formulas

  • Fm1m2r2(magnetic force)F \propto \frac{m_1 m_2}{r^2} \quad (\text{magnetic force})Magnetic force decreases with the square of distance
  • N seeks S(opposites attract, like poles repel)\text{N seeks S} \quad \text{(opposites attract, like poles repel)}Opposite magnetic poles attract; same poles repel

Frequently asked questions

If you cut a bar magnet in half, do you get one North pole piece and one South pole piece?
No! Each half becomes a complete magnet with its own North and South poles. You can never have a magnetic monopole — magnets always come in N-S pairs. Even at the atomic level, each iron atom is a tiny dipole magnet.
A compass always points toward geographic north. Is geographic north the same as magnetic north?
No — they're different. Geographic (true) North is Earth's rotational axis. Magnetic North is where Earth's magnetic field lines point down, which is near but not at the North Pole. The difference (declination) varies by location and changes slowly over time.
Why is iron attracted to magnets but aluminum is not?
Iron is ferromagnetic — its atoms have unpaired electrons that create tiny magnetic domains. When near a magnet, these domains align, making iron magnetic. Aluminum has no unpaired electrons available for this alignment, so it is non-magnetic.
If the magnetic force between two magnets doubles when the distance is halved, what type of relationship is this?
F ∝ 1/r² — an inverse square relationship. Halving distance (×½) quadruples force (×4). This is the same relationship as gravity and electric force — all follow the inverse square law at the macroscopic level.