---
title: Maxwell's four equations, one at a time
heading: Everything in electromagnetism, in four lines
eyebrow: B7 · Lesson 1 · Maxwell's equations
xp: 50
---

::: hook
Every course in this track has met a piece of the same story: charges make electric fields, nothing makes magnetic fields end, currents make magnetic fields circle, and changing magnetic fields make electric fields circle. James Clerk Maxwell wrote the pieces as four equations in the 1860s, noticed one was incomplete, fixed it, and found that the corrected set predicted waves traveling at the speed of light. Light, radio and every wireless link come out of these four lines.

::: play
- Each setting shows the field pattern one equation describes. Step through them with the slider.
- 1: a positive charge. 2: a magnetic field (here a loop's), whose lines never end. 3: the electric field circling a changing magnetic field. 4: the magnetic field circling a current.
- For each one, say in words what's a source of what.
:::
:::

```sim plot
view: flow
x: x = -2..2
y: y = -2..2
slider: m = 1..4 step 1 = 1
dx: step(1.5 - m)*x/(x^2 + y^2)^1.5 + step(m - 1.5)*step(2.5 - m)*(-(y - 0.5)/(x^2 + (y - 0.5)^2) + (y + 0.5)/(x^2 + (y + 0.5)^2)) + step(m - 2.5)*step(3.5 - m)*(y/(x^2 + y^2)) + step(m - 3.5)*(-y/(x^2 + y^2))
dy: step(1.5 - m)*y/(x^2 + y^2)^1.5 + step(m - 1.5)*step(2.5 - m)*(x/(x^2 + (y - 0.5)^2) - x/(x^2 + (y + 0.5)^2)) + step(m - 2.5)*step(3.5 - m)*(-x/(x^2 + y^2)) + step(m - 3.5)*(x/(x^2 + y^2))
heads: on
grid: 16
readout: equation = m
```

::: predict
## Which of these is NOT something Maxwell's equations allow?

- [ ] Electric field lines that start on positive charges
- [ ] Magnetic fields that circle around currents
- [x] Magnetic field lines that start on a magnetic charge
- [ ] Electric fields that circle around a changing magnetic field

::: reveal
Magnetic field lines starting on a magnetic charge. The second equation, $\nabla \cdot \mathbf B = 0$, says there are none: magnetic field lines always close. Every other picture is one of the equations at work. Physicists have searched for magnetic monopoles for a century and never found one.
:::
:::

::: nameit
## The four equations

In integral form (around a region or its boundary) and differential form (at a point), linked by A9.37's theorems:

| | Integral form | At a point | In words |
|---|---|---|---|
| 1. Gauss | $\oint\mathbf E \cdot d\mathbf A = \dfrac{Q_\text{in}}{\varepsilon_0}$ | $\nabla \cdot \mathbf E = \dfrac{\rho}{\varepsilon_0}$ | charge is the source of electric field |
| 2. no monopoles | $\oint\mathbf B \cdot d\mathbf A = 0$ | $\nabla \cdot \mathbf B = 0$ | magnetic field lines never end |
| 3. Faraday | $\oint\mathbf E \cdot d\mathbf l = -\dfrac{d\Phi_B}{dt}$ | $\nabla \times \mathbf E = -\dfrac{\partial\mathbf B}{\partial t}$ | changing B makes E circle |
| 4. Ampère–Maxwell | $\oint\mathbf B \cdot d\mathbf l = \mu_0I + \mu_0\varepsilon_0\dfrac{d\Phi_E}{dt}$ | $\nabla \times \mathbf B = \mu_0\mathbf J + \mu_0\varepsilon_0\dfrac{\partial\mathbf E}{\partial t}$ | current and changing E make B circle |

Add the force law $\mathbf F = q(\mathbf E + \mathbf v \times \mathbf B)$ and conservation of charge, and you have all of classical electromagnetism.

**Maxwell's correction.** Ampère's original law had only the current term. Maxwell noticed it fails for a charging capacitor: a loop around the wire encloses current, but a surface through the gap doesn't, though both have the same boundary. He added the **displacement current** term, $\varepsilon_0\,d\Phi_E/dt$, which is exactly the current's value in the gap (lesson 2).

**The symmetry it creates.** With his term, a changing E makes B (equation 4) and a changing B makes E (equation 3). In empty space, with no charges or currents, each can keep regenerating the other, and the pair travels as a wave. Lesson 4 shows how; lesson 5 shows its speed comes out as $1/\sqrt{\mu_0\varepsilon_0}$, which Maxwell recognized as the measured speed of light.
:::

::: example
## A closed box holds 2 nC of charge and the north end of a bar magnet poking in through one side. What are the electric and magnetic fluxes out of the box?

::: solution
1. **Electric flux.** Gauss's law gives the charge inside over $\varepsilon_0$:
   $$\begin{aligned} \Phi_E &= \frac{Q}{\varepsilon_0} \\ &= \frac{2 \times 10^{-9}}{8.85 \times 10^{-12}} \\ &= 226\ \text{V·m} \end{aligned}$$
2. **Magnetic flux.** It is zero, whatever the magnet does, since its field lines enter and leave the box in equal measure.

**Answer:** the electric flux out of the box is 226 V·m, and the magnetic flux is zero.
:::
:::

::: example
## A wire carries 5 A. What is the circulation of $\mathbf B$ around a loop enclosing it, and around a loop through the gap of a capacitor it's charging?

::: solution
1. **Around the wire.**
   $$\begin{aligned} \oint \mathbf B \cdot d\mathbf l &= \mu_0I \\ &= 4\pi \times 10^{-7} \times 5 \\ &= 6.3\ \mu\text{T·m} \end{aligned}$$
2. **Around the capacitor gap.** No charge crosses the gap, but the displacement current $\varepsilon_0\frac{d\Phi_E}{dt}$ is exactly 5 A.
3. **The same circulation.** So the circulation around the gap is the same 6.3 µT·m.

**Answer:** the circulation is 6.3 µT·m around both loops.
:::
:::

::: check
kind: match

## Match each equation with what it says.

- Gauss's law :: charge is the source of electric field
- no magnetic monopoles :: magnetic field lines always close
- Faraday's law :: a changing magnetic field makes the electric field circle
- Ampère–Maxwell law :: currents and changing electric fields make the magnetic field circle

::: right
Right. Those four, plus the force law, are all of classical electromagnetism.
:::
:::

::: check
given: Q = 1..9 int; q2 = -5..-1 int
answer: (Q + q2)*1e-9/8.854e-12
unit: V*m
tolerance: 1%

## A closed surface contains {Q} nC and {q2} nC. What is the electric flux out of it?

::: right
Right. Gauss's law: $Q_\text{in}/\varepsilon_0$ = {answer}.
:::

::: misses
- [(Q - q2)*1e-9/8.854e-12] Add the charges with their signs.
- [any] Not yet. $\Phi_E = Q_\text{in}/\varepsilon_0$.
:::
:::

::: check
given: B = 0.1 | 0.5 | 1; A = 10 | 50 | 100
answer: 0
unit: Wb
tolerance: 0.000001

## A closed box sits in a magnetic field of {B} T. Its surface area is {A} cm². What is the total magnetic flux out of it?

::: right
Right. Zero, always: equation 2.
:::

::: misses
- [B*A*1e-4] What enters through one face leaves through another.
- [any] Not yet. Magnetic field lines never begin or end.
:::
:::

::: check
given: I = 1..10 int
answer: 4*pi*1e-7*I
unit: T*m
tolerance: 0.5%

## A steady current of {I} A passes through a loop, with no changing electric field. What is $\oint\mathbf B \cdot d\mathbf l$ around the loop?

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

::: misses
- [I] Multiply by $\mu_0$.
- [any] Not yet. Ampère: $\oint\mathbf B \cdot d\mathbf l = \mu_0I$.
:::
:::

::: check
kind: choice

## What did Maxwell add to the equations that made electromagnetic waves possible?

- [ ] Gauss's law for magnetism
- [x] The displacement current: a changing electric field makes a magnetic field
- [ ] The Lorentz force
- [ ] Coulomb's constant

::: right
Right. With it, changing E and changing B each produce the other, and the pair can travel through empty space.
:::

::: misses
- [1] That was already known: no monopoles.
- [3] The force law was separate and already understood.
- [4] Coulomb's constant had been measured long before.
:::
:::

::: check
kind: parts
given: s = 1 | 10 | 100; Q = 1 | 10

## A large flat sheet carries {s} nC/m² of charge, and a closed box elsewhere contains {Q} nC.

::: part
answer: s*1e-9/(2*8.854e-12)
unit: V/m
tolerance: 0.5%

### Gauss's law: what field does the sheet make on each side?

::: misses
- [s*1e-9/8.854e-12] The flux leaves through both faces of the pillbox: divide by $2\varepsilon_0$.
- [any] Not yet. $E = \sigma/(2\varepsilon_0)$.
:::
:::

::: part
answer: Q*1e-9/8.854e-12
unit: V·m
tolerance: 0.5%

### What is the total electric flux out of the box?

::: misses
- [Q*1e-9*8.854e-12] Divide by $\varepsilon_0$.
- [any] Not yet. $\Phi = Q/\varepsilon_0$.
:::
:::

::: right
Right. Gauss's law ties flux to enclosed charge, and symmetry turns it into a field.
:::
:::

::: explain
## How do Faraday's law and the Ampère–Maxwell law together allow a wave to travel through empty space?

::: model
Faraday's law says a changing magnetic field makes a circulating electric field. Maxwell's addition to Ampère's law says a changing electric field makes a circulating magnetic field. In empty space, with no charges or currents, a disturbance in one field produces the other, which produces the first again a little farther on. The two keep regenerating each other as they move, and that self-sustaining pattern is an electromagnetic wave.
:::
:::

::: practice

::: check
kind: choice

## Which equation explains how a transformer works?

- [ ] Gauss's law
- [ ] No monopoles
- [x] Faraday's law
- [ ] Ampère's law alone

::: right
Right. The primary's changing flux induces an EMF in the secondary.
:::

::: misses
- [1] Gauss's law is about charges and electric flux.
- [2] That one says magnetic lines close; it doesn't make voltages.
- [4] Ampère explains the primary's field, but the induced voltage is Faraday's law.
:::
:::

::: check
given: Q = 1..9 int
answer: Q*1e-9/8.854e-12
unit: V*m
tolerance: 1%

## What electric flux leaves a closed surface around {Q} nC?

::: misses
- [any] $Q/\varepsilon_0$.
:::
:::

::: check
kind: choice

## A region has $\nabla \cdot \mathbf E > 0$. What's there?

- [x] Positive charge
- [ ] Negative charge
- [ ] A current
- [ ] A changing magnetic field

::: right
Right. Positive divergence means a source: positive charge density.
:::

::: misses
- [2] Negative charge gives negative divergence.
- [3] Currents affect the curl of B, not the divergence of E.
- [4] That affects the curl of E.
:::
:::
:::
