← Iris

Dipoles 0
Field lines 0
Magnetic field Click to place a dipole · Drag to move · Right-click to flip
Dipoles: 0
Field lines per pole 12
Dipole strength 1.00
Visualization Lines + Heat

What is a magnetic field?

A magnetic field is a vector field that permeates all of space. At every point, it has a direction and a magnitude. It exerts forces on moving charges and on other magnetic dipoles. You cannot see it directly, but you can map it: scatter iron filings near a magnet and they align along the field, revealing its invisible geometry. The field is not a mathematical convenience — it carries energy, momentum, and angular momentum. It is as real as the magnet that creates it. Maxwell showed that magnetic fields are one face of a unified electromagnetic field: a changing electric field creates a magnetic one, and a changing magnetic field creates an electric one. Light itself is nothing but these two fields, oscillating in lockstep, propagating through empty space at 299,792,458 meters per second.

Dipole fields and field lines

A magnetic dipole is the simplest source of magnetism: a tiny current loop, or equivalently, a pair of equal and opposite poles separated by an infinitesimal distance. The field of a dipole falls off as 1/r³ — far faster than the 1/r² of a monopole (which, as far as we know, does not exist). The field at a point r from a dipole with moment m is given by B(r) = (μ₀/4π) [3(m·r̂)r̂ − m] / r³. Field lines are curves that are everywhere tangent to the field vector. They emerge from the north pole, arc through space, and return to the south pole. They never cross — if they did, the field would point in two directions at once. Near the dipole they are dense; far away they are sparse. The density of field lines is proportional to the field strength. This is not metaphor: it is a precise visual encoding of a vector field.

Superposition

The superposition principle states that the total magnetic field at any point is the vector sum of the fields from all individual sources. This is a deep fact about electromagnetism: it is a linear theory. The field from two magnets is simply the sum of the fields each would produce alone. This linearity is what makes the simulation above possible — at every point, we compute the contribution from each dipole and add the vectors. The result can be beautifully complex: opposing dipoles create null points where the field vanishes entirely; aligned dipoles reinforce each other; quadrupole arrangements produce fields that fall off as 1/r⁴. The complexity of the field pattern grows with the number of sources, but the underlying rule remains the same: add the vectors.

Real-world magnetic fields

The Earth itself is an approximate magnetic dipole, generated by convection currents in its liquid iron outer core — a self-sustaining dynamo that has flipped polarity hundreds of times over geological history. The last reversal was 780,000 years ago; the next could begin at any time. MRI machines use magnetic fields 60,000 times stronger than Earth’s to align the nuclear spins of hydrogen atoms in your body, then detect the radio waves emitted as they relax. Electric motors work by the interaction of magnetic fields from permanent magnets and current-carrying coils: the force on a current in a magnetic field (F = IL × B) creates torque, and torque creates rotation. Magnetic confinement fusion uses fields shaped by superconducting coils to contain plasma at 150 million degrees — hotter than the core of the sun, held in place by nothing but geometry and Maxwell’s equations.

From dipoles to Maxwell

Every bar magnet, every current loop, every spinning electron is a magnetic dipole. The dipole field is the fundamental building block of magnetostatics, just as the Coulomb field is the building block of electrostatics. But magnetism has a deeper mystery: there are no magnetic charges. Every magnetic field line that leaves a surface must return to it — ∇·B = 0, one of Maxwell’s four equations. This is why you cannot isolate a magnetic north pole by cutting a magnet in half: you get two smaller dipoles, each with both poles. The search for magnetic monopoles continues — Dirac showed in 1931 that their existence would explain why electric charge is quantized — but none have been found. For now, magnetism begins and ends with the dipole, and the field lines always close.