Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 49 · Magnetostatics

The Biot–Savart law

Use the Biot-Savart law to find the magnetic field of straight wires, circular loops and Helmholtz coils, compare it with Coulomb's law, and check results numerically.

Coulomb's law tells you the electric field of a point charge, and superposition handles the rest. The Biot–Savart law is the magnetic counterpart: it gives the field of a tiny piece of current, and superposition handles every wire, loop and coil. Jean-Baptiste Biot and Félix Savart found it experimentally in 1820; it remains the basic tool for computing magnetic fields of arbitrary current shapes.

A current element I dl, the vector r to field point P, the angle theta, B out of the page, and a plot of the axis field of a loop
Caption: Every current element adds a small field perpendicular to both the element and the line to the field point; the loop field peaks at the center.

What you will learn

  • The Biot–Savart law for line, surface and volume currents and the direction rule.
  • How to find the field of a straight wire, a circular loop and a pair of Helmholtz coils.
  • The force between parallel current-carrying wires.
  • The magnetic dipole field of a small loop.

Key terms

  • Current element I dl: a small piece of wire carrying current I in the direction dl.
  • Superposition: the total field is the sum of the fields of all current elements.
  • Magnetic dipole moment m: m = I A for a flat loop of area A (direction by the right-hand rule).
  • Helmholtz coils: two identical coils a distance R apart (R = coil radius) that give a nearly uniform field in the middle.
  • Surface current K: current per unit width, in A/m.

The law

For a steady current I in a thin wire, the field at point r from a segment dl' at position r' is

dB = (μ₀ / 4π) · I dl' × r̂ / r²

where r is the vector from the element to the field point, r = |r| and r̂ = r/r. The full field is the integral over the whole circuit:

B = (μ₀ / 4π) ∮ I dl' × r̂ / r²

Compare it with E = k ∫ r̂ dq/r². Both fall off as 1/r² from the source element. The differences are the cross product (field perpendicular to both the current and the line to the observer, so field lines circle the current) and the constant: μ₀/4π = 10⁻⁷ N/A² (to about nine digits).

For surface and volume currents: replace I dl' by K dA' or J dV'.

Direction. Point your right thumb along the current; your fingers curl in the direction of B. At a point the direction is dl × r̂: in the figure, with the wire going up-right and P to its lower right, the cross product points into the page.

Worked example 1: a straight wire

A straight wire along the z axis carries current I. At a perpendicular distance s from the wire, an element at height z' is at distance √(s² + z'²), and |dl × r̂| = dz' sinθ = dz' s/√(s²+z'²). So for a wire running from angle θ₁ to θ₂ (measured from the perpendicular dropped to the wire):

B = (μ₀ I / 4π s)(sin θ₂ − sin θ₁)

For an infinite wire (θ from −90° to +90°) this gives

B = μ₀ I / (2π s)

pointing in circles around the wire. For I = 10 A at s = 1 m: 2 μT, about 4% of the Earth's field. At s = 1 cm it is 200 μT, four times the Earth's field.

Worked example 2: a circular loop

A loop of radius R carries current I. On its axis, at height z above the center, the elements are all at distance √(R² + z²) and perpendicular to the line to P. By symmetry only the axial components survive:

B_z = μ₀ I R² / (2 (R² + z²)^{3/2})

At the center (z = 0): B = μ₀ I / (2R). For one turn with R = 5 cm and I = 2 A that is 25 μT. For N tight turns multiply by N. Far away (z ≫ R):

B ≈ μ₀ I R² / (2 z³) = μ₀ m / (2π z³) with m = I π R²

which is the same form as the electric dipole field on its axis. Every small current loop is a magnetic dipole.

Helmholtz coils

A single loop has a sharply peaked field. Two identical coils of radius R, each with N turns, a distance R apart on the same axis and carrying current in the same direction, make a field that is uniform to a high degree at the midpoint: the first and second derivatives of B vanish there. The midpoint field is

B = (4/5)^{3/2} μ₀ N I / R ≈ 0.7155 μ₀ N I / R

For R = 10 cm, N = 100 and I = 1 A, B ≈ 0.9 mT. Helmholtz coils are used to cancel Earth's field or to create calibrated fields for experiments.

Force between parallel wires

Wire 1 produces B₁ = μ₀ I₁/(2π d) at wire 2. Wire 2, carrying I₂, feels F = I₂ L B₁. Per unit length:

F / L = μ₀ I₁ I₂ / (2π d)

Currents in the same direction attract, opposite currents repel. For 1 A in each wire and d = 1 m, F/L = 2 × 10⁻⁷ N/m. Until 2019 this number defined the ampere; now the ampere is defined through the elementary charge and this force is measured instead (so μ₀ is very slightly different from 4π × 10⁻⁷).

Common misconceptions

  • "A current element produces a field in its own direction." The field is perpendicular to the element, circling it. Along the line of the element (θ = 0) there is no field at all.
  • "Biot–Savart applies to a single moving charge exactly." It applies to steady currents. For a point charge with v ≪ c, it gives B = (μ₀/4π) q v × r̂ / r² as a good approximation, but accelerating charges need the full theory (Chapter 7).
  • "Parallel currents repel like charges." Parallel currents attract; opposite currents repel.
  • "You can have an isolated current element." Steady currents form closed loops (∇·J = 0), so the law is always applied to a complete circuit.

Try it

The first example is a general numerical Biot–Savart routine: it chops any wire shape into small steps and adds up dl × r. It is tested here against the analytic loop result. The second compares a single loop with a Helmholtz pair along the axis.

Python A numerical Biot–Savart solver, tested on a loop

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 Helmholtz coils: a uniform field in the middle

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 · 6 questions

of 6 answered You scored / 6 · perfect!

  1. 1. What is the magnetic field at the center of a circular loop of radius 10 cm carrying 5 A?

    B = μ₀I/2R = 4π×10⁻⁷ × 5 / 0.2 = 3.14e-5 T.
  2. 2. Two long parallel wires carry currents in the same direction. The force between them is

    Parallel currents attract; antiparallel currents repel.
  3. 3. The magnetic field of a long straight wire at distance s varies as

    B = μ₀I/(2πs).
  4. 4. The direction of dB from the element I dl at a point is

    The Biot–Savart law contains the cross product dl × r̂.
  5. 5. In Helmholtz coils the coil spacing equals

    With spacing R the second derivative of B vanishes at the midpoint, so the field is nearly uniform.
  6. 6. Far from a small current loop on its axis, B falls off as

    A loop is a magnetic dipole: B = μ₀m/(2πz³).

Summary

  • Biot–Savart: dB = (μ₀/4π) I dl × r̂ / r², integrate over the circuit; the field circles the current.
  • Infinite straight wire: B = μ₀I/(2πs). Loop: B_z = μ₀IR²/[2(R²+z²)^{3/2}], center μ₀I/2R.
  • Helmholtz pair at spacing R: B ≈ 0.7155 μ₀NI/R, nearly uniform.
  • Parallel currents attract with F/L = μ₀I₁I₂/(2πd); small loops are magnetic dipoles with m = IA.

Next: Ampère's law