The Biot–Savart Law

A current makes a magnetic field, and the Biot–Savart law says how much each short piece of wire contributes: dB = (μ₀/4π) I dl × r̂/r², at right angles both to the wire and to the line to the point. Add the pieces and you have the field of any wire. Choose a shape, set the current, and compare the closed form with a sum of N straight elements.

The field of one current element dB⃗=μ04π I dl⃗×r^r2d\vec B=\frac{\mu_0}{4\pi}\,\frac{I\,d\vec l\times\hat r}{r^{2}}
The force on a current, and between two wires F⃗=IL⃗×B⃗,FL=μ0I1I22πd\vec F=I\vec L\times\vec B,\qquad\frac{F}{L}=\frac{\mu_0I_1I_2}{2\pi d}
Loading interactive simulation...

Lesson

The theory — The Biot–Savart Law

The Biot–Savart law gives the magnetic field of a current element I dl at a point a distance r away: dB = (μ₀/4π) I dl × r̂/r², with μ₀ = 4π × 10⁻⁷ T·m/A. The field of a whole wire is the sum of its elements, which is an integral along the wire.

What each symbol means

I dl
a short piece of wire, as a vector along the current
r̂
the unit vector from the element to the point
φ
the angle between dl and r̂; the element's field is proportional to sin φ

Where the formula comes from

  1. One element. The field of I dl is at right angles to both dl and r̂ (right-hand rule) and has size (μ₀/4π) I dl sin φ/r². An element pointing straight at P contributes nothing.
    dB⃗=μ04π I dl⃗×r^r2,dB=μ04π I dl sin⁡φr2d\vec B=\frac{\mu_0}{4\pi}\,\frac{I\,d\vec l\times\hat r}{r^{2}},\qquad dB=\frac{\mu_0}{4\pi}\,\frac{I\,dl\,\sin\varphi}{r^{2}}
  2. A straight segment. Every element's field at P points the same way. Put x = d tan θ, so r = d/cos θ and sin φ = cos θ, and the integral becomes ∫cos θ dθ. An infinite wire runs from θ = −90° to 90°.
    B=μ0I4πd∫θ1θ2cos⁡θ dθ=μ0I4πd(sin⁡θ2−sin⁡θ1) → μ0I2πdB=\frac{\mu_0I}{4\pi d}\int_{\theta_1}^{\theta_2}\cos\theta\,d\theta=\frac{\mu_0I}{4\pi d}\left(\sin\theta_2-\sin\theta_1\right)\ \to\ \frac{\mu_0I}{2\pi d}
  3. A loop on its axis. Every element is the same distance √(R² + z²) away and at right angles to its line to P. Round the loop the components across the axis cancel, and each element leaves the fraction R/√(R² + z²) along it.
    Bz=∮μ04π I dlR2+z2⋅RR2+z2=μ0IR22(R2+z2)3/2B_z=\oint\frac{\mu_0}{4\pi}\,\frac{I\,dl}{R^{2}+z^{2}}\cdot\frac{R}{\sqrt{R^{2}+z^{2}}}=\frac{\mu_0IR^{2}}{2\left(R^{2}+z^{2}\right)^{3/2}}
  4. An arc at its centre. Each element is a distance R away and at right angles to the radius, so the integral is the arc's angle times μ₀I/(4πR).
    B=∫0θ0μ04π IR dθR2=μ0Iθ04πRB=\int_{0}^{\theta_0}\frac{\mu_0}{4\pi}\,\frac{IR\,d\theta}{R^{2}}=\frac{\mu_0I\theta_0}{4\pi R}
  5. The force on a wire. A field pushes on a current element with dF = I dl × B, the force on its moving charges added up. Put one long wire in the other's field and the force per metre follows.
    dF⃗=I dl⃗×B⃗,FL=I2 μ0I12πdd\vec F=I\,d\vec l\times\vec B,\qquad\frac{F}{L}=I_2\,\frac{\mu_0I_1}{2\pi d}
Assumes
Steady currents in thin wires, in vacuum or air. Straight leads to an arc are taken to point at the centre, where their elements give nothing; a lead that passes P at a distance adds its own segment's field.

Problems solved in full

  1. A straight segment, beside its middle 3 steps

    A straight wire 20 cm long carries 5.0 A. Find B at a point 5.0 cm from its middle, and compare it with an infinite wire.

    Open this problem in the tool

    1. Each end is 10 cm from the foot of the perpendicular:

      sin⁡θ2=−sin⁡θ1=0.100.102+0.052≈0.8944\sin\theta_{2}=-\sin\theta_{1}=\frac{0{.}10}{\sqrt{0{.}10^{2}+0{.}05^{2}}}\approx0{.}8944
    2. The segment formula:

      B=μ0I4πd(sin⁡θ2−sin⁡θ1)=(10−7)(5.0)0.05 (1.789)≈1.789×10−5 TB=\frac{\mu_0I}{4\pi d}\left(\sin\theta_2-\sin\theta_1\right)=\frac{(10^{-7})(5{.}0)}{0{.}05}\,(1{.}789)\approx1{.}789\times10^{-5}\ \mathrm{T}
    3. An infinite wire at the same distance:

      B∞=μ0I2πd=(2×10−7)(5.0)0.05=2.0×10−5 TB_{\infty}=\frac{\mu_0I}{2\pi d}=\frac{(2\times10^{-7})(5{.}0)}{0{.}05}=2{.}0\times10^{-5}\ \mathrm{T}

    Answer

    17.89 μT, against 20 μT for an infinite wire: the segment fills 126.9° of the 180° an infinite wire would.

    B≈17.89 μT,B∞=20 μTB\approx17{.}89\ \mu\mathrm{T},\qquad B_{\infty}=20\ \mu\mathrm{T}
  2. A wire that ends opposite the point 1 steps

    A long straight wire carrying 5.0 A ends at the foot of the perpendicular from a point 5.0 cm away. Find B at the point.

    Open this problem in the tool

    Show solution
    1. The wire runs from θ₁ = 0 to θ₂ = 90°:

      B=μ0I4πd(1−0)=(10−7)(5.0)0.05=1.0×10−5 TB=\frac{\mu_0I}{4\pi d}\left(1-0\right)=\frac{(10^{-7})(5{.}0)}{0{.}05}=1{.}0\times10^{-5}\ \mathrm{T}

    Answer

    10 μT, half of the infinite wire's 20 μT.

    B=μ0I4πd=10 μTB=\frac{\mu_0I}{4\pi d}=10\ \mu\mathrm{T}
  3. A loop, on its axis and at its centre 2 steps

    A loop of radius 10 cm carries 5.0 A. Find B at its centre and 5.0 cm along its axis.

    Open this problem in the tool

    Show solution
    1. At the centre, z = 0:

      B0=μ0I2R=(4π×10−7)(5.0)2 (0.10)≈3.142×10−5 TB_{0}=\frac{\mu_0I}{2R}=\frac{(4\pi\times10^{-7})(5{.}0)}{2\,(0{.}10)}\approx3{.}142\times10^{-5}\ \mathrm{T}
    2. At z = 5.0 cm:

      B=μ0IR22(R2+z2)3/2=(4π×10−7)(5.0)(0.01)2 (0.0125)3/2≈2.248×10−5 TB=\frac{\mu_0IR^{2}}{2\left(R^{2}+z^{2}\right)^{3/2}}=\frac{(4\pi\times10^{-7})(5{.}0)(0{.}01)}{2\,(0{.}0125)^{3/2}}\approx2{.}248\times10^{-5}\ \mathrm{T}

    Answer

    31.42 μT at the centre, 22.48 μT at 5.0 cm.

    B0≈31.42 μT,B(5 cm)≈22.48 μTB_{0}\approx31{.}42\ \mu\mathrm{T},\qquad B(5\ \mathrm{cm})\approx22{.}48\ \mu\mathrm{T}
  4. A quarter circle 1 steps

    A wire bent into a quarter circle of radius 10 cm carries 5.0 A; its straight leads point at the centre. Find B at the centre.

    Open this problem in the tool

    Show solution
    1. The leads point at P, so sin φ = 0 for all their elements. On the arc, every element is R away with dl at right angles to r̂:

      B=μ0Iθ04πR=(10−7)(5.0)(π/2)0.10≈7.854×10−6 TB=\frac{\mu_0I\theta_0}{4\pi R}=\frac{(10^{-7})(5{.}0)(\pi/2)}{0{.}10}\approx7{.}854\times10^{-6}\ \mathrm{T}

    Answer

    7.854 μT, a quarter of the full loop's 31.42 μT.

    B=μ0I8R≈7.854 μTB=\frac{\mu_0I}{8R}\approx7{.}854\ \mu\mathrm{T}
  5. A hairpin 3 steps

    A long wire carrying 5.0 A runs in, turns round a semicircle of radius 10 cm and runs back out parallel to itself. Find B at the centre of the semicircle.

    Open this problem in the tool

    Show solution
    1. The semicircle is half a loop:

      B1=μ0I4R=(4π×10−7)(5.0)4 (0.10)≈1.571×10−5 TB_{1}=\frac{\mu_0I}{4R}=\frac{(4\pi\times10^{-7})(5{.}0)}{4\,(0{.}10)}\approx1{.}571\times10^{-5}\ \mathrm{T}
    2. Each straight wire ends level with the centre, a distance R from it, so each is half of an infinite wire, and both fields point the same way as the semicircle's:

      B2=2⋅μ0I4πR=2⋅(10−7)(5.0)0.10=1.0×10−5 TB_{2}=2\cdot\frac{\mu_0I}{4\pi R}=2\cdot\frac{(10^{-7})(5{.}0)}{0{.}10}=1{.}0\times10^{-5}\ \mathrm{T}
    3. Add them:

      B=μ0I4R(1+2π)≈2.571×10−5 TB=\frac{\mu_0I}{4R}\Bigl(1+\frac{2}{\pi}\Bigr)\approx2{.}571\times10^{-5}\ \mathrm{T}

    Answer

    25.71 μT, all three parts pointing the same way: out of the page when the current is seen to go round the semicircle anticlockwise.

    B≈25.71 μTB\approx25{.}71\ \mu\mathrm{T}
  6. A square loop, at its centre 2 steps

    A square loop of side 20 cm carries 5.0 A. Find B at its centre.

    Open this problem in the tool

    Show solution
    1. Each side is a segment with d = 10 cm and ends at x = ±10 cm, so sin θ = ±1/√2:

      B1=μ0I4πd(12+12)=(10−7)(5.0)0.10 2≈7.071×10−6 TB_{1}=\frac{\mu_0I}{4\pi d}\Bigl(\frac{1}{\sqrt2}+\frac{1}{\sqrt2}\Bigr)=\frac{(10^{-7})(5{.}0)}{0{.}10}\,\sqrt2\approx7{.}071\times10^{-6}\ \mathrm{T}
    2. The four sides give fields in the same direction:

      B=4B1=22 μ0Iπa≈2.828×10−5 TB=4B_{1}=\frac{2\sqrt2\,\mu_0I}{\pi a}\approx2{.}828\times10^{-5}\ \mathrm{T}

    Answer

    28.28 μT, a little less than the 31.42 μT of a circle of radius 10 cm, which the square surrounds.

    B=22 μ0Iπa≈28.28 μTB=\frac{2\sqrt2\,\mu_0I}{\pi a}\approx28{.}28\ \mu\mathrm{T}
  7. The force between two parallel wires 2 steps

    Two long parallel wires 5.0 cm apart each carry 10 A in the same direction. Find the force on a metre of either wire, and say which way it points.

    Open this problem in the tool

    Show solution
    1. Wire 1's field at wire 2:

      B1=μ0I12πd=(2×10−7)(10)0.05=4.0×10−5 TB_1=\frac{\mu_0I_1}{2\pi d}=\frac{(2\times10^{-7})(10)}{0{.}05}=4{.}0\times10^{-5}\ \mathrm{T}
    2. The force on a length L of wire 2 is I₂L × B₁, at right angles to the wire and pointing towards wire 1:

      FL=I2B1=(10)(4.0×10−5)=4.0×10−4 N/m\frac{F}{L}=I_2B_1=(10)(4{.}0\times10^{-5})=4{.}0\times10^{-4}\ \mathrm{N/m}

    Answer

    0.40 mN per metre, attractive. Reverse one current and it repels with the same size.

    FL=μ0I1I22πd=0.40 mN/m\frac{F}{L}=\frac{\mu_0I_1I_2}{2\pi d}=0{.}40\ \mathrm{mN/m}
  8. A Helmholtz pair 2 steps

    Two coaxial loops of radius 10 cm, 10 cm apart, each carry 5.0 A the same way. Find B at the midpoint.

    Open this problem in the tool

    Show solution
    1. Each loop is s/2 = R/2 from the midpoint:

      B=2⋅μ0IR22(R2+R2/4)3/2B=2\cdot\frac{\mu_0IR^{2}}{2\left(R^{2}+R^{2}/4\right)^{3/2}}
    2. Simplify:

      B=μ0IR2(54R2)3/2=855 μ0IR=855⋅(4π×10−7)(5.0)0.10≈4.496×10−5 TB=\frac{\mu_0IR^{2}}{\left(\tfrac{5}{4}R^{2}\right)^{3/2}}=\frac{8}{5\sqrt5}\,\frac{\mu_0I}{R}=\frac{8}{5\sqrt5}\cdot\frac{(4\pi\times10^{-7})(5{.}0)}{0{.}10}\approx4{.}496\times10^{-5}\ \mathrm{T}

    Answer

    44.96 μT, 1.431 times one loop's field at its own centre.

    B=855 μ0IR≈44.96 μTB=\frac{8}{5\sqrt5}\,\frac{\mu_0I}{R}\approx44{.}96\ \mu\mathrm{T}
  9. A loop seen from far away 3 steps

    Find the magnetic moment of the loop in problem 3 and estimate B 50 cm along its axis from the dipole formula. How good is the estimate?

    Open this problem in the tool

    Show solution
    1. The moment:

      m=IπR2=(5.0) π (0.10)2≈0.1571 A m2m=I\pi R^{2}=(5{.}0)\,\pi\,(0{.}10)^{2}\approx0{.}1571\ \mathrm{A\,m^{2}}
    2. The dipole formula:

      B≈μ0m2πz3=(2×10−7)(0.1571)(0.50)3≈2.513×10−7 TB\approx\frac{\mu_0m}{2\pi z^{3}}=\frac{(2\times10^{-7})(0{.}1571)}{(0{.}50)^{3}}\approx2{.}513\times10^{-7}\ \mathrm{T}
    3. The exact field:

      B=μ0IR22(R2+z2)3/2=(4π×10−7)(5.0)(0.01)2 (0.26)3/2≈2.370×10−7 TB=\frac{\mu_0IR^{2}}{2\left(R^{2}+z^{2}\right)^{3/2}}=\frac{(4\pi\times10^{-7})(5{.}0)(0{.}01)}{2\,(0{.}26)^{3/2}}\approx2{.}370\times10^{-7}\ \mathrm{T}

    Answer

    m = 0.1571 A·m²; the dipole formula gives 0.2513 μT against the exact 0.237 μT, 6% high at five radii.

    Bm≈0.2513 μT,B≈0.2370 μTB_{m}\approx0{.}2513\ \mu\mathrm{T},\qquad B\approx0{.}2370\ \mu\mathrm{T}
  10. The force on a wire in a uniform field 1 steps

    A straight wire 20 cm long carries 5.0 A at 30° to a uniform field of 0.30 T. Find the force on it.

    Show solution
    1. F = IL × B, of size ILB sin θ:

      F=ILBsin⁡θ=(5.0)(0.20)(0.30)sin⁡30∘=0.15 NF=ILB\sin\theta=(5{.}0)(0{.}20)(0{.}30)\sin30^{\circ}=0{.}15\ \mathrm{N}

    Answer

    0.15 N, at right angles to both the wire and the field.

    F=0.15 NF=0{.}15\ \mathrm{N}

Supplementary problems, answers only

  1. A long straight wire carries 20 A. Find B 4.0 cm from it.

    Show answer

    100 μT.

    B=μ0I2πd=100 μTB=\frac{\mu_0I}{2\pi d}=100\ \mu\mathrm{T}
  2. A flat coil of 50 turns and radius 5.0 cm carries 2.0 A. Find B at its centre.

    Show answer

    1.257 mT: fifty times one turn's field.

    B=N μ0I2R≈1.257 mTB=N\,\frac{\mu_0I}{2R}\approx1{.}257\ \mathrm{mT}
  3. Find B at the centre of a square loop of side a carrying I.

    Show answer

    2√2 μ₀I/(πa).

    B=22 μ0IπaB=\frac{2\sqrt2\,\mu_0I}{\pi a}
  4. Two long parallel wires 5.0 cm apart carry 10 A in opposite directions. Find B halfway between them.

    Show answer

    160 μT: the two fields point the same way there.

    B=2⋅μ0I2π (d/2)=160 μTB=2\cdot\frac{\mu_0I}{2\pi\,(d/2)}=160\ \mu\mathrm{T}
  5. A rectangular loop 10 cm by 5.0 cm carries 3.0 A in a uniform field of 0.20 T parallel to its plane. Find the torque on it.

    Show answer

    3.0 × 10⁻³ N·m, from τ = mB sin 90° with m = IA.

    τ=IAB=3.0×10−3 N m\tau=IAB=3{.}0\times10^{-3}\ \mathrm{N\,m}
  6. A proton moves at 1.0 × 10⁵ m/s parallel to a long wire carrying 10 A, 2.0 cm from it, in the direction of the current. Find the force on it.

    Show answer

    1.602 × 10⁻¹⁸ N, towards the wire.

    F=qvB=qv μ0I2πd≈1.602×10−18 NF=qvB=qv\,\frac{\mu_0I}{2\pi d}\approx1{.}602\times10^{-18}\ \mathrm{N}

Two currents running the same way attract

Press Two wires, same direction: 10 A in each, 5 cm apart, and each metre of wire is pulled towards the other with 0.4 mN. Now press Two wires, opposite directions and they push apart with the same force. Charges behave the other way round, with like charges repelling. The force on wire 2 is I₂ times its direction crossed with wire 1's field, μ₀I₁/(2πd), and for currents running the same way that cross product points back at wire 1. Until 20 May 2019 this force defined the ampere: 1 A was the current that gave 2 × 10⁻⁷ N per metre between two wires 1 m apart, which made μ₀ exactly 4π × 10⁻⁷ N/A². The ampere is now fixed by the charge of the electron, and μ₀ has become a measured number: CODATA 2022 gives 1.25663706127(20) × 10⁻⁶ N/A², the old value to within its uncertainty.

A loop of current is a magnet, and far away it looks like any other

Press A loop, seen from far away. 50 cm along the axis of a loop of radius 10 cm the field is 0.237 μT, and μ₀m/(2πz³), with the moment m = IπR², gives 0.2513 μT; further out the two converge. That is a dipole's field. An electric dipole p gives 2kp/z³ along its axis, and the loop gives (μ₀/4π)·2m/z³: the same law with μ₀/4π in place of k and m in place of p. Far away, all that survives of the loop is its moment, current times area; its shape and the details of the wire only correct the field closer in, which is why a small coil and a compass needle can stand in for each other.

Two loops one radius apart make the flattest field

Press A Helmholtz pair. With the loops 10 cm apart, equal to their radius, the field at the midpoint is (8/5√5)μ₀I/R = 44.96 μT, and moving 1 cm along the axis changes it by 0.011%. One loop alone changes by 1.5% over the same centimetre. One loop's field along its axis is curved downward near the loop and upward far from it, and changes over at z = R/2. Set s = R and the midpoint sits at that point of inflection for both loops, so the second derivative there is zero; the slope and the third derivative cancel between the two loops by symmetry, so the field departs from its midpoint value only as z⁴. Set s to 8 cm and the curve on the chart bulges in the middle; set it to 12 cm and it sags.

Learning path

Where fields come from

References (6)