---
title: Boundary conditions at a surface
heading: What the integral laws say about fields on either side of a surface, the tangential electric field that carries straight across, the normal displacement that jumps by the surface charge, the matching rules for B and H, field lines bending at a dielectric, and the special case of a perfect conductor
eyebrow: D8 · Lesson 3 · Boundary conditions
xp: 40
---

::: hook
Every interesting electromagnetic problem has an edge: a capacitor's plates, a lens's surface, a circuit board's copper, an antenna's wire. At an edge the material changes abruptly, and the fields must change too, but not arbitrarily. Applying Gauss's law to a flat pillbox straddling the surface, and Faraday's and Ampère's laws to a thin loop straddling it, gives four rules for how each component of the field crosses. With them, solutions found separately in each region can be stitched together into the whole answer.
:::

::: play
- An electric field crossing from air (above) into a dielectric of relative permittivity $\varepsilon_r$ (below), arriving at angle $\theta_1$ from the normal, with no free charge on the surface.
- The component along the surface carries straight across; the component through the surface is divided by $\varepsilon_r$, so the field bends away from the normal and weakens.
- The readouts give the angle and strength in the dielectric.
:::

```sim plot
view: complex
range: 1
axes: along the surface, across it
slider: t = 0..85 step 1 = 45 °
slider: e = 1..10 step 0.1 = 4
arrow: sin(t*pi/180) - j*cos(t*pi/180) | from: -sin(t*pi/180) + j*cos(t*pi/180) | label: E in air
arrow: sin(t*pi/180) - j*cos(t*pi/180)/e | color: ch3 | label: E in the dielectric
readout: angle in the dielectric, ° = atan(e*tan(t*pi/180))*180/pi | digits: 3
readout: field strength in the dielectric, fraction of air's = sqrt(sin(t*pi/180)^2 + (cos(t*pi/180)/e)^2) | digits: 3
```

::: predict
## A field meets glass ($\varepsilon_r$ = 4) at 45° from the normal. At what angle does it continue inside?

- [ ] 45°
- [ ] 11°
- [x] About 76°
- [ ] 90°

::: reveal
The tangential part carries over unchanged and the normal part is divided by 4, so $\tan\theta_2 = \varepsilon_r\tan\theta_1$ = 4 and θ₂ = 76.0°: the field bends toward the surface. Its strength drops to 0.73 of its value in air. (This is the static field; light at optical frequencies is a wave and bends by Snell's law instead, lesson 7.)
:::
:::

::: nameit
## The four conditions

With $\hat n$ the normal from region 1 into region 2, a free surface charge density $\rho_s$ and a surface current density $\mathbf J_s$ (A/m):

$$\hat n \times (\mathbf E_2 - \mathbf E_1) = 0 \qquad \text{tangential E continuous}$$

$$\hat n\cdot(\mathbf D_2 - \mathbf D_1) = \rho_s \qquad \text{normal D jumps by the surface charge}$$

$$\hat n\cdot(\mathbf B_2 - \mathbf B_1) = 0 \qquad \text{normal B continuous}$$

$$\hat n \times (\mathbf H_2 - \mathbf H_1) = \mathbf J_s \qquad \text{tangential H jumps by the surface current}$$

The first and third come from Faraday's law and the absence of monopoles; the second and fourth from Gauss's and Ampère's laws.

## Dielectrics

With no free charge, $\varepsilon_1E_{n1} = \varepsilon_2E_{n2}$ and $E_{t1} = E_{t2}$, so a field line bends as

$$\frac{\tan\theta_2}{\tan\theta_1} = \frac{\varepsilon_2}{\varepsilon_1}$$

## A perfect conductor

Inside a perfect conductor there's no field at all. So just outside:

- E is entirely normal, $E_n = \rho_s/\varepsilon_0$: field lines meet conductors at right angles.
- B is entirely tangential, $H_t = J_s$: the surface current carries whatever the tangential field demands.

Good conductors at high frequency behave almost this way, with the current confined to a skin depth (lesson 5).
:::

::: example
## A conductor's surface has a field of 1 MV/m just outside. What's its surface charge? A conductor carries a tangential field of 1 mT at its surface: what surface current flows?

::: solution
1. **Surface charge.**
   $$\begin{aligned} \rho_s &= \varepsilon_0 E \\ &= 8.854 \times 10^{-12} \times 10^6 \\ &= 8.85\ \mu\text{C/m}^2 \end{aligned}$$
2. **Surface current.**
   $$\begin{aligned} J_s &= H_t \\ &= \frac{B}{\mu_0} \\ &= \frac{10^{-3}}{4\pi \times 10^{-7}} \\ &= 796\ \text{A/m} \end{aligned}$$
   That's 796 A per meter of width.

**Answer:** the surface charge is 8.85 µC/m², and the surface current is 796 A/m.
:::
:::

::: example
## A parallel-plate capacitor is half filled with a slab of $\varepsilon_r$ = 4 parallel to its plates. How do the fields in the air and the slab compare?

::: solution
1. **D is continuous.** The field is normal to the slab's faces, so D is continuous:
   $$E_\text{slab} = \frac{E_\text{air}}{4}$$
2. **Split the voltage.** Each half is d/2 thick, so
   $$\begin{aligned} V_\text{air} &= \frac{E_\text{air}\,d}{2} \\ V_\text{slab} &= \frac{E_\text{air}\,d}{8} \end{aligned}$$
   Four fifths of the voltage then sits across the air half.
3. **Why it matters.** That's why air gaps in insulation are where breakdown starts.

**Answer:** the field in the air is four times the field in the slab, so the air half carries four fifths of the voltage.
:::
:::

::: example
## A field line in air meets a dielectric of $\varepsilon_r$ = 4 at 45° from the normal. At what angle does it continue?

::: solution
1. **Apply the boundary conditions.** Tangential E and normal D are continuous, so
   $$\frac{\tan\theta_2}{\tan\theta_1} = \frac{\varepsilon_2}{\varepsilon_1}$$
2. **Solve for the angle.**
   $$\begin{aligned} \tan\theta_2 &= 4\tan 45^\circ \\ &= 4 \\ \theta_2 &= 76.0^\circ \end{aligned}$$
3. **What it means.** Field lines bend away from the normal entering a higher-permittivity material, and the field inside is weaker.

**Answer:** it continues at 76.0° from the normal.
:::
:::

::: check
given: t = 20 | 45 | 60; e = 2 | 4 | 10
answer: atan(e*tan(t*pi/180))*180/pi
unit: °
tolerance: 0.5%

## A static field crosses from air into a dielectric of $\varepsilon_r$ = {e}, arriving {t}° from the normal. At what angle does it continue?

::: right
Right. $\tan^{-1}(\varepsilon_r\tan\theta_1)$ = {answer}°.
:::

::: misses
- [atan(tan(t*pi/180)/e)*180/pi] Upside down: the normal part shrinks, so the field bends away from the normal.
- [any] Not yet. Tangential E continuous, normal D continuous.
:::
:::

::: check
given: E = 10 | 100 | 1000; e = 2.2 | 4 | 80
answer: E/e
unit: kV/m
tolerance: 0.5%

## A field of {E} kV/m in air meets a dielectric of $\varepsilon_r$ = {e} head-on, with no surface charge. How strong is the field inside?

::: right
Right. $E/\varepsilon_r$ = {answer} kV/m.
:::

::: misses
- [E*e] D is continuous, so E falls inside the dielectric.
- [any] Not yet. Normal D continuous.
:::
:::

::: check
given: E = 0.1 | 1 | 3
answer: 8.8541878128e-12*E*1e6*1e6
unit: µC/m²
tolerance: 0.5%

## The field just outside a conductor is {E} MV/m. What's the surface charge density?

::: right
Right. $\varepsilon_0E$ = {answer} µC/m².
:::

::: misses
- [any] Not yet. Gauss's law on a pillbox at the surface.
:::
:::

::: check
given: B = 0.1 | 1 | 10
answer: B*1e-3/(4*pi*1e-7)
unit: A/m
tolerance: 0.5%

## The magnetic field just outside a perfect conductor is {B} mT, tangential. What surface current flows?

::: right
Right. $B/\mu_0$ = {answer} A/m.
:::

::: misses
- [any] Not yet. $J_s = H_t$.
:::
:::

::: check
kind: parts
given: e = 2 | 4 | 10; t = 20 | 45 | 60

## A field line in air meets a dielectric of $\varepsilon_r$ = {e} at {t}° from the normal.

::: part
answer: asin(e*sin(t*pi/180)/cos(t*pi/180)/sqrt(1 + (e*sin(t*pi/180)/cos(t*pi/180))^2))*180/pi
unit: °
tolerance: 0.5%

### At what angle from the normal does it continue?

::: misses
- [any] $\tan\theta_2 = \varepsilon_r\tan\theta_1$.
:::
:::

::: part
answer: sqrt(sin(t*pi/180)^2 + (cos(t*pi/180)/e)^2)
tolerance: 0.5%

### How strong is the field inside, as a fraction of outside?

::: misses
- [any] Tangential part unchanged, normal part ÷ $\varepsilon_r$.
:::
:::
:::

::: check
kind: parts
given: E = 0.1 | 1 | 3; e = 1 | 4

## A conductor's surface has a normal field of {E} MV/m just outside, in a medium of $\varepsilon_r$ = {e}.

::: part
answer: e*8.854e-12*E*1e6*1e6
unit: µC/m²
tolerance: 0.5%

### What surface charge sits there?

::: misses
- [any] $\varepsilon E$.
:::
:::

::: part
answer: 0
unit: V/m
tolerance: 0

### What tangential field is there?

::: misses
- [any] A perfect conductor allows none.
:::
:::
:::

::: check
kind: parts
given: H = 100 | 1000; w = 1 | 10

## A conductor carries a tangential magnetic field H = {H} A/m at its surface.

::: part
answer: H
unit: A/m
tolerance: 0.5%

### What surface current density flows?

::: misses
- [any] $K = H_t$.
:::
:::

::: part
answer: H*w/1000
unit: A
tolerance: 0.5%

### How much current is that across {w} mm of width?

::: misses
- [any] K × width.
:::
:::
:::

::: explain
## Why must the electric field meet a perfect conductor at right angles?

::: model
Inside a perfect conductor the field is zero, because any field would immediately drive charges to cancel it. Faraday's law applied to a thin loop straddling the surface says the tangential part of the electric field is the same on both sides, so just outside it must be zero too. Only the normal part can survive, and it's allowed to jump from zero inside to a finite value outside, the jump being set by the surface charge that terminates the field lines. A field with no tangential part is perpendicular to the surface, which is why field lines always meet conductors squarely and why a conductor's surface is an equipotential.
:::
:::

::: practice

::: check
given: t = 5 | 80; e = 1.5 | 12
answer: atan(e*tan(t*pi/180))*180/pi
unit: °
tolerance: 0.5%

## Bent angle: θ₁ = {t}°, $\varepsilon_r$ = {e}?

::: misses
- [any] $\tan^{-1}(\varepsilon_r\tan\theta_1)$.
:::
:::

::: check
given: B = 0.01 | 0.1 | 1 | 5 | 10 | 100
answer: B*1e-3/(4*pi*1e-7)
unit: A/m
tolerance: 0.5%

## Surface current for {B} mT?

::: misses
- [any] $B/\mu_0$.
:::
:::
:::
