โ† Part II: Magnetostatics
Chapter 5

Biot-Savart Law & Ampere's Law

Magnetic forces, the Biot-Savart law, Ampere's law, and the divergence and curl of B.

5.1 Magnetic Force & Lorentz Force

A charge $q$ moving with velocity $\mathbf{v}$ in a magnetic field $\mathbf{B}$experiences the magnetic Lorentz force:

$$\mathbf{F} = q(\mathbf{E} + \mathbf{v} \times \mathbf{B})$$

The magnetic force $q\mathbf{v} \times \mathbf{B}$ is always perpendicular to $\mathbf{v}$, so it does no work. The force per unit length between two parallel wires carrying currents$I_1$ and $I_2$ separated by distance $d$ is:

$$\frac{F}{\ell} = \frac{\mu_0}{2\pi}\frac{I_1 I_2}{d}$$

5.2 The Biot-Savart Law

The magnetic field produced by a steady current $I$ in a wire element $d\boldsymbol{\ell}'$ at position $\mathbf{r}'$ is given by the Biot-Savart law:

$$\boxed{d\mathbf{B} = \frac{\mu_0}{4\pi} \frac{I\,d\boldsymbol{\ell}' \times \hat{\mathscr{r}}}{\mathscr{r}^2}}$$

$\boldsymbol{\mathscr{r}} = \mathbf{r} - \mathbf{r}'$, $\mu_0 = 4\pi \times 10^{-7}\,\text{T}\cdot\text{m/A}$

For a general current distribution:

$$\mathbf{B}(\mathbf{r}) = \frac{\mu_0}{4\pi}\int \frac{\mathbf{J}(\mathbf{r}') \times \hat{\mathscr{r}}}{\mathscr{r}^2}\,d\tau'$$

5.2.1 Magnetic Field on Axis of a Circular Loop

For a circular loop of radius $R$ carrying current $I$, at a point on the axis distance $z$ from the center:

By symmetry, only the axial component $B_z$ survives. Each element $Rd\phi$contributes $dB_z = (\mu_0 I R\,d\phi)/(4\pi\mathscr{r}^2) \cdot R/\mathscr{r}$ where$\mathscr{r} = \sqrt{R^2 + z^2}$. Integrating over $2\pi$:

$$\boxed{B_z = \frac{\mu_0 I R^2}{2(R^2 + z^2)^{3/2}}}$$

At center ($z=0$): $B = \mu_0 I / (2R)$

5.3 Ampere's Law

Analogous to Gauss's law, Ampere's law exploits symmetry to find $\mathbf{B}$ without integrating the Biot-Savart law:

$$\boxed{\oint_C \mathbf{B} \cdot d\boldsymbol{\ell} = \mu_0 I_{\rm enc}} \qquad \Longleftrightarrow \qquad \nabla \times \mathbf{B} = \mu_0 \mathbf{J}$$

Infinite solenoid (n turns/m)

$$B = \mu_0 n I \quad \text{(inside)}, \quad B = 0 \quad \text{(outside)}$$

Infinite wire (radius $s$)

$$\mathbf{B} = \frac{\mu_0 I}{2\pi s}\,\hat{\phi} \quad (s > R)$$

5.3.1 Divergence and Curl of B

$$\nabla \cdot \mathbf{B} = 0 \qquad \text{(no magnetic monopoles)}$$$$\nabla \times \mathbf{B} = \mu_0 \mathbf{J} \qquad \text{(Ampere's law, static case)}$$

$\nabla \cdot \mathbf{B} = 0$ is the second of Maxwell's four equations. It states there are no magnetic charges (monopoles).

Simulation: Biot-Savart for a Circular Loop

Computes $\mathbf{B}$ by direct numerical summation of the Biot-Savart law, compares with the analytic on-axis formula, and maps the 2D field in the $xz$-plane.

Biot-Savart: Circular Current Loop

Numerical Biot-Savart integration for a circular loop, compared against the analytic on-axis result.

Click Run to execute the Python code

First run will download Python environment (~15MB)