So far we have taken the fields of wires and solenoids from Physics 2 as given. Where do they come from? Every small piece of current makes its own small field, and the total is the sum, just as charge pieces added up to an electric field. The rule for one piece is the Biot–Savart law, the magnetic partner of Coulomb's law.
Key idea
A piece of wire $d\vec{\ell}$ carrying current $I$ makes, at a point a distance $r$ away in the direction $\hat{r}$,
$$d\vec{B} = \frac{\mu_0}{4\pi}\,\frac{I\,d\vec{\ell}\times\hat{r}}{r^2}, \qquad dB = \frac{\mu_0}{4\pi}\,\frac{I\,d\ell\,\sin\theta}{r^2},$$
with $\mu_0/4\pi = 10^{-7}\ \text{T·m/A}$ and $\theta$ the angle between $d\vec{\ell}$ and $\hat{r}$.
Why it works
Compare with a charge piece's field, $k\,dq/r^2$: both fall off as $1/r^2$ and grow with the source. The difference is direction. A current piece has a direction of its own, $d\vec{\ell}$, and its field circles around it, perpendicular to both $d\vec{\ell}$ and $\hat{r}$, which the cross product captures. Points straight ahead of or behind a current piece ($\theta = 0$ or $180^\circ$) get no field from it at all.
Worked examples
Worked example: One small piece
A $1.0\ \text{mm}$ piece of wire carries $10\ \text{A}$. Find its field at a point $5.0\ \text{cm}$ away, along a line at $30^\circ$ to the current.
- $dB = (10^{-7})\dfrac{(10)(1.0 \times 10^{-3})\sin 30^\circ}{(0.050)^2} = 2.00 \times 10^{-7}\ \text{T}$, about $200\ \text{nT}$.
Answer: $dB \approx 200\ \text{nT}$
Worked example: A straight segment
A straight segment $10\ \text{cm}$ long carries $10\ \text{A}$. Find the field $5.0\ \text{cm}$ from its midpoint on the perpendicular bisector. Then let the wire become infinitely long.
- A piece at $x$ is $r = \sqrt{x^2 + d^2}$ away, with $\sin\theta = d/r$, and every piece's field points the same way (around the wire), so the sizes add: $$B = \frac{\mu_0 I}{4\pi}\int_{-a}^{a}\frac{d\,dx}{(x^2 + d^2)^{3/2}} = \frac{\mu_0 I}{2\pi d}\cdot\frac{a}{\sqrt{a^2 + d^2}}$$
- With $a = d = 0.050\ \text{m}$: $B = \dfrac{(4\pi \times 10^{-7})(10)}{2\pi(0.050)}\cdot\dfrac{1}{\sqrt{2}} = 2.83 \times 10^{-5}\ \text{T}$.
- For an endless wire, $a \to \infty$ and the last fraction becomes 1: $B = \dfrac{\mu_0 I}{2\pi d}$, the Physics 2 formula, now derived.
Answer: $B \approx 28.3\ \text{μT}$
Worked example: The center of a square loop
A square loop with $10\ \text{cm}$ sides carries $10\ \text{A}$. Find the field at its center.
- Each side is a segment with $a = d = s/2$, so each gives $\dfrac{\mu_0 I}{2\pi(s/2)}\cdot\dfrac{1}{\sqrt{2}}$, and all four point the same way at the center.
- $B = 4\cdot\dfrac{\mu_0 I}{\pi s\sqrt{2}} = \dfrac{2\sqrt{2}\,\mu_0 I}{\pi s} = 1.13 \times 10^{-4}\ \text{T}$.
Answer: $B \approx 113\ \text{μT}$
Common mistake
Dropping the $\sin\theta$. Without it, every piece of a straight wire, even pieces lined up with the point, would contribute fully, and the field at a point on the wire's own line would come out large instead of zero. The cross product says a current makes no field straight ahead of itself. Check: for a point on the extension of a straight segment, every $\theta$ is $0^\circ$ or $180^\circ$, and $B$ must be $0$.