The Biot-Savart Law and Ampere's Law

You know that a current makes a magnetic field — hold a compass near a wire carrying a heavy current and the needle swings. But how much field, and pointing which way, at a given point in space? That is the question this page answers. It is the magnetic twin of a story you have already met for electricity: to find the electric field of a charge you had two tools — brute-force summation (Coulomb's law) and clever symmetry (Gauss's law). Magnetism has exactly the same pair.

The brute-force tool is the Biot–Savart law: chop the current into tiny pieces, work out the little field each piece makes, and add them all up. It always works, but the sum can be painful. The elegant tool is Ampère's law: when the field has enough symmetry, one line integral hands you the answer in a single line of algebra. Learn to reach for the right tool and the magnetic field of almost any everyday arrangement — a wire, a loop, a solenoid, the coil inside an MRI scanner — falls out cleanly.

Biot–Savart: the field of a tiny piece of current

Start small. Take a current I flowing along a wire and zoom in on an infinitesimal length d\vec{\ell} of it, pointing in the direction the current flows. Jean-Baptiste Biot and Félix Savart measured, in 1820, exactly how much magnetic field this little segment contributes at a point a displacement \vec{r} away:

To find the total field you integrate this over the whole current path: \vec{B} = \frac{\mu_0 I}{4\pi}\int \frac{d\vec{\ell}\times\hat{r}}{r^{2}}. The cross product is what makes this fiddly — d\vec{\ell} and \hat{r} change direction as you march along the wire. Let's turn the crank on the two cases that matter most.

Biot–Savart in action

A long straight wire. Add up the contributions of every element of an infinitely long straight wire carrying current I, at a perpendicular distance r. Every element pushes the field in the same circulating direction (around the wire), and doing the integral gives a famously simple result:

B = \frac{\mu_0 I}{2\pi r}.

The field circles the wire, falls off as 1/r (not 1/r^2 — the extra factor of r comes from summing an infinite line of elements), and its direction is set by the right-hand rule: thumb along the current, fingers curl the way \vec{B} points.

On the axis of a circular loop. Now bend the wire into a single circular loop of radius R carrying current I, and ask for the field at a point on its axis, a distance x from the centre. By symmetry the off-axis parts of every element's contribution cancel and only the axial part survives, leaving

B = \frac{\mu_0 I R^{2}}{2\,(R^{2}+x^{2})^{3/2}}.

Set x = 0 to get the field right at the centre of the loop, a result worth memorising:

B_{\text{centre}} = \frac{\mu_0 I}{2R}.

Notice how much work the cross product and the integral did here. That is Biot–Savart's honest cost: it always works, but you pay for it. When the geometry is symmetric enough, there is a shortcut.

Ampère's law: the shortcut through symmetry

Gauss's law let you skip the Coulomb integral by relating the flux of \vec{E} through a closed surface to the charge inside. Ampère's law does the analogous magic for magnetism, but with a closed loop instead of a closed surface:

Watch it recover the straight wire in one line. Around a wire the field must, by symmetry, be constant in size on a circle of radius r and point along it. So \oint \vec{B}\cdot d\vec{\ell} = B\,(2\pi r), the loop encloses the full current I, and Ampère's law gives B\,(2\pi r) = \mu_0 I, i.e. B = \dfrac{\mu_0 I}{2\pi r}. The same answer Biot–Savart earned through a whole integral drops out in a single step.

Four workhorse fields from Ampère's law

Pick the Ampèrian loop that matches the symmetry and the field falls out.

The chart below plots the wire field across the whole range — the linear rise B\propto r inside the conductor and the 1/r decay outside — meeting at the surface. Drag the sliders for the wire radius R and current I and watch the peak move.

Worked examples

Example 1 — field beside a wire. A power cable carries I = 100\ \text{A}. What is B at r = 5\ \text{cm} = 0.05\ \text{m}?

B = \frac{\mu_0 I}{2\pi r} = \frac{(4\pi\times 10^{-7})(100)}{2\pi (0.05)} = \frac{2\times 10^{-7}\times 100}{0.05} = 4\times 10^{-4}\ \text{T}.

About 0.4\ \text{mT} — roughly ten times the Earth's field. (Handy shortcut: \mu_0/2\pi = 2\times 10^{-7}.)

Example 2 — centre of a loop. A flat coil of radius R = 0.10\ \text{m} carries I = 3\ \text{A}. The field at its centre is

B_{\text{centre}} = \frac{\mu_0 I}{2R} = \frac{(4\pi\times 10^{-7})(3)}{2(0.10)} = \frac{(1.257\times 10^{-6})(3)}{0.20} \approx 1.9\times 10^{-5}\ \text{T}.

Example 3 — inside a solenoid. A solenoid has n = 500\ \text{turns/m} and carries I = 2\ \text{A}. Its interior field is

B = \mu_0 n I = (4\pi\times 10^{-7})(500)(2) \approx 1.26\times 10^{-3}\ \text{T}.

A uniform 1.3\ \text{mT} everywhere inside — that uniformity is exactly why solenoids are the field-makers of choice.

Example 4 — the Ampèrian derivation in full (solenoid). Take a rectangular loop with one long side of length L running inside the solenoid parallel to its axis, the opposite long side well outside, and the two short sides crossing the wall. Walk the loop and split the integral into four pieces:

Thus \oint\vec{B}\cdot d\vec{\ell} = B L. The loop encloses the length L of solenoid, which carries nL turns, each with current I, so I_{\text{enc}} = n L I. Ampère's law gives B L = \mu_0 n L I, and the L cancels:

B = \mu_0 n I.

Ampère's law is always true, but only useful with symmetry — exactly like Gauss's law. The equation \oint\vec{B}\cdot d\vec{\ell} = \mu_0 I_{\text{enc}} holds for every closed loop around any current, tangled or tidy. But it only lets you solve for B when the symmetry is high enough to pull the (constant) field out of the integral, so that \oint\vec{B}\cdot d\vec{\ell} collapses to B\times(\text{loop length}). With a lopsided current the left side is a genuine, un-simplifiable integral and Ampère's law tells you almost nothing on its own — you fall back to Biot–Savart.

Two more traps. First, I_{\text{enc}} is the current the loop bounds — a wire threading the loop counts, a wire outside it does not, and its sign follows the right-hand rule relative to the direction you walk the loop. Second, don't expect the solenoid field to depend on radius: inside a long solenoid it is \mu_0 n I everywhere, independent of how far you are from the axis. Uniformity is the whole point.

The integral form is one face of a deeper local law. Apply Stokes' theorem, which turns a line integral around a loop into a surface integral of the curl over any surface the loop bounds: \oint\vec{B}\cdot d\vec{\ell} = \int(\nabla\times\vec{B})\cdot d\vec{A}. Writing the enclosed current as the flux of the current density, I_{\text{enc}} = \int\vec{J}\cdot d\vec{A}, and demanding the two match for every loop forces the integrands to be equal point by point:

\nabla\times\vec{B} = \mu_0\,\vec{J}.

That is Ampère's law in differential form — a statement about the field at a single point rather than around a loop. Maxwell later spotted that this version is incomplete: a changing electric field (as in a charging capacitor, where no real current crosses the gap) also makes magnetic field. He patched it with a "displacement current" term, \mu_0\varepsilon_0\,\partial\vec{E}/\partial t, and that single fix — the realisation that changing fields feed each other — is what predicted electromagnetic waves and revealed that light itself is one. The humble coil law you just learned is a corner of Maxwell's equations, and the same physics is what makes the giant superconducting solenoid of an MRI scanner hum.