Dove's LibraryDove's Library

5.4 - Ampère’s Law

Introduction to Ampère’s Law

Ampère’s Law relates the magnitude of a magnetic field to the current enclosed by an imaginary closed path called an Amperian loop. It’s the magnetic analog of Gauss’s Law for electric fields.
The comparison: - Gauss’s Law uses a closed surface (a Gaussian surface) to relate the electric field to the enclosed charge. - Ampère’s Law uses a closed path (an Amperian loop) to relate the magnetic field to the enclosed current.
When to use Ampère’s Law: - High-symmetry situations (cylindrical, planar, solenoid). - Calculating magnetic fields around current-carrying wires. - It’s much simpler than Biot-Savart when symmetry exists.

Ampère’s Law Formula

Basic Statement

∮B⃗⋅dℓ⃗=μ0Ienclosed\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{enclosed}
where: - ∮\oint = line integral around a closed path (the Amperian loop) - B⃗\vec{B} = magnetic field vector (T) - dℓ⃗d\vec{\ell} = infinitesimal path element along the loop - μ0=4π×10−7\mu_0 = 4\pi \times 10^{-7} T·m/A, the permeability of free space - IenclosedI_{enclosed} = total current passing through the area enclosed by the loop (A)
The physical meaning: the circulation of the magnetic field around a closed loop equals μ0\mu_0 times the current threading through that loop.

Comparison to Gauss’s Law

Gauss’s Law (Electric)
Ampère’s Law (Magnetic)
∮E⃗⋅dA⃗=Qenclosedϵ0\oint \vec{E} \cdot d\vec{A} = \frac{Q_{enclosed}}{\epsilon_0}
∮B⃗⋅dℓ⃗=μ0Ienclosed\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{enclosed}
Surface integral
Line integral
Encloses charge
Encloses current
Relates to ϵ0\epsilon_0
Relates to μ0\mu_0

Applications of Ampère’s Law

Long Straight Wire

For an infinitely long straight wire carrying current II:
B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
where rr is the perpendicular distance from the wire.
Deriving it with Ampère’s Law: - Choose a circular Amperian loop of radius rr centered on the wire. - By symmetry, BB is constant along the loop and tangent to it. - ∮B⃗⋅dℓ⃗=B(2πr)\oint \vec{B} \cdot d\vec{\ell} = B(2\pi r). - Ienclosed=II_{enclosed} = I. - So B(2πr)=μ0IB(2\pi r) = \mu_0 I. - Result: B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}.
5.4 - Ampère’s Law
Bwire=μ0I2πrB_{\text{wire}} = \frac{\mu_0 I}{2\pi r} isn’t on the AP equation sheet (Ampère’s Law is), so be ready to derive it with the steps above.
Example. A long straight wire carries 15 A. Find the magnetic field 3.0 cm from it.
B=μ0I2πr=(4π×10−7 T\cdotpm/A)(15 A)2π(0.030 m)=1.0×10−4 TB = \frac{\mu_0 I}{2\pi r} = \frac{(4\pi \times 10^{-7}\text{ T·m/A})(15 \text{ A})}{2\pi(0.030 \text{ m})} = 1.0 \times 10^{-4} \text{ T}
That’s about twice Earth’s field (about 50 μT), which is why a compass needle near a current-carrying wire swings noticeably toward the circles around the wire. Double the distance to 6.0 cm and the field halves to 5.0×10−55.0 \times 10^{-5} T, since B∝1rB \propto \frac{1}{r}.

Solenoid (Long Coil)

A solenoid is a long coil of wire. Inside a very long solenoid, the magnetic field is uniform and parallel to the axis.
The magnetic field inside an ideal solenoid:
B=μ0nIB = \mu_0 n I
where: - nn = turn density, the number of turns per unit length (turns/m) - II = current through the wire (A)
An alternative form:
B=μ0NILB = \frac{\mu_0 N I}{L}
where: - NN = total number of turns - LL = length of the solenoid - n=N/Ln = N/L
Key properties: - Inside: a strong, uniform field parallel to the axis. - Outside: a negligible field, ideally zero for an infinite solenoid.
5.4 - Ampère’s Law

Deriving the Solenoid Field

Unless a problem says otherwise, treat every solenoid as very long: the field inside is uniform and along the axis, and the field outside is negligible. Then use a rectangular Amperian loop with one long side (length ℓ\ell) inside the solenoid, parallel to the axis, and the other long side outside: - Inside side: B⃗\vec{B} is parallel to the path, so it contributes BℓB\ell. - Outside side: B≈0B \approx 0, so it contributes nothing. - The two short sides: inside the solenoid B⃗\vec{B} is perpendicular to them, and outside B≈0B \approx 0, so they contribute nothing.
If NN turns pass through the loop, each carrying II, the enclosed current is NINI:
Bℓ=μ0NI⇒B=μ0NℓI=μ0nIB\ell = \mu_0 NI \quad\Rightarrow\quad B = \mu_0\frac{N}{\ell}I = \mu_0 nI
The answer doesn’t depend on where you put the inside side of the loop, which is why the field is the same everywhere inside.
Example. A solenoid 0.30 m long has 600 turns and carries 2.5 A. Find the field inside.
B=μ0nI=(4π×10−7 T\cdotpm/A)(6000.30 m)(2.5 A)=6.3×10−3 TB = \mu_0 nI = (4\pi \times 10^{-7}\text{ T·m/A})\left(\frac{600}{0.30 \text{ m}}\right)(2.5 \text{ A}) = 6.3 \times 10^{-3} \text{ T}
Squeeze the same 600 turns into 0.15 m and nn doubles, so BB doubles too. The solenoid’s radius doesn’t show up anywhere.

Maxwell’s Addition: The Ampère-Maxwell Law

The complete form of Ampère’s Law includes a term James Clerk Maxwell added, which makes it the Ampère-Maxwell Law, the fourth of Maxwell’s equations.

Complete Form

∮B⃗⋅dℓ⃗=μ0Ienclosed+μ0ϵ0dΦEdt\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{enclosed} + \mu_0\epsilon_0\frac{d\Phi_E}{dt}
The extra term μ0ϵ0dΦEdt\mu_0\epsilon_0\frac{d\Phi_E}{dt} accounts for displacement current from changing electric fields.
Maxwell’s contribution is that second term:
μ0ϵ0dΦEdt\mu_0\epsilon_0\frac{d\Phi_E}{dt}
The physical meaning: a changing electric flux, even with no actual current, can create a magnetic field. That term is essential for: - Electromagnetic waves. - Understanding light as electromagnetic radiation. - Completing the symmetry between electricity and magnetism.
Historically, Maxwell’s addition of this term predicted electromagnetic waves and unified electricity, magnetism, and light into a single theory.
Where you’d see it: a capacitor that’s charging. Current flows in the wires, but no charge crosses the gap between the plates. The electric field in the gap is growing, though, and that changing electric field makes a magnetic field that circles the gap, just like the field circling the wires.
On the AP exam, you won’t calculate with the μ0ϵ0dΦEdt\mu_0\epsilon_0\frac{d\Phi_E}{dt} term, but you do need to know that a changing electric field creates a magnetic field, similar to the way a current does.

Example Problem: Magnetic Field Inside and Outside an Infinite Cylinder

Problem: A long solid cylindrical conductor of radius RR carries a uniformly distributed current II. Use Ampère’s Law to derive expressions for the magnetic field:
  1. Outside the cylinder (at distance r>Rr > R from the axis).
  1. Inside the cylinder (at distance r<Rr < R from the axis).
5.4 - Ampère’s Law

Solution

Part (a): Outside the cylinder (r > R)
Step 1: Choose the Amperian loop
Pick a circular path of radius r>Rr > R centered on the cylinder axis.
Step 2: Apply Ampère’s Law
∮B⃗⋅dℓ⃗=μ0Ienclosed\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{enclosed}
Step 3: Evaluate the left side
By cylindrical symmetry, BB is constant along the loop and tangent to it:
∮B⃗⋅dℓ⃗=B∮dℓ=B(2πr)\oint \vec{B} \cdot d\vec{\ell} = B \oint d\ell = B(2\pi r)
Step 4: Find the enclosed current
The entire cylinder is enclosed, so:
Ienclosed=II_{enclosed} = I
Step 5: Solve for B
B(2πr)=μ0IB(2\pi r) = \mu_0 IB=μ0I2πr\boxed{B = \frac{\mu_0 I}{2\pi r}}
The physical read: outside the cylinder, the field is the same as for an infinitely thin wire carrying the same current. It falls off as 1/r1/r.

Part (b): Inside the cylinder (r < R)
Step 1: Choose the Amperian loop
Pick a circular path of radius r<Rr < R centered on the cylinder axis.
Step 2: Find the enclosed current
Only a fraction of the total current is enclosed. Since the current is uniformly distributed, use the current density:
J=IAcylinder=IπR2J = \frac{I}{A_{cylinder}} = \frac{I}{\pi R^2}
The current enclosed by a loop of radius rr:
Ienclosed=J⋅Aloop=IπR2⋅πr2I_{enclosed} = J \cdot A_{loop} = \frac{I}{\pi R^2} \cdot \pi r^2Ienclosed=Ir2R2I_{enclosed} = I\frac{r^2}{R^2}
Step 3: Apply Ampère’s Law
∮B⃗⋅dℓ⃗=μ0Ienclosed\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{enclosed}B(2πr)=μ0Ir2R2B(2\pi r) = \mu_0 I\frac{r^2}{R^2}
Step 4: Solve for B
B=μ0Ir22πrR2B = \frac{\mu_0 I r^2}{2\pi r R^2}B=μ0Ir2πR2\boxed{B = \frac{\mu_0 I r}{2\pi R^2}}
The physical read: inside the cylinder, the field grows linearly with distance from the axis (B∝rB \propto r). At the center (r=0r = 0), the field is zero.

Magnetic Field Profile: Inside vs. Outside

The complete magnetic field profile behaves very differently in the two regions.
5.4 - Ampère’s Law
Key observations: - At the center (r=0r = 0): B=0B = 0. - Inside (0<r<R0 < r < R): BB increases linearly with rr. - At the surface (r=Rr = R): BB is at its maximum, μ0I2πR\frac{\mu_0 I}{2\pi R}. - Outside (r>Rr > R): BB decreases as 1r\frac{1}{r}. - The field is continuous at the surface, with no jump.
Compared to the electric field in a uniformly charged sphere: - The mathematical structure is the same: linear inside, inverse-power outside. - It reveals a deep parallel between E and B field distributions.

Example Problem: A Thick Slab of Current

Problem: A very wide, flat conducting slab of thickness tt carries current out of the page, spread evenly with current density JJ. Use Ampère’s Law to find the magnetic field outside the slab, and inside it at a distance yy from the middle plane.
5.4 - Ampère’s Law

Solution

Step 1: Use the symmetry
Think of the slab as lots of wires side by side, all with current out of the page. Above the slab their fields add up to point left, and below it they point right. The field is parallel to the slab, and its size depends only on the distance from the middle plane, the same above and below.
Step 2: Choose the Amperian loop
Use a rectangle that straddles the slab, with its top and bottom sides (length ℓ\ell) parallel to the slab at a distance yy above and below the middle. Go around it counterclockwise: - Top and bottom sides: on the top you travel left, the same way B⃗\vec{B} points, and on the bottom you travel right, again with B⃗\vec{B}. Each contributes BℓB\ell. - The two sides that cross the slab: B⃗\vec{B} is perpendicular to them, so they contribute nothing.
∮B⃗⋅dℓ⃗=2Bℓ\oint \vec{B} \cdot d\vec{\ell} = 2B\ell
Step 3: Outside the slab (y>t/2y > t/2)
The loop encloses the full thickness, so Ienclosed=J(tℓ)I_{enclosed} = J(t\ell):
2Bℓ=μ0Jtℓ⇒B=μ0Jt22B\ell = \mu_0 Jt\ell \quad\Rightarrow\quad \boxed{B = \frac{\mu_0 Jt}{2}}
The field outside doesn’t depend on distance: as long as the slab is much wider than your distance from it, the field is the same close to the slab or farther out.
Step 4: Inside the slab (y<t/2y < t/2)
Now the loop encloses only a thickness 2y2y, so Ienclosed=J(2yℓ)I_{enclosed} = J(2y\ell):
2Bℓ=μ0J(2y)ℓ⇒B=μ0Jy2B\ell = \mu_0 J(2y)\ell \quad\Rightarrow\quad \boxed{B = \mu_0 Jy}
The field grows linearly from zero at the middle plane to μ0Jt2\frac{\mu_0 Jt}{2} at the surfaces, where it matches the outside value.

Example Problem: A Cylinder with Non-Uniform Current Density

Problem: A long solid wire of radius R=2.0R = 2.0 mm carries a total current I=12I = 12 A along its length, but the current isn’t spread evenly. The current density grows with distance from the axis as J=brJ = br, where bb is a constant. Find BB inside the wire at r=1.0r = 1.0 mm.
Step 1: Enclosed current. When JJ changes with rr, add it up over thin rings of area dA=2πr′ dr′dA = 2\pi r'\,dr' (Topic 4.1):
Ienclosed=∫0rJ dA=∫0rbr′(2πr′ dr′)=2πbr33I_{enclosed} = \int_0^r J\,dA = \int_0^r br'(2\pi r'\,dr') = \frac{2\pi br^3}{3}
Step 2: Use the total current. At r=Rr = R, the loop encloses all of it, so I=2πbR33I = \frac{2\pi bR^3}{3}. Dividing the two results gives a handy shortcut:
IenclosedI=r3R3\frac{I_{enclosed}}{I} = \frac{r^3}{R^3}
Step 3: Ampère’s Law with a circular loop of radius rr:
B(2πr)=μ0Ir3R3⇒B=μ0Ir22πR3B(2\pi r) = \mu_0 I\frac{r^3}{R^3} \quad\Rightarrow\quad B = \frac{\mu_0 I r^2}{2\pi R^3}
Step 4: Plug in the numbers. At r=1.0r = 1.0 mm, Ienclosed=(12 A)(1.02.0)3=1.5I_{enclosed} = (12 \text{ A})\left(\frac{1.0}{2.0}\right)^3 = 1.5 A, so
B=μ0Ienclosed2πr=(4π×10−7 T\cdotpm/A)(1.5 A)2π(1.0×10−3 m)=3.0×10−4 TB = \frac{\mu_0 I_{enclosed}}{2\pi r} = \frac{(4\pi \times 10^{-7}\text{ T·m/A})(1.5 \text{ A})}{2\pi(1.0 \times 10^{-3} \text{ m})} = 3.0 \times 10^{-4} \text{ T}
Compare the uniform cylinder above, where B∝rB \propto r inside. Here B∝r2B \propto r^2, because more of the current sits near the surface. Outside, it’s still B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}: only the total enclosed current matters, not how it’s spread out.

Superposition: Adding Magnetic Fields

Magnetic fields add as vectors. To find the net field at a point from several wires, loops, or cylinders, find each one’s field there (size and direction) on its own, then add them as vectors.
Example. Two long parallel wires are 0.10 m apart. Wire A carries 6.0 A out of the page, and wire B carries 4.0 A into the page. Find the net field at the midpoint M, and find the point on the line through the wires where the field is zero.
5.4 - Ampère’s Law
At the midpoint (0.050 m from each wire):
BA=μ0(6.0 A)2π(0.050 m)=2.4×10−5 TBB=μ0(4.0 A)2π(0.050 m)=1.6×10−5 TB_A = \frac{\mu_0(6.0 \text{ A})}{2\pi(0.050 \text{ m})} = 2.4 \times 10^{-5} \text{ T} \qquad B_B = \frac{\mu_0(4.0 \text{ A})}{2\pi(0.050 \text{ m})} = 1.6 \times 10^{-5} \text{ T}
Directions from the right-hand rule: wire A’s current comes out of the page, so its field circles counterclockwise and points up the page at M. Wire B’s current goes into the page, so its field circles clockwise and also points up the page at M. Same direction, so the sizes add: B=4.0×10−5B = 4.0 \times 10^{-5} T, up the page.
Where the field is zero: between the wires, both fields point up, so they can’t cancel. Outside the wires, they point opposite ways. The zero has to be on the side of the weaker current (wire B), where a point can be close to B but farther from A. At a distance xx from wire A, past wire B:
μ0(6.0)2πx=μ0(4.0)2π(x−0.10)⇒6.0(x−0.10)=4.0x⇒x=0.30 m\frac{\mu_0(6.0)}{2\pi x} = \frac{\mu_0(4.0)}{2\pi(x - 0.10)} \quad\Rightarrow\quad 6.0(x - 0.10) = 4.0x \quad\Rightarrow\quad x = 0.30 \text{ m}
The field is zero 0.30 m from wire A, which is 0.20 m past wire B. Check: 6.00.30=4.00.20=20\frac{6.0}{0.30} = \frac{4.0}{0.20} = 20 A/m, so the two fields match.
Cylinders work the same way. A coaxial cable has a central wire carrying II one way and a thin outer conducting shell carrying II back the other way. A circular Amperian loop between them encloses only the central wire, so B=μ0I2πrB = \frac{\mu_0 I}{2\pi r} there. A loop outside the cable encloses I−I=0I - I = 0, so the field outside is zero: the two fields cancel. That’s why a coaxial cable doesn’t make a magnetic field around itself.

Choosing an Amperian Loop

The power of Ampère’s Law comes from picking the right loop to exploit the symmetry.

Guidelines for Choosing Loops

  1. Match the symmetry of the problem.
      • Cylindrical symmetry means circular loops.
      • Planar symmetry means rectangular loops.
      • A solenoid means a rectangular loop with one side inside and one outside.
  1. Make B⃗\vec{B} parallel or perpendicular to dℓ⃗d\vec{\ell}.
      • Parallel: B⃗⋅dℓ⃗=B dℓ\vec{B} \cdot d\vec{\ell} = B \, d\ell, so it contributes fully.
      • Perpendicular: B⃗⋅dℓ⃗=0\vec{B} \cdot d\vec{\ell} = 0, so it contributes nothing.
  1. Choose paths where BB is constant.
      • That makes the integral ∮B dℓ=B∮dℓ\oint B \, d\ell = B \oint d\ell easy to evaluate.
  1. Make calculating IenclosedI_{enclosed} straightforward.
      • Use symmetry to figure out what current passes through the loop.
When Ampère’s Law is most useful: - High symmetry (infinite wires, solenoids, toroids). - Uniform current distributions. - When you need the field, not just qualitative behavior.
When to use Biot-Savart instead: - Low-symmetry situations. - Finite-length wires. - Arbitrary current configurations.

Maxwell’s Equations: The Complete Set

With the Ampère-Maxwell Law, we now have all four of Maxwell’s equations, which completely describe every electromagnetic phenomenon.

The Four Maxwell’s Equations

1. Gauss’s Law (Electricity):
∮E⃗⋅dA⃗=Qenclosedϵ0\oint \vec{E} \cdot d\vec{A} = \frac{Q_{enclosed}}{\epsilon_0}
2. Gauss’s Law (Magnetism):
∮B⃗⋅dA⃗=0\oint \vec{B} \cdot d\vec{A} = 0
3. Faraday’s Law:
∮E⃗⋅dℓ⃗=−dΦBdt\oint \vec{E} \cdot d\vec{\ell} = -\frac{d\Phi_B}{dt}
4. Ampère-Maxwell Law:
∮B⃗⋅dℓ⃗=μ0Ienclosed+μ0ϵ0dΦEdt\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{enclosed} + \mu_0\epsilon_0\frac{d\Phi_E}{dt}
Together, these equations: - Unify electricity and magnetism. - Predict electromagnetic waves. - Explain light as electromagnetic radiation. - Form the foundation of classical electrodynamics.

Summary of Key Formulas

Ampère’s Law

∮B⃗⋅dℓ⃗=μ0Ienclosed\oint \vec{B} \cdot d\vec{\ell} = \mu_0 I_{enclosed}

Common Magnetic Field Results

Configuration
Magnetic Field
Notes
Long straight wire
B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
At distance rr from the wire
Solenoid (inside)
B=μ0nIB = \mu_0 n I
nn = turns per length
Solenoid (outside)
B≈0B \approx 0
Ideally zero for an infinite solenoid
Cylinder (inside, r < R)
B=μ0Ir2πR2B = \frac{\mu_0 I r}{2\pi R^2}
Linear in rr
Cylinder (outside, r > R)
B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
Same as a thin wire

Common Mistakes

  1. Choosing the wrong Amperian loop. The loop has to exploit the symmetry. For a straight wire, use a circular loop, not a square one. For a solenoid, use a rectangular loop with one side inside and one outside, not a circular loop.
  1. Forgetting to count only the enclosed current. Ampère’s Law uses IenclosedI_{enclosed}, not the total current in the system. When the loop sits inside a conductor with distributed current, you have to calculate what fraction of the current passes through the loop area.
  1. Assuming symmetry where there isn’t any. Ampère’s Law is only practically useful when there’s enough symmetry to pull BB out of the integral. For finite wires or complex geometries, you have to use Biot-Savart instead.
  1. Confusing the line integral with the surface integral. Gauss’s Law uses a surface integral (∮E⃗⋅dA⃗\oint \vec{E} \cdot d\vec{A}) over a closed surface. Ampère’s Law uses a line integral (∮B⃗⋅dℓ⃗\oint \vec{B} \cdot d\vec{\ell}) around a closed path. Don’t mix up the notation or the geometry.
  1. Mixing up the inside and outside formulas. For a cylinder, the field inside grows linearly from zero at the center (B∝rB \propto r). Outside, it drops as inverse distance (B∝1/rB \propto 1/r). Students often wrongly think the field is strongest at the center, or they use the same formula for both regions.

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.