Sub topic 7
Ampère's law and symmetry
What you need before this chapter
This chapter assumes you can do the following:
- Use the right-hand rule and compute simple line integrals.
- Recall that a long straight wire gives B = μ0 I / (2π d) at distance d.
- Work with vector dot products, since the law is written as a dot product along a path.
The law
Ampère's circuital law says that the line integral of the magnetic field around any closed path equals μ0 times the net current passing through the surface bounded by that path:
∮ B · dl = μ0 I_enc
The closed path is called an Amperian loop. You choose it. The law holds for every loop and every steady current distribution. It is useful for calculation only when symmetry lets you pull B out of the integral.
Three points matter in practice:
- B on the left side is the total field at each point of the loop, produced by all currents, including those outside the loop.
- I_enc on the right side counts only currents that pass through the surface bounded by the loop.
- Currents outside the loop contribute nothing to I_enc, but they still affect B on the loop. Their contributions to the integral cancel around a closed path.
Sign convention
Curl the fingers of your right hand along the direction in which you traverse the loop. Your thumb points in the direction of positive current. A current in the thumb direction counts as +I. A current in the opposite direction counts as −I.
Why the law works for a straight wire
Take a circle of radius d centred on a long straight wire, in a plane perpendicular to the wire. By symmetry, B is tangent to the circle and has the same magnitude everywhere on it. Then B · dl = B dl, and
∮ B dl = B (2πd) = μ0 I
so B = μ0 I / (2π d). This matches the Biot-Savart result. Ampère's law and Biot-Savart agree for steady currents. Ampère's law is the faster route when the symmetry is high.
Choosing a loop: the symmetry checklist
Ampère's law gives B quickly only for a few geometries. Use it when you can pick a loop where, on each segment, one of these is true:
- B is parallel to dl and has constant magnitude, so B · dl = B dl.
- B is perpendicular to dl, so B · dl = 0.
- B is zero.
The standard cases are:
| Geometry | Symmetry | Amperian loop |
|---|---|---|
| Infinite straight wire | Cylindrical | Circle around the wire |
| Thick cylindrical conductor | Cylindrical | Circle, radius r |
| Long solenoid | Translational along the axis, field only axial | Rectangle straddling the winding |
| Toroid | Rotational about the axis | Circle inside the core |
| Infinite current sheet | Planar | Rectangle crossing the sheet |
If the geometry lacks such symmetry, such as a finite wire or a single loop, the law is still true but does not determine B. Use Biot-Savart instead.
Worked example: infinite current sheet
A large flat sheet carries a uniform surface current of K amperes per metre of width, flowing along the y direction in the plane z = 0.
By symmetry, B is parallel to the sheet and perpendicular to the current. It points along ±x, with opposite signs above and below the sheet. Take a rectangular loop of length L, with two sides parallel to x, one above and one below the sheet. The two short sides are perpendicular to B, so they contribute nothing. The two long sides each contribute B L, so
2 B L = μ0 K L
and therefore
B = μ0 K / 2
The field is uniform and does not depend on distance from the sheet. Two parallel sheets with opposite currents give a field of μ0 K between them and zero outside. This is the idealised picture of a solenoid wall.
Worked example: a loop that encloses currents of both signs
Three long parallel wires pass perpendicular to the page. Wire 1 carries 6 A out of the page, wire 2 carries 2 A into the page, and wire 3 carries 4 A out of the page. An Amperian loop is traversed counterclockwise and encloses wires 1 and 2 only.
With counterclockwise traversal, the right-hand rule makes the thumb point out of the page. So out-of-page current is positive:
I_enc = +6 − 2 = +4 A
∮ B · dl = μ0 (4 A) = 4π × 10⁻⁷ × 4 = 1.6π × 10⁻⁶ T·m, which is about 5.03 × 10⁻⁶ T·m.
Wire 3 does not enter I_enc. It does change B at each point on the loop, but its contribution to the closed integral is zero.
Numerical check
You can verify the law numerically. The code below places a long wire along the z axis, computes its field with the closed-form result, and integrates B · dl around a square loop that does not have circular symmetry. The result should still equal μ0 I.
import numpy as np
MU0 = 4e-7 * np.pi
def wire_field(I, point):
"""Field of an infinite wire along z at a point (x, y, z), in tesla."""
x, y = point[0], point[1]
d2 = x * x + y * y
# B = mu0 I / (2 pi d) in the phi direction: (-y, x, 0) / d
return MU0 * I / (2 * np.pi * d2) * np.array([-y, x, 0.0])
def circulation_square(I, half_side, center=(0.0, 0.0), n=20000):
"""Counterclockwise line integral of B . dl around a square loop."""
cx, cy = center
h = half_side
corners = [(cx - h, cy - h), (cx + h, cy - h), (cx + h, cy + h), (cx - h, cy + h)]
total = 0.0
for k in range(4):
p0 = np.array(corners[k] + (0.0,))
p1 = np.array(corners[(k + 1) % 4] + (0.0,))
t = (np.arange(n) + 0.5) / n
pts = p0 + np.outer(t, p1 - p0)
dl = (p1 - p0) / n
for p in pts:
total += np.dot(wire_field(I, p), dl)
return total
I = 5.0
print(circulation_square(I, 0.2)) # wire inside: about MU0 * I
print(circulation_square(I, 0.2, center=(1.0, 0))) # wire outside: about 0
print(MU0 * I)The first value is close to 6.283×10⁻⁶, matching μ0 I. The second is close to zero, even though B is nonzero everywhere on that loop.
Edge cases and common errors
- Using the law without symmetry. The equation ∮ B · dl = μ0 Ienc is always true. B = μ0 Ienc / L is true only when B is uniform and tangent along the whole loop. Check the symmetry first.
- Counting currents outside the loop. Outside currents are in B but not in I_enc.
- Wrong sign. Fix the traversal direction first, then apply the right-hand rule to each current.
- Zero circulation does not mean zero field. If I_enc = 0, ∮ B · dl = 0, but B can be nonzero on the loop.
- Non-steady currents. The form above applies to steady currents. For time-varying fields, Maxwell added a displacement current term. This is beyond the scope of this chapter.
- Surface choice. Any surface bounded by the loop gives the same I_enc for steady currents. Choose the flat one.
Summary
- ∮ B · dl = μ0 I_enc holds for steady currents and any closed loop.
- It gives B directly only when symmetry makes B constant and tangent, or perpendicular, or zero, on each part of the loop.
- Only enclosed currents appear on the right. All currents contribute to B.
- Use the right-hand rule to assign signs to enclosed currents.
- For an infinite sheet, B = μ0 K / 2 on each side.
Exercise
Three long wires carry currents perpendicular to the page: 3 A out, 5 A in and 2 A out. A counterclockwise Amperian loop encloses the 5 A wire and the 2 A wire only. What is ∮ B · dl, in terms of μ0, and what does its sign mean?
Show answer
Counterclockwise traversal makes out of the page positive. So Ienc = −5 + 2 = −3 A, and ∮ B · dl = −3 μ0, which is about −3.77×10⁻⁶ T·m. The negative sign means the net enclosed current is into the page, so B circulates clockwise on average around the loop. The 3 A wire outside the loop does not appear in Ienc.
Exercise
A long wire carries 10 A. An Amperian circle of radius 5 cm is centred on it. Use Ampère's law to find B on the circle, and say what changes if you use a square loop of side 10 cm centred on the wire instead.
Show answer
For the circle, B (2π × 0.05) = μ0 × 10, so B = 4π×10⁻⁷ × 10 / (2π × 0.05) = 4×10⁻⁵ T. For the square, ∮ B · dl is still μ0 × 10 = 1.26×10⁻⁵ T·m, but B is not constant along the path. The law cannot give B from the circulation alone. You would need the wire's known field or Biot-Savart.
Exercise
Two large parallel sheets carry equal surface current K in opposite directions. Find B between them and outside them.
Show answer
Each sheet gives μ0 K / 2 on each side, directed oppositely on opposite sides. Between the sheets the two fields point the same way and add to μ0 K. Outside the sheets they point in opposite directions and cancel to zero.