---
title: Stokes's theorem, Ampère's law and Faraday's law
heading: Fields that circulate
eyebrow: A9 · Lesson 42 · Ampère and Faraday
xp: 50
---

::: hook
The magnetic field around a wire circles it; walk once around the wire and the field has pushed you the whole way. How strong is it 1 cm from a 10 A cable? And when a magnetic field through a loop changes, an electric field circulates around the loop and drives a current, which is how every transformer and generator works. Both are circulation laws, and **Stokes's theorem** connects them to their differential forms, two of Maxwell's equations.
:::

::: play
- A round wire of radius $R$ carries current $I$, spread evenly across it. The curve is the magnetic field strength against distance from the axis.
- Inside, the field grows in a straight line; outside it falls as $1/r$. Where is it strongest?
- Doubling the current doubles the field everywhere. What does changing $R$ do outside the wire?
:::
:::

```sim plot
view: graph
x: r = 0..10 mm
y: B = 0..2.5 mT
slider: I = 1..20 step 1 = 10 A
slider: R = 0.5..3 step 0.1 = 1 mm
plot: 0.2*I*(r/R^2*(1 - step(r - R)) + step(r - R)/r) | label: field strength | samples: 1000
marker: x = R | label: surface
readout: field at the surface, mT = 0.2*I/R | digits: 4
```

::: predict
## A long wire carries 10 A. How strong is the magnetic field 1 cm away?

- [x] 0.2 mT
- [ ] 2 mT
- [ ] 20 µT
- [ ] 10 mT

::: reveal
0.2 mT. Ampère's law around a circle of radius $r$ gives $B \times 2\pi r = \mu_0I$, so $B = \frac{\mu_0I}{2\pi r} = \frac{2 \times 10^{-7} \times 10}{0.01} = 2 \times 10^{-4}$ T. That's about four times the Earth's field, enough to swing a compass held near a car battery cable.
:::
:::

::: nameit
## Stokes's theorem

For a surface $S$ bounded by a closed curve $C$ (with the right-hand rule relating their orientations):

$$\oint_C\mathbf{F}\cdot d\mathbf{l} = \iint_S(\nabla \times \mathbf{F})\cdot d\mathbf{A}$$

Circulation around the edge equals the total curl through the surface: Green's theorem, bent into 3D.

## Ampère's law

Maxwell's equation $\nabla \times \mathbf{B} = \mu_0\mathbf{J}$ (for steady currents), through Stokes's theorem, becomes

$$\oint_C\mathbf{B}\cdot d\mathbf{l} = \mu_0I_\text{enc}$$

With $\mu_0 = 4\pi \times 10^{-7}$ T·m/A:

| Current | Loop | Field |
|---|---|---|
| long wire | circle of radius $r$ | $B = \frac{\mu_0I}{2\pi r}$ outside |
| inside a uniform wire of radius $R$ | circle, $r < R$ | $B = \frac{\mu_0Ir}{2\pi R^2}$ |
| solenoid, $n$ turns per meter | rectangle through it | $B = \mu_0nI$ inside |

## Faraday's law

Maxwell's equation $\nabla \times \mathbf{E} = -\frac{\partial\mathbf{B}}{\partial t}$ becomes

$$\oint_C\mathbf{E}\cdot d\mathbf{l} = -\frac{d\Phi_B}{dt}, \qquad \Phi_B = \iint_S\mathbf{B}\cdot d\mathbf{A}$$

The circulating electric field is the induced EMF. It's why the electric field stops being conservative when magnetic fields change (lesson 25), and why a coil of $N$ turns produces $-N\frac{d\Phi}{dt}$.
:::

::: example
## How strong is the field 1 cm from a 10 A wire, and at the surface of the wire if its radius is 1 mm?

::: solution
1. **At 1 cm.**
   $$\begin{aligned} B &= \frac{\mu_0I}{2\pi r} \\ &= \frac{2 \times 10^{-7} \times 10}{0.01} \\ &= 0.2\ \text{mT} \end{aligned}$$
2. **At the surface.**
   $$\begin{aligned} B &= \frac{2 \times 10^{-7} \times 10}{0.001} \\ &= 2\ \text{mT} \end{aligned}$$
   the largest anywhere, since inside the field drops back toward zero at the axis.

**Answer:** 0.2 mT at 1 cm and 2 mT at the surface.
:::
:::

::: example
## A loop of area 0.01 m² sits in a field rising at 0.5 T/s. What EMF appears around it?

::: solution
1. **Rate of change of flux.**
   $$\begin{aligned} \frac{d\Phi}{dt} &= A\frac{dB}{dt} \\ &= 0.01 \times 0.5 \\ &= 5\ \text{mV} \end{aligned}$$
2. **With more turns.** With 100 turns it would be 0.5 V: a transformer's secondary works this way.

**Answer:** an EMF of 5 mV.
:::
:::

::: example
## A long solenoid has 1000 turns per meter and carries 2 A. What is the field inside?

::: solution
1. **Choose a loop.** Apply Ampère's law around a rectangle with one long side of length $\ell$ inside, along the axis, and the other outside where the field is negligible.
2. **Enclosed current.** It's $n\ell I$, so
   $$B\ell = \mu_0n\ell I$$
3. **Solve for the field.**
   $$\begin{aligned} B &= \mu_0nI \\ &= 4\pi \times 10^{-7} \times 1000 \times 2 \\ &= 2.51\ \text{mT} \end{aligned}$$
4. **Note what's missing.** The rectangle's width doesn't matter, so the field is uniform across the inside.

**Answer:** 2.51 mT, uniform across the inside.
:::
:::

::: check
given: I = 5 | 20; r = 0.005 | 0.02
answer: 2e-7*I/r*1000
unit: mT
tolerance: 0.5%

## A long wire carries {I} A. How strong is the magnetic field {r} m away?

::: right
Right. $\frac{\mu_0I}{2\pi r}$ = {answer}.
:::

::: misses
- [2e-7*I/r^2*1000] The field around a long wire falls as $1/r$.
- [4*pi*1e-7*I/r*1000] Divide by $2\pi$: $\frac{\mu_0}{2\pi} = 2 \times 10^{-7}$.
- [any] Not yet. $B \times 2\pi r = \mu_0I$.
:::
:::

::: check
given: I = 10 | 30; R = 1 | 2; f = 0.25 | 0.5
answer: 0.2*I*f/R
unit: mT
tolerance: 0.5%

## A wire of radius {R} mm carries {I} A spread evenly. How strong is the field at {f} of the way out from the axis?

::: right
Right. Only the enclosed current counts: $\frac{\mu_0Ir}{2\pi R^2}$ = {answer}.
:::

::: misses
- [0.2*I/(f*R)] Inside, the enclosed current is only $I(r/R)^2$.
- [any] Not yet. Ampère's law with $I_\text{enc} = I r^2/R^2$.
:::
:::

::: check
given: n = 1000 | 5000; I = 0.5 | 2
answer: 4*pi*1e-7*n*I*1000
unit: mT
tolerance: 0.5%

## A long solenoid has {n} turns per meter carrying {I} A. How strong is the field inside?

::: right
Right. $\mu_0nI$ = {answer}.
:::

::: misses
- [2e-7*n*I*1000] A solenoid's field is $\mu_0nI$, without the $2\pi$.
- [any] Not yet. A rectangular loop half inside the solenoid.
:::
:::

::: check
given: A = 0.01 | 0.05; dB = 0.2 | 2; N = 10 | 50
answer: N*A*dB
unit: V
tolerance: 0.5%

## A coil of {N} turns and area {A} m² sits in a field changing at {dB} T/s. What EMF appears?

::: right
Right. $NA\frac{dB}{dt}$ = {answer}.
:::

::: misses
- [A*dB] Each of the {N} turns adds the same EMF.
- [any] Not yet. $N\frac{d\Phi}{dt}$.
:::
:::

::: check
given: B = 0.1 | 0.5; L = 0.2 | 0.5; v = 2 | 10
answer: B*L*v
unit: V
tolerance: 0.5%

## A bar {L} m long slides at {v} m/s along rails, completing a loop in a {B} T field. What EMF is induced?

::: right
Right. The area grows at $Lv$, so $\frac{d\Phi}{dt} = BLv$ = {answer}.
:::

::: misses
- [B*L/v] The flux grows faster when the bar moves faster.
- [any] Not yet. $\frac{d\Phi}{dt} = B\frac{dA}{dt}$.
:::
:::

::: check
given: I1 = 5 | 12; I2 = 2 | 3
answer: 4*pi*1e-7*(I1 - I2)*1e6
unit: µT·m
tolerance: 0.5%

## A loop encloses two wires: one carries {I1} A up through it, the other {I2} A down. What is $\oint\mathbf{B}\cdot d\mathbf{l}$ around the loop?

::: right
Right. $\mu_0(I_1 - I_2)$ = {answer}: currents in opposite directions subtract.
:::

::: misses
- [4*pi*1e-7*(I1 + I2)*1e6] The second current flows the other way.
- [any] Not yet. $\mu_0I_\text{enc}$ with signs.
:::
:::

::: check
kind: parts
given: n = 500 | 2000; I = 0.5 | 3

## A long solenoid has {n} turns per meter and carries {I} A.

::: part
answer: 4*pi*1e-7*n*I*1000
unit: mT
tolerance: 0.5%

### What is the field inside?

::: misses
- [any] $B = \mu_0nI$.
:::
:::

::: part
answer: 4*pi*1e-7*n*I*1000*0.0001
unit: mWb
tolerance: 0.5%

### What flux passes through a 1 cm² cross-section?

::: misses
- [any] $\Phi = BA$.
:::
:::
:::

::: check
kind: derivation
vars: N = 10..1000, A = 0.0001..0.01, dB = 0.01..10

## A coil of $N$ turns and area $A$ sits in a field changing at $dB$ T/s.

::: step
answer: A*dB

### What is $\frac{d\Phi}{dt}$ through one turn?
:::

::: step
answer: N*A*dB

### What EMF appears across the coil?
:::

::: right
Right. Faraday's law: $|\mathcal{E}| = N\frac{d\Phi}{dt}$.
:::
:::

::: explain
## Why does a changing magnetic field make the electric field non-conservative?

::: model
Faraday's law says $\oint\mathbf{E}\cdot d\mathbf{l} = -\frac{d\Phi_B}{dt}$. When the magnetic flux through a loop is changing, the electric field's circulation around that loop isn't zero, so the work done carrying a charge around the loop isn't zero either. A conservative field must give zero around every loop, so this one isn't, and there's no single-valued potential. That nonzero circulation is the induced EMF: it's what drives current around a transformer's secondary, and why KVL needs an extra term when a loop is threaded by changing flux.
:::
:::

::: practice

::: check
given: I = 1 | 2 | 5 | 10 | 20 | 50 | 100
answer: 2e-7*I/1*1e6
unit: µT
tolerance: 0.5%

## How strong is the magnetic field 1 m from a long wire carrying {I} A?

::: misses
- [any] $\frac{\mu_0I}{2\pi r}$.
:::
:::

::: check
given: I = 10 | 50; R = 1 | 5
answer: 0.2*I/R
unit: mT
tolerance: 0.5%

## What is the strongest field around a wire of radius {R} mm carrying {I} A?

::: misses
- [any] At the surface: $\frac{\mu_0I}{2\pi R}$.
:::
:::

::: check
given: A = 0.002 | 0.02; B = 0.5 | 1.2; T = 0.01 | 0.1
answer: A*B/T
unit: V
tolerance: 0.5%

## A field of {B} T through a loop of area {A} m² is switched off steadily over {T} s. What average EMF appears?

::: misses
- [A*B] Divide by the time: EMF is a rate.
- [any] $\frac{\Delta\Phi}{\Delta t}$.
:::
:::
:::
