Electromagnetism

Ampère's Law

Line integral of B around a closed loop equals μ₀ times the enclosed current

Ampère's law (André-Marie Ampère, 1826): the line integral of magnetic field B around any closed loop equals μ₀ times the total current passing through any surface bounded by the loop: ∮ B·dℓ = μ₀ I_enc. The magnetic analog of Gauss's law for E. Quick derivations of B for symmetric configurations: infinite wire (B = μ₀I/(2πr)), solenoid (B = μ₀nI inside), toroid (B = μ₀NI/(2πr)). Original form fails for time-varying currents — Maxwell (1861) added the displacement current ∂E/∂t term to give ∮ B·dℓ = μ₀(I_enc + ε₀ dΦ_E/dt), known as the Maxwell-Ampère law. The displacement current was the conceptual breakthrough leading to electromagnetic wave prediction. Used in: solenoid B-field calculations, transmission line analysis, plasma confinement (toroidal fields in tokamaks).

  • Integral form∮ B·dℓ = μ₀ I_enc
  • AuthorAmpère 1826
  • SolenoidB = μ₀nI
  • ToroidB = μ₀NI/(2πr)
  • Maxwell's term+ε₀ dΦ_E/dt
  • Full lawMaxwell-Ampère law

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why Ampère matters

  • Solenoid and electromagnet design. Every electromagnet — from a 0.5T MRI service magnet to the 13T fields of an ITER toroidal field coil — is sized using B = μ₀nI as the starting point. Engineers then add corrections for finite length, magnetic core saturation, and end-fringing.
  • Coax and transmission lines. Inside a coaxial cable, Ampère's law gives B(r) between the inner and outer conductor in two lines, leading directly to the inductance per unit length and ultimately the characteristic impedance Z₀.
  • Plasma confinement. Tokamaks confine fusion-grade plasma using toroidal B fields produced by tens of TF coils encircling the donut chamber; B ∝ 1/R inside the donut is computed exactly via Ampère's law on circles of constant major radius.
  • Current measurement. Rogowski coils and clamp-on ammeters wrap an Amperian loop around a current-carrying wire and measure the integrated B·dℓ — directly proportional to the enclosed current with no electrical contact.
  • Pulse-power inductors. Capacitor-bank discharge through a low-inductance solenoid load is designed so the magnetic stored energy ½LI² is set by the Ampère-derived inductance, often pushing megawatt instantaneous power.
  • EM wave prediction. The Maxwell-Ampère form, paired with Faraday's law, yields the wave equation ∇²E = μ₀ε₀ ∂²E/∂t² with propagation speed c = 1/√(μ₀ε₀). Maxwell's calculation of c in 1862 matched the measured speed of light within experimental error — proof that light is electromagnetic.

Common misconceptions

  • "Works always." The original Ampère form is exact only for steady currents. For time-varying fields you need the Maxwell-Ampère extension with displacement current — the original form gives wrong answers near antennas, capacitors, and any radiating system.
  • "Needs symmetry." Symmetry is needed only to extract B by inspection. The integral law ∮ B·dℓ = μ₀ I_enc is true for every closed loop in every static configuration; it just doesn't always tell you B at a point.
  • "Maxwell renamed it." Maxwell didn't relabel Ampère's law — he added a missing physical term, the displacement current ε₀ dΦ_E/dt. That term is what makes electromagnetic radiation possible. Without it, Maxwell's equations would be inconsistent with charge conservation.
  • "Inside a solid wire B = 0 because there's no enclosed current." Inside a uniform-current solid wire, the enclosed current scales as r²/R² (only the fraction of current within radius r is enclosed), giving B = μ₀Ir/(2πR²) — linear in r, not zero. B = 0 only on the central axis.
  • "Solenoid edge-fringing is small." For a solenoid of length comparable to its diameter, fringing reduces axial B by 50% at the mouth and produces strong off-axis components that can perturb sensitive experiments. Always check whether your geometry is "long" before applying the infinite-solenoid result.
  • "The Amperian surface must be flat." Any surface bounded by the loop works — flat, curved, hemispherical, or pretzel-shaped. Surface independence of the result is what motivated Maxwell's correction in the first place.

Canonical Ampère-derived fields

  • Infinite straight wire. Symmetry: cylindrical. Loop: circle of radius r centered on wire. B(2πr) = μ₀I → B = μ₀I/(2πr). Direction: right-hand rule around the wire.
  • Solid cylindrical conductor, uniform J. Inside (r < R): B = μ₀Ir/(2πR²). Outside (r > R): B = μ₀I/(2πr). Maximum at the surface.
  • Coaxial cable, equal and opposite currents. B = μ₀I/(2πr) between conductors; zero inside the inner conductor (uniform J case requires the same r-linear formula); zero everywhere outside (currents cancel).
  • Infinite solenoid. B = μ₀nI inside, axial; B = 0 outside. n = turns per meter.
  • Toroid, N turns total. B = μ₀NI/(2πr) inside the donut; zero outside and in the central hole.
  • Infinite current sheet, surface current density K. B = ±μ₀K/2 on either side, parallel to the sheet, perpendicular to K. Direction reverses across the sheet.

Frequently asked questions

When can you use Ampère's law to compute B?

Ampère's law in integral form is universally true for steady currents, but it only computes B analytically when symmetry makes B constant in magnitude (and either parallel or perpendicular to dℓ) along a chosen Amperian loop. Three high-symmetry cases dominate textbooks: cylindrical symmetry (infinite straight wire, coaxial cable, solid cylindrical conductor), planar symmetry (infinite current sheet), and translational symmetry along an axis (infinite solenoid, toroid). Without that symmetry — finite solenoid edges, square loops, helical coils — you must fall back on Biot-Savart integration. Ampère's law still holds; you just can't extract B from the integral by inspection.

What is the displacement current and why was Maxwell's correction needed?

Original Ampère's law works for closed steady currents but fails at gaps. Consider a charging capacitor with current I in the leads: an Amperian loop around the wire has I_enc = I if the bounding surface intersects the wire, but I_enc = 0 if the surface bulges out and passes between the capacitor plates. Same loop, two different answers. Maxwell (1861) resolved the contradiction by adding ε₀ dΦ_E/dt — the displacement current — to I_enc. Between the plates, even though no charge crosses, the changing electric flux contributes ε₀ dΦ_E/dt that exactly equals the conduction current outside. With this term, ∮ B·dℓ = μ₀(I_enc + ε₀ dΦ_E/dt), and the law becomes consistent for any time-varying field — which immediately predicts that E and B can sustain each other as a propagating wave.

How does it derive solenoid B field?

Inside an infinite ideal solenoid, B is uniform along the axis and zero outside. Choose an Amperian loop that's a rectangle of length L, with one side along the axis inside, one side outside, and two short legs perpendicular to the axis. The integral splits: along the inside leg, ∮ B·dℓ = BL; along the outside leg, B = 0 so the integral vanishes; the perpendicular short legs contribute zero because B ⊥ dℓ. Total: ∮ B·dℓ = BL. The enclosed current is the number of turns crossing the rectangle: nL turns each carrying I, so I_enc = nLI. Equating: BL = μ₀nLI, giving B = μ₀nI. The length L cancels — only the turns-per-meter density n matters.

What's the difference between B inside and outside a solenoid?

Inside an infinite ideal solenoid, B = μ₀nI is uniform, axial, and surprisingly large for modest currents. Outside, B = 0. This near-perfect confinement is unique among basic geometries — neither a single loop nor a straight wire produces field that drops to zero outside a region. For a finite solenoid the picture deteriorates: near the ends the field weakens by a factor of 1/2 on the central axis at the mouth, fringing fields leak outward, and external B is small but nonzero. Long solenoids (length much greater than radius) approximate the ideal case well across most of their interior. This combination of strong, uniform interior field plus vanishing exterior field makes solenoids the workhorse of electromagnets, MRI scanners, and laboratory field standards.

How does it apply to a toroid (donut)?

Wrap a solenoid into a torus and you get B confined entirely inside the donut, falling off as 1/r where r is distance from the central axis. For a toroid with N total turns each carrying I, choose a circular Amperian loop of radius r inside the windings, concentric with the central axis. By symmetry, B is tangential and constant along the loop: ∮ B·dℓ = B(2πr). The enclosed current is NI (every turn pierces the loop once). Equating: B = μ₀NI/(2πr). Outside the donut and inside the central hole, B = 0. Toroidal geometry is preferred for: tokamak fusion reactors (no end-leakage to confine plasma), ferrite EMI chokes, current transformers, and high-Q inductors.

Why does Ampère's law fail at the capacitor plate boundary without displacement current?

Ampère's law in integral form is ∮ B·dℓ = μ₀ I_enc, where the enclosed current is the total current piercing any surface bounded by the loop. For consistency, the answer must not depend on which surface you choose. Take a charging capacitor with current I in the lead wire. Pick an Amperian loop encircling the wire near the capacitor. A flat disk surface intersects the wire: I_enc = I, so the law gives ∮ B·dℓ = μ₀I. Now pick a hemispherical surface that bulges through the gap between the plates: it intersects no current at all, so I_enc = 0 and the law gives ∮ B·dℓ = 0. Same loop, same B. Contradiction. Maxwell's displacement current ε₀ dΦ_E/dt patches this: in the gap, the time-rising E flux produces a virtual current density that exactly equals the conduction current outside, restoring surface independence.