← General Physics II
🌀

Sources of Magnetic Field

Just as electric charges are the sources of electric fields, electric currents are the sources of magnetic fields. The Biot–Savart law gives the field of any current distribution by integration; Ampère's law gives it directly for highly symmetric geometries. These results underpin every electromagnet, transformer, and electric motor ever built.

Key Concepts

Biot–Savart Law
The magnetic field contribution from a small current element IdlI\,d\vec{l} at distance rr is dB=(μ0/4π)Idl×r^/r2d\vec{B} = (\mu_0/4\pi)\,I\,d\vec{l}\times\hat{r}/r^2. The full field is found by integrating over the entire current path. μ0=4π×107\mu_0 = 4\pi\times10^{-7} T·m/A is the permeability of free space.
Field of a Long Straight Wire
A long straight wire carrying current II produces a magnetic field that circles the wire: B=μ0I/(2πr)B = \mu_0 I/(2\pi r) at perpendicular distance rr. Direction given by right-hand rule: thumb along current, fingers curl in the direction of B\vec{B}.
Force Between Parallel Wires
Two parallel wires carrying currents I1I_1 and I2I_2 separated by distance dd attract each other (same direction currents) or repel (opposite direction) with force per unit length F/L=μ0I1I2/(2πd)F/L = \mu_0 I_1 I_2/(2\pi d). This defines the ampere.
Ampère's Law
The line integral of B\vec{B} around any closed path equals μ0\mu_0 times the net current enclosed: Bdl=μ0Ienc\oint\vec{B}\cdot d\vec{l} = \mu_0 I_{\text{enc}}. Analogous to Gauss's law — useful only when symmetry makes BB constant along the path.
Solenoid and Toroid
A solenoid of nn turns per unit length carrying current II has a uniform interior field B=μ0nIB = \mu_0 nI and nearly zero field outside. A toroid (solenoid bent into a ring) has field B=μ0NI/(2πr)B = \mu_0 NI/(2\pi r) inside and zero outside.

Key Equations

Field of a long straight wire
B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
B at perpendicular distance r from a long wire carrying current I. μ₀ = 4π×10⁻⁷ T·m/A.
Force per unit length between wires
FL=μ0I1I22πd\frac{F}{L} = \frac{\mu_0 I_1 I_2}{2\pi d}
Force per unit length between two long parallel wires separated by d. Attractive for same-direction currents.
Ampère's Law
Bdl=μ0Ienc\oint\vec{B}\cdot d\vec{l} = \mu_0 I_{\text{enc}}
Line integral of B around a closed Ampèrian loop equals μ₀ times the enclosed current.
Field inside a solenoid
B=μ0nIB = \mu_0 nI
Uniform field inside an ideal solenoid; n = N/L is turns per unit length. Field outside ≈ 0.
Worked Example

Magnetic Field of a Long Straight Wire and Force Between Wires

Problem

Two long parallel wires carry I1=5.0I_1 = 5.0 A and I2=3.0I_2 = 3.0 A in the same direction, separated by d=0.10d = 0.10 m. Find (a) the field from wire 1 at wire 2's location, and (b) the force per unit length between them.

Solution

(a) Magnetic field of wire 1 at distance d=0.10d = 0.10 m:

B1=μ0I12πd=(4π×107)(5.0)2π(0.10)=20π×1070.20π=1.0×105 T=10μTB_1 = \frac{\mu_0 I_1}{2\pi d} = \frac{(4\pi\times10^{-7})(5.0)}{2\pi(0.10)} = \frac{20\pi\times10^{-7}}{0.20\pi} = 1.0\times10^{-5}\text{ T} = 10\,\mu\text{T}

(b) Force per unit length on wire 2 in the field of wire 1:

FL=μ0I1I22πd=(4π×107)(5.0)(3.0)2π(0.10)=60π×1070.20π=3.0×105 N/m=30μN/m\frac{F}{L} = \frac{\mu_0 I_1 I_2}{2\pi d} = \frac{(4\pi\times10^{-7})(5.0)(3.0)}{2\pi(0.10)} = \frac{60\pi\times10^{-7}}{0.20\pi} = 3.0\times10^{-5}\text{ N/m} = 30\,\mu\text{N/m}

Same-direction currents attract, so the wires pull toward each other.

Answer B₁ at wire 2 = 10 μT; F/L = 30 μN/m (attractive).
Practice

Exercises

7 problems
1 of 7

A long straight wire carries I=10I = 10 A. What is the magnetic field magnitude (in μ\muT) at a perpendicular distance r=0.050r = 0.050 m? Use μ0=4π×107\mu_0 = 4\pi\times10^{-7} T·m/A.

μT
2 of 7

A solenoid has n=1000n = 1000 turns/m and carries I=2.0I = 2.0 A. What is the magnetic field (in mT) inside it?

mT
3 of 7

Two long parallel wires carry I1=4.0I_1 = 4.0 A and I2=6.0I_2 = 6.0 A, separated by d=0.20d = 0.20 m. What is the force per unit length (in μ\muN/m) between them?

μN/m
4 of 7

A solenoid of length L=0.30L = 0.30 m must produce B=5.0B = 5.0 mT with a current of I=0.50I = 0.50 A. How many turns NN does it need?

turns
5 of 7

A long straight wire carries I=8.0I = 8.0 A. At what distance rr (in cm) from the wire is the field B=32μB = 32\,\muT?

cm
6 of 7

A long wire carries I=6.0I = 6.0 A. What is the magnetic field (in μ\muT) at r=0.040r = 0.040 m from it?

μT
7 of 7

A solenoid has n=500n = 500 turns/m, carries I=3.0I = 3.0 A, and has a ferromagnetic core with relative permeability κm=200\kappa_m = 200. What is the field (in T) inside it?

T

Key Takeaways

  • Magnetic fields from currents form closed loops (no magnetic monopoles); they circle a straight wire and are uniform inside a solenoid.
  • Right-hand rule: thumb in the direction of II, fingers wrap in the direction of B\vec{B} around a straight wire.
  • Solenoid field B=μ0nIB = \mu_0 nI depends only on turns per meter and current — not on the solenoid's diameter or total length.
  • Same-direction currents attract; opposite-direction currents repel. This is how the ampere is formally defined.
  • Ampère's law and Gauss's law are parallel structures: both relate a field integral to an enclosed source, and both work best with high symmetry.