Topic 12.4

Ampère's law

The field around a closed path and the current through it; long wires, solenoids and other symmetric currents.

7 min read2 worked examples3 questions to check yourself

Big idea

Around any closed path, the magnetic field added up along the path equals μ0\mu_0 times the current passing through the path, which gives the field directly whenever the current is symmetric enough.

Field diagram: magnetic field lines circling a long straight wire seen end-on (I, current out of the page at (0, 0): field counterclockwise); a dashed Gaussian surface Amperian loop.Amperian loopI

A long wire carries current out of the page. The dashed circle is an Amperian loop: an imaginary closed path chosen to follow a field line. The field is tangent to it and equally strong all the way round, so the integral of B⃗\vec{B} along it is just B(2πr)B(2\pi r).

Explanation

Ampère's law says that for any closed path, ∮B⃗⋅dℓ⃗=μ0Ienc\oint \vec{B}\cdot d\vec{\ell} = \mu_0 I_{\text{enc}}. The left side walks once round the path, adding up the component of B⃗\vec{B} along each step. The right side counts the net current that pierces the surface spanned by the path: curl your right fingers the way you walk, and currents along your thumb count as positive. Currents outside the path still affect B⃗\vec{B} on it, but their contributions to the integral cancel.

The law holds for every steady current, but it yields BB only when symmetry lets you pick a path, an Amperian loop, on which B⃗\vec{B} is either tangent with constant size or contributes nothing. Then the integral becomes BB times a length. For a long straight wire the loop is a circle of radius rr: B(2πr)=μ0IB(2\pi r) = \mu_0 I, the Biot–Savart result in one line.

Only the enclosed current counts. Inside a thick wire of radius RR with uniformly spread current, a circle of radius r<Rr < R encloses the fraction r2/R2r^2/R^2 of the current, so the field rises in proportion to rr, peaks at the surface, and falls as 1/r1/r outside. If the current density JJ varies with radius, integrate JJ over the area inside the loop.

A long solenoid, a tightly wound coil with nn turns per metre, has a nearly uniform field along its axis inside and almost none outside. A rectangular loop that straddles the windings gives B=μ0nIB = \mu_0 n I, the same at every point inside, whatever the solenoid's radius.

Equations

  • ∮B⃗⋅dℓ⃗=μ0Ienc\oint \vec{B}\cdot d\vec{\ell} = \mu_0 I_{\text{enc}}

    Ampère's law: the field summed along a closed path equals μ₀ times the net current through the path.

    B⃗\vec{B}

    magnetic field on the path (T)

    dℓ⃗d\vec{\ell}

    short step along the closed path (m)

    μ0\mu_0

    permeability of free space, 4π × 10⁻⁷ (T·m/A)

    IencI_{\text{enc}}

    net current through the surface the path bounds (A)
    Use it when

    Steady currents with cylindrical or planar symmetry: long wires, thick wires, coaxial cables, solenoids.

    Not when

    It cannot be solved for B when there is no path on which B is constant: short segments, a single loop. Use Biot–Savart there.

  • Ienc=∫0rJ(r′) 2πr′ dr′I_{\text{enc}} = \int_0^{r} J(r')\,2\pi r'\,dr'

    The current inside a circle of radius r, found by adding thin rings of current.

    IencI_{\text{enc}}

    current enclosed by the circular path (A)

    JJ

    current density at radius r′ (A/m^2)

    r, r′r,\ r'

    radius of the path; radius of a thin ring inside it (m)
    Use it when

    The path lies inside a conductor, especially when the current density depends on radius.

    Not when

    Once the path is outside the conductor, stop the integral at the conductor's surface: the enclosed current is the whole current.

  • B=μ0Ir2πR2B = \frac{\mu_0 I r}{2\pi R^2}

    The field inside a long wire of radius R carrying uniformly distributed current I; outside, B = μ₀I/(2πr).

    BB

    magnetic field at radius r (T)

    μ0\mu_0

    permeability of free space (T·m/A)

    II

    total current in the wire (A)

    rr

    distance from the wire's axis (r ≤ R) (m)

    RR

    radius of the wire (m)
    Use it when

    A point inside a solid wire whose current is spread evenly over its cross-section.

    Not when

    Not if the current density varies with radius, and not outside the wire.

  • B=μ0nIB = \mu_0 n I

    The uniform field inside a long solenoid.

    BB

    magnetic field inside the solenoid (T)

    μ0\mu_0

    permeability of free space (T·m/A)

    nn

    number of turns per unit length (N/L) (1/m)

    II

    current in each turn (A)
    Use it when

    Well inside a solenoid that is long compared with its diameter.

    Not when

    Near the ends the field is weaker (about half at the very end), and n is turns per metre, not the total number of turns.

Where it comes from

Worked examples

  1. Inside and outside a coaxial cable

    Step by step

    A coaxial cable has a thin central wire carrying 6.0 A6.0\ \text{A} out of the page and a thin cylindrical outer conductor of radius 3.0 mm3.0\ \text{mm} carrying 6.0 A6.0\ \text{A} back into the page. Find the magnetic field at a point 2.0 mm2.0\ \text{mm} from the axis, between the conductors, and at a point 5.0 mm5.0\ \text{mm} from the axis, outside the cable.

    0 of 4 steps
  2. Inside a thick sheet of current

    Written as an exam answer

    A large, flat conducting slab 4.0 mm4.0\ \text{mm} thick carries a uniform current density J=2.0×106 A/m2J = 2.0\times10^{6}\ \text{A/m}^2 out of the page. Derive the magnetic field inside the slab, a distance yy from its middle plane, and evaluate it at y=1.0 mmy = 1.0\ \text{mm}. Also find the field outside.

    1. Step 1:

      By symmetry B⃗\vec{B} is parallel to the slab and perpendicular to J⃗\vec{J}, opposite on the two sides of the middle plane, and equal in size at ±y\pm y.

    2. Step 2:

      Take a rectangle with sides of length ℓ\ell along B⃗\vec{B} at ±y\pm y: ∮B⃗⋅dℓ⃗=2Bℓ\oint \vec{B}\cdot d\vec{\ell} = 2B\ell; the short sides give nothing.

    3. Step 3:

      Inside, 2Bℓ=μ0J(2yℓ)2B\ell = \mu_0J(2y\ell), so B=μ0Jy=(4π×10−7)(2.0×106)(1.0×10−3)=2.5×10−3 TB = \mu_0Jy = (4\pi\times10^{-7})(2.0\times10^{6})(1.0\times10^{-3}) = 2.5\times10^{-3}\ \text{T}.

    4. Step 4:

      Outside, the whole thickness tt is enclosed: B=12μ0Jt=5.0×10−3 TB = \tfrac{1}{2}\mu_0Jt = 5.0\times10^{-3}\ \text{T} at every distance.

    Answer

    B=μ0JyB = \mu_0Jy, which is 2.5×10−3 T2.5 \times 10^{-3}\ \text{T} at 1.0 mm1.0\ \text{mm}; outside, 5.0×10−3 T5.0 \times 10^{-3}\ \text{T}

Common mistakes

  • Mistake

    For a point inside a thick wire, put the wire's whole current into Ampère's law.

    What is true

    Only the current inside the Amperian loop counts. For a uniform wire that is Ir2/R2I r^2/R^2.

  • Mistake

    For a short straight piece of wire, Ampère's law gives B(2πr)=μ0IB(2\pi r) = \mu_0 I too.

    What is true

    The law still holds, but BB comes out of the integral only when symmetry makes it constant along the path. For a short segment it is not, and the Biot–Savart law is needed.

  • Mistake

    If a path encloses no net current, the magnetic field is zero everywhere on it.

    What is true

    Only the integral round the path is zero. A loop drawn beside a wire has field all along it; the parts where B⃗\vec{B} runs with the path cancel the parts where it runs against.

Check yourself

  1. 1.

    A long solenoid's field is 6.0 mT6.0\ \text{mT}. It is stretched to twice its length, with the same turns and current. What is the field now?

  2. 2.

    A closed path surrounds two wires: one carries 5 A5\ \text{A} out of the page, the other 3 A3\ \text{A} into it. What is ∮B⃗⋅dℓ⃗\oint \vec{B}\cdot d\vec{\ell} taken counterclockwise round the path?

  3. 3.

    For a long solid wire with uniformly distributed current, where is the magnetic field strongest, and why?

Try it

A wire of radius 4 mm4\ \text{mm} carries 20 A20\ \text{A} spread uniformly. Slide the radius of the Amperian loop: inside the wire the enclosed current, and so the field, grows; once the loop is outside, the enclosed current stays at 20 A20\ \text{A} and the field falls as 1/r1/r.

2 mm
Graph of B (mT) against r (mm): straight segments through (0, 0), (4, 1); a smooth curve from r = 4 to 12.surfacer (mm)B (mT)246810120.510Ienc = 5 AB = 0.5 mT

Builds on

Practice 12.4 with feedback

Problem sets for Unit 12 grade themselves, and Raise hints at the next step instead of giving the answer.

Spotted a mistake in this lesson? Tell us and we will fix it.