← Back to course

Ampère’s Law: Wires, Solenoids & Toroids

You’ll be able to

Ampère’s law: the magnetic sibling of Gauss’s law

Ampère’s law states that the line integral of B around any closed loop equals μ₀ times the current threading the loop: ∮ B·dl = μ₀I_enc. Like Gauss’s law it is always true, but it only solves for B when symmetry lets you choose an Amperian loop on which B is constant in magnitude and either parallel or perpendicular to dl — then the integral collapses to B·(loop length) and you divide. The three symmetric workhorses: the long wire, the solenoid, and the toroid.

Ampère’s law
∮ →B·d→l = μ₀ I_enc, μ₀ = 4π × 10⁻⁷ T·m/A
Only currents that pierce the surface bounded by the loop count toward I_enc. Curl the right-hand fingers along the traversal direction; the thumb gives the positive current direction.
Worked example

A solid wire of radius R carries current I distributed uniformly over its cross-section. Find B both outside (r > R) and inside (r < R) the wire.

  1. 1.Symmetry argument: the field must circle the wire with a magnitude depending only on the distance r, so choose a circular Amperian loop of radius r centered on the axis. On it, B is constant and parallel to dl, so ∮ B·dl = B·(2πr).
  2. 2.Outside (r > R): the loop encloses the full current, I_enc = I. Ampère: B·2πr = μ₀I, so B = μ₀I/(2πr) — identical to the Biot–Savart result, with far less labor.
  3. 3.Inside (r < R): only a fraction of the current threads the loop. Uniform current density J = I/(πR²) gives I_enc = J·(πr²) = I·r²/R².
  4. 4.Ampère inside: B·2πr = μ₀I·r²/R², so B = μ₀I·r/(2πR²) — the field grows linearly with r inside the wire.
  5. 5.Check the seam: both expressions give B = μ₀I/(2πR) at r = R. The field rises linearly to a maximum at the surface, then falls off as 1/r.
Answer: Inside: B = μ₀Ir/(2πR²), growing linearly. Outside: B = μ₀I/(2πr), falling as 1/r. They match at r = R.

The ideal solenoid

A solenoid is a long helix of N closely wound turns over length ℓ, with n = N/ℓ turns per unit length. In the ideal (long, tightly wound) limit, the fields of the loops reinforce inside — uniform and axial — and cancel outside, where B ≈ 0. That structure is exactly what Ampère’s law needs: a rectangular loop with one side of length L inside (parallel to the axis) and one side outside picks up flux-free contributions everywhere except the inner side, where ∮ B·dl = BL. The loop encloses nL turns, so I_enc = nLI, and BL = μ₀nLI gives B = μ₀nI — independent of position inside. That uniformity is why solenoids are the standard way to manufacture a uniform magnetic field.

Solenoid and toroid fields
Solenoid: B = μ₀nI (inside, uniform; ≈0 outside) Toroid: B = μ₀NI/(2πr) (inside the windings)
n = N/ℓ is turns per meter for the solenoid; N is the total turn count for the toroid, whose field falls as 1/r across its interior and vanishes outside.
Worked example

A solenoid has 1000 turns per meter and carries 2.0 A. Use Ampère’s law to find the field inside.

  1. 1.Choose a rectangular Amperian loop with one side of length L inside the solenoid, parallel to the axis, and the opposite side far outside where B ≈ 0.
  2. 2.The two short sides are perpendicular to the interior field (B·dl = 0), and the outside long side contributes nothing (B ≈ 0). So ∮ B·dl = B·L from the inner side alone.
  3. 3.The loop is threaded by nL turns, each carrying I: I_enc = nLI.
  4. 4.Ampère: B·L = μ₀nLI → B = μ₀nI. The arbitrary length L cancels — a sign the setup is right.
  5. 5.Numbers: B = (4π × 10⁻⁷)(1000)(2.0) = 8π × 10⁻⁴ ≈ 2.5 × 10⁻³ T, about 50 times Earth’s field.
Answer: B = μ₀nI ≈ 2.5 × 10⁻³ T, uniform, along the solenoid’s axis

The toroid: a solenoid bent into a ring

Bend a solenoid into a doughnut and you get a toroid with N total turns. Symmetry says the field inside circles around the doughnut with magnitude depending only on r, so a circular Amperian loop of radius r inside the windings gives B·2πr = μ₀NI, hence B = μ₀NI/(2πr). Unlike the straight solenoid, the toroid’s interior field is not uniform — it is stronger near the inner edge. Outside the windings (either inside the hole or beyond the doughnut) the enclosed current sums to zero and B = 0: a toroid confines its own field completely.

Watch out

Ampère’s law is always true, but without symmetry it is not useful for finding B — exactly the caveat you learned for Gauss’s law. A finite wire segment or a single loop still satisfies ∮B·dl = μ₀I_enc, yet B varies along any loop you draw, so it cannot be pulled out of the integral. Those cases need Biot–Savart.

On the exam

Ampère’s-law FRQs award points for the argument, not just the answer: (1) name the symmetry and draw the Amperian loop, (2) justify that B is constant and parallel to dl on it, so ∮B·dl = B·(length), (3) compute I_enc — for distributed currents use the current density times the enclosed area, (4) solve. Skipping step 3’s enclosed-fraction logic is the most common lost point on thick-wire problems.

Checkpoint

For an ideal solenoid, the magnetic field just outside the windings is:

Checkpoint

Inside the windings of a toroid with N total turns carrying current I, the field at radius r from the central axis is:

Answer the 2 checkpoints as you read.

Sign in to save your progress