Magnetism: making the invisible visible

You can't see a magnetic field, but a compass can feel it and iron filings line up along it. Move magnets, build an electromagnet, and watch moving charges curve: magnetism and electricity turn out to be two sides of the same thing.

Under 15Every magnet has a north end and a south end. Try putting two magnets together: north and south stick, but north and north push apart! The yellow lines show the invisible "magnetic field" around a magnet. Drop compasses around it and watch their needles point along the lines. Tick "Iron filings" to see what you'd really see if you sprinkled iron dust on paper over a magnet.
20+ · going deeperThe bar magnets here are modelled by their equivalent surface currents (Amperian model), so ∇·B = 0 holds exactly and every line closes. Outside, this matches the magnetic-charge (Gilbertian) picture; inside, B points S → N while H points N → S. Field lines are drawn in 2-D from line currents (1/r), a qualitative stand-in for the 3-D dipole field (1/r³). The full Lorentz force is F = q(E + v × B); for v ⊥ B the cyclotron radius is r = mv/(|q|B), with angular frequency ω = |q|B/m independent of speed.

1Discover

A magnet has a north and a south pole. Like poles repel, unlike poles attract. The space around a magnet holds a magnetic field B, which turns a compass needle to line up with it. We draw it with field lines: outside a bar magnet they run from N to S, and inside the magnet they continue from S back to N, so every line is a closed loop. (Magnetic field lines never start or end: there are no single magnetic poles.)

2Bar magnet explorer

Drag a magnet to move it, or drag the round handle at its end to rotate it. Drag the compasses around too, or click empty space to drop a new one.

Arrangement

Show

Field lines and arrows are the idealised model. Iron filings are what you actually see in a real experiment: tiny bits of iron line up along the field. More lines are drawn where the field is stronger, but line density is only a drawing convention.

3Electromagnet

Cut-away view through the coil: ⊙ = current coming out of the screen, ⊗ = current going in.

Current direction

B inside (ideal long solenoid)
Turns per metre n

For an ideal long solenoid the field inside is uniform: B = μ₀ n I, where n = N / length is the number of turns per metre. More turns or more current gives a stronger field, and reversing the current swaps N and S. An iron core is magnetised by the coil and multiplies the field many times (here an illustrative factor of 200; real values depend on the iron and saturate at high fields).

4Electricity creates magnetism

In 1820 Ørsted noticed a compass needle swing when a current flowed in a nearby wire. Looking along a straight wire, the field lines are circles centred on the wire, and the field gets weaker farther away:

B = μ₀ I / (2π r)

Right-hand grip rule: point your right thumb along the current. Your fingers curl the way the field goes round. Current out of the screen (⊙) gives an anticlockwise field; current into the screen (⊗) gives a clockwise one.

Move the mouse over the picture to measure B.

5Magnetic force on a moving charge

Particle charge

Magnetic field B

Radius r = mv / (|q|B)

The magnetic part of the Lorentz force is F = q (v × B). It is always perpendicular to the velocity, so it changes the particle's direction but never its speed: the particle moves in a circle. Flip the charge or the field and it curves the other way; a neutral particle feels no magnetic force at all. Units here are illustrative (mass, charge and B chosen so the circle fits the screen); the directions and the r ∝ v / B scaling are exact.

6Test yourself