Skip to content
Tutorials Center
My learning

Topics

Lesson 20 of 49 · Magnetostatics

Ampère's law

Use Ampère's circuital law and symmetry to find magnetic fields of straight wires, thick wires, solenoids and toroids, with worked numbers and numerical checks.

The Biot–Savart law always works, but it requires an integral over every current element. Ampère's law is the magnetic counterpart of Gauss's law: a global statement that, when the current has enough symmetry, gives B in one line. It also reveals the central fact of magnetostatics: the magnetic field circulates around currents.

Three panels: a wire with a circular Amperian loop, a solenoid with a rectangular loop, and a toroid with a circular loop inside the ring
Caption: Pick a loop along which B is constant and parallel to the path, and the field follows from the enclosed current.

What you will learn

  • The statement of Ampère's law in integral and differential form.
  • How to choose an Amperian loop and use the right-hand rule for the sign of the enclosed current.
  • Fields of a long wire, a thick wire, a solenoid, a toroid and a current sheet.
  • The limit of the law: why it needs repair when fields change in time.

Key terms

  • Amperian loop: an imaginary closed path chosen to exploit symmetry.
  • Enclosed current I_enc: net current through any surface bounded by the loop.
  • Circulation: ∮ B · dl around the loop.
  • Solenoid: a long coil; n is the number of turns per meter.
  • Toroid: a solenoid bent into a ring with N turns in total.

The law

For steady currents,

∮ B · dl = μ₀ I_enc

The circulation of B around any closed loop equals μ₀ times the current threading the loop, counted positive when it flows in the direction given by the right-hand rule (fingers along the loop's direction, thumb along positive current). By Stokes' theorem, with I_enc = ∫ J · dA,

∇ × B = μ₀ J

This is the second equation of magnetostatics. Together with ∇·B = 0 it can be shown to follow from the Biot–Savart law. For the infinite wire, you can check at once: on a circle of radius s around the wire, B is tangent and constant by symmetry, so B · 2πs = μ₀ I and B = μ₀ I / (2π s), the same result as the Biot–Savart integral but in one line.

The recipe

  1. Use symmetry to determine the direction of B and which coordinates it depends on.
  2. Choose a loop with B · dl either constant (parallel to the path) or zero (perpendicular).
  3. Find I_enc for the surface the loop bounds.
  4. Solve B · (path length) = μ₀ I_enc.

Thick wire

A long cylindrical wire of radius R carries current I uniformly. For s > R, I_enc = I, so B = μ₀ I / (2π s). For s < R the loop encloses I s²/R², so

B = μ₀ I s / (2π R²)

The field rises linearly to a maximum at the surface, then falls as 1/s. For I = 20 A and R = 2 mm, the surface field is 2.0 mT.

Ideal solenoid

A long solenoid with n turns per meter and current I. The field inside is axial and uniform, and outside it is negligible (for an ideal, infinitely long coil). Take a rectangle with one side of length L inside, parallel to the axis, and the other outside. The perpendicular sides contribute nothing, and the outside side contributes zero, so B L = μ₀ n L I and

B = μ₀ n I

For n = 1000 turns/m and I = 2 A: B = 2.5 mT. Real solenoids have end effects: at the center of a finite solenoid of length L and radius R, the field is μ₀ n I · (L/2)/√((L/2)² + R²), 99.5% of the ideal value for L = 20 R.

Toroid

A toroid with N turns total, a circular loop of radius s inside the ring: B · 2π s = μ₀ N I, so

B = μ₀ N I / (2π s)

for points inside the ring and zero outside. The field is trapped in the ring, which is why toroidal cores are used in transformers and inductors. Doubling the ring radius halves the field.

Infinite current sheet

A sheet carrying a surface current K (A/m) gives a uniform field B = μ₀ K / 2 on each side, parallel to the sheet and perpendicular to K, pointing in opposite directions on opposite sides. Across the sheet B jumps by μ₀ K, the magnetic analog of the electric jump σ/ε₀. Two sheets with opposite currents give a uniform field μ₀ K between them and none outside: the magnetic analog of the parallel-plate capacitor.

An important limit

Ampère's law as stated is valid only for steady currents. Consider a capacitor being charged by a wire: choose a loop around the wire. One surface bounded by the loop cuts the wire (with enclosed current I). Another surface passes between the capacitor plates, where there is no current, so I_enc = 0. The two surfaces bounded by the same loop give different answers, so the law cannot hold in this form for time-varying fields. Maxwell resolved this in 1861 by adding a term μ₀ε₀ ∂E/∂t, the displacement current, in Chapter 5.

Common misconceptions

  • "B at a point depends only on the current enclosed by the loop." Ampère's law gives only the circulation. The field at a point is produced by all currents, inside and outside; in symmetric cases the outside contributions drop out of the integral or cancel.
  • "A solenoid has zero field outside." Only an infinitely long ideal one. Real finite solenoids have return field lines outside.
  • "Ampère's law is a different law from Biot–Savart." For steady currents they are equivalent; Ampère's law is the differential form, ∇×B = μ₀J.

Try it

The first example computes the circulation of the field of a thick wire numerically for several loop radii and plots B(s). The second shows the on-axis field of finite solenoids of different lengths, approaching the ideal value.

Python Field of a thick wire and Ampère's circulation

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python Finite solenoids approach the ideal field

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 5 questions

of 5 answered You scored / 5 · perfect!

  1. 1. A long straight wire carries 8 A. What is B at 4 cm from the wire?

    B = μ₀I/(2πs) = 2e-7 × 8 / 0.04 = 4.0e-5 T.
  2. 2. Inside an ideal solenoid with 500 turns/m carrying 4 A, B is

    B = μ₀nI = 4π×10⁻⁷ × 500 × 4 = 2.5e-3 T.
  3. 3. For a thick wire of radius R, the field inside at s < R is proportional to

    The enclosed current grows as s², and the loop length as s, so B ∝ s.
  4. 4. Why can't Ampère's law (steady form) be used to charge a capacitor?

    Charging makes E change in time; Maxwell's displacement current fixes the inconsistency.
  5. 5. The field in the hole of a toroid (inside radius < the ring) is

    A loop in the hole encloses no current, so B = 0 there.

Summary

  • Ampère's law: ∮B·dl = μ₀I_enc, or ∇×B = μ₀J, for steady currents.
  • Wire μ₀I/2πs; thick wire inside μ₀Is/(2πR²); solenoid μ₀nI; toroid μ₀NI/(2πs); sheet μ₀K/2.
  • Choose a loop where B is constant and parallel to the path (or perpendicular to it).
  • The law fails for changing electric fields; Maxwell's displacement current repairs it.

Next: The vector potential and magnetic materials