Sub topic 14
Ampère's law and symmetry
Prerequisites and where this fits
This chapter assumes you can work with vectors and the cross product, and that you know what a magnetic field and a current are. It also assumes you have met the Biot-Savart law in the previous chapter. You do not need to have done vector calculus. A line integral here just means "add up the field component along a path, one small step at a time."
Biot-Savart builds a field by summing contributions from every current element. That always works, but the integrals get hard quickly. Ampère's law gives a shortcut. When the current distribution has enough symmetry, it lets you find B with almost no integration.
The statement of the law
Pick any closed loop in space. It is an imaginary path, not a physical wire. Call it the Amperian loop. Walk once around it and add up B·dl, the component of B along each small step dl. The total equals μ₀ times the net current that passes through the surface the loop encloses:
∮ B · dl = μ₀ I_enc
Here μ₀ = 4π × 10⁻⁷ T·m/A is the permeability of free space, and I_enc is the net current through the loop's surface.
- The integral is taken around a closed path, so the loop must close on itself.
- I_enc counts only currents that pass through the surface bounded by the loop. Currents outside the loop do not appear on the right side.
- Direction sets the sign. Curl the fingers of your right hand along the direction you walk around the loop. A current along your thumb counts as positive. A current the other way counts as negative.
The law is always true for steady currents. It is only useful for calculating B when symmetry lets you pull B out of the integral.
Why symmetry matters
Ampère's law gives one equation for the whole loop. To get B itself, you need B·dl to be the same at every point of the path, so you can write
∮ B · dl = B ∮ dl = B × (length of loop)
This works when you can choose a loop where, on each piece of the path, either B is parallel to dl with constant magnitude, or B is perpendicular to dl (so B·dl = 0), or B is zero.
The recipe:
- Use the symmetry of the currents to decide the direction and the way B can vary with position.
- Choose an Amperian loop that follows the field direction where B is nonzero and constant, and is perpendicular to the field elsewhere.
- Compute ∮ B · dl in terms of the unknown B.
- Find I_enc.
- Solve B × (path length) = μ₀ I_enc.
If the currents have no suitable symmetry, the law still holds, but it cannot isolate B. Use Biot-Savart or a numerical method instead.
Case 1: a long straight wire
A long straight wire carries current I along +z. The wire is infinitely long in the idealization, so the field cannot depend on z or on the angle around the wire. Rotating the wire about its axis changes nothing, so B depends only on the distance r from the axis. The field circles the wire, as the right-hand rule says.
Choose a circle of radius r centered on the wire, in a plane perpendicular to it. B is tangent to the circle and has the same magnitude everywhere on it:
B (2πr) = μ₀ I
B = μ₀ I / (2π r)
This agrees with the Biot-Savart result. The field falls off as 1/r.
Case 2: inside a thick wire
Now suppose the wire has radius R and the current is spread uniformly over its cross-section. Outside (r ≥ R), the result above holds. Inside (r < R), the same circular loop encloses only part of the current. The current density is I/(πR²), so
I_enc = I (r² / R²)
B (2πr) = μ₀ I r² / R²
B = μ₀ I r / (2π R²)
Inside, B grows linearly from zero at the axis. It peaks at the surface, where both formulas give μ₀I/(2πR). Outside, it decays as 1/r.
Case 3: an ideal solenoid
A solenoid is a long coil of wire. Take it to be very long compared with its radius, with n turns per unit length, each carrying current I. Symmetry and the right-hand rule give a field along the axis inside. For a long solenoid, the field outside is very small compared with the field inside, and we treat it as zero.
Choose a rectangular Amperian loop with one side of length L inside the solenoid, parallel to the axis, and the opposite side outside.
- Inside side: B is parallel to the path, so the contribution is BL.
- Outside side: B is approximately zero, so the contribution is zero.
- The two short sides are perpendicular to the axis. Inside, B is perpendicular to the path there. Outside, B is zero. Both contribute nothing.
The loop encloses nL turns, each carrying I, so I_enc = nLI:
B L = μ₀ n L I
B = μ₀ n I
The length L cancels, so the field inside is uniform: it does not depend on position across the cross-section. This is a good approximation away from the ends. At the ends of a long solenoid, the field on the axis is about half this value.
import numpy as np
mu0 = 4e-7 * np.pi # T·m/A
def b_straight_wire(I, r):
"""Field magnitude at distance r from a long straight wire."""
return mu0 * I / (2 * np.pi * r)
def b_thick_wire(I, R, r):
"""Field magnitude at distance r from the axis of a uniform round wire of radius R."""
if r < R:
return mu0 * I * r / (2 * np.pi * R**2)
return mu0 * I / (2 * np.pi * r)
def b_solenoid(n, I):
"""Field magnitude inside a long ideal solenoid with n turns per metre."""
return mu0 * n * I
print(b_straight_wire(10.0, 0.05)) # 4e-5 T, similar to Earth's field
print(b_thick_wire(10.0, 0.01, 0.005)) # 1e-4 T, inside the wire
print(b_solenoid(1000, 2.0)) # about 2.5e-3 TCase 4: a toroid
A toroid is a solenoid bent into a doughnut. It has N turns in total. By symmetry the field inside lines up with circles around the axis of the doughnut. Take a circular loop of radius r inside the core. It encloses N turns, each with current I:
B (2πr) = μ₀ N I
B = μ₀ N I / (2πr)
The field is not uniform. It is stronger near the inner edge. A circular loop outside the toroid encloses zero net current, since each turn passes through the loop's surface once in each direction. The field outside is therefore zero.
Common errors
- Using a loop with no symmetry. If B·dl is not constant along the path, you cannot take B out of the integral. Ampère's law is still true, but you learn only an average.
- Counting currents that do not pass through the loop. A wire next to the loop but not through it adds nothing to I_enc.
- Forgetting that "enclosed" means through the surface. A loop can be bent into any shape. What matters is the current threading the surface it bounds.
- Sign mistakes with multiple wires. Apply the right-hand rule to the direction you walk. Currents in opposite directions subtract.
- Using the solenoid formula for a short coil. B = μ₀nI assumes the solenoid is much longer than its radius.
- Applying it to changing currents. The form above holds for steady currents. Time-varying fields need a correction that this tutorial does not cover.
Comparing with Biot-Savart
| Feature | Biot-Savart | Ampère's law |
|---|---|---|
| Works for any current shape | Yes | The law holds, but it only gives B for symmetric setups |
| Method | Sum contributions from every current element | Choose a loop and use enclosed current |
| Effort for a straight wire or solenoid | Integral required | One line of algebra |
| Effort for a finite loop off-axis | Integral required | Not usable directly |
Exercise
A long coaxial cable has an inner conductor of radius a carrying current I along +z. A thin outer shell of radius b carries the same current I back along -z. Find B at a distance r from the axis for (i) a < r < b and (ii) r > b.
Show answer
(i) For a < r < b, a circular loop encloses only the inner conductor's current I, so B (2πr) = μ₀ I and B = μ₀ I / (2πr), circling the axis in the right-hand direction for +z current. (ii) For r > b, the loop encloses I - I = 0, so B = 0. A coaxial cable keeps its field inside the cable.
Exercise
A solenoid is 0.40 m long and has 800 turns. It carries 1.5 A. What is the field inside, far from the ends? What current gives 0.010 T?
Show answer
n = 800 / 0.40 = 2000 turns per metre. B = μ₀ n I = (4π × 10⁻⁷)(2000)(1.5) ≈ 3.8 × 10⁻³ T. For 0.010 T, I = B / (μ₀ n) = 0.010 / ((4π × 10⁻⁷)(2000)) ≈ 4.0 A.