Boundary conditions, reflection, and refraction

Point a laser at a glass tabletop and two things happen at once: a faint ghost beam bounces back toward you, and the main beam bends as it dives into the glass. Nothing about this is arbitrary. Maxwell's equations, applied right at the interface between the two media, impose four continuity requirements on the electric and magnetic fields — and those requirements alone force a reflected wave and a transmitted (refracted) wave into existence, and fix exactly how much the transmitted ray bends. Snell's law, which you have used since school as a memorized rule, turns out to be a direct consequence of matching wave phases across the boundary. This article builds that connection: the four boundary conditions, why a single incident wave cannot satisfy them alone, and how phase matching along the interface produces the law of reflection and Snell's law from first principles.

The core insight

The four EM boundary conditions — continuous tangential EE and HH, continuous normal DD and BB — force part of an incident wave to reflect and part to refract, with phase matching along the interface giving Snell's law as a direct consequence rather than an independent postulate.

The core idea

Four conditions at every interface. Consider a boundary separating medium 1 and medium 2, with unit normal n^\hat n pointing from 1 into 2. Applying Maxwell's equations to infinitesimally thin loops and pillboxes straddling the surface gives four requirements that must hold at every point of the boundary, at every instant:

  • Tangential E⃗\vec E is continuous, E1,tan=E2,tanE_{1,\text{tan}} = E_{2,\text{tan}}, from Faraday's law on a thin loop (the flux term vanishes as the loop shrinks, leaving only the tangential-field difference).
  • Tangential H⃗\vec H is continuous, H1,tan=H2,tanH_{1,\text{tan}} = H_{2,\text{tan}}, from the Ampère-Maxwell law by the same thin-loop argument (no free surface current).
  • Normal D⃗\vec D is continuous, D1,n=D2,nD_{1,\text n} = D_{2,\text n}, from Gauss's law on a thin pillbox (no free surface charge).
  • Normal B⃗\vec B is continuous, B1,n=B2,nB_{1,\text n} = B_{2,\text n}, from ∇⋅B⃗=0\nabla\cdot\vec B = 0 on the same pillbox.

Why reflection and refraction must exist. A single incident wave generally cannot, by itself, satisfy all four conditions simultaneously on both sides of the interface — its fields on side 1 simply do not match what side 2 needs. The resolution is that a reflected wave (staying in medium 1) and a transmitted wave (entering medium 2) must appear, with amplitudes and directions chosen so incident-plus-reflected fields on side 1 equal the transmitted field on side 2, everywhere on the boundary, at every instant. Reflection and refraction are not phenomena bolted onto electromagnetism — they are what the boundary conditions demand.

Phase matching along the interface. Write the interface as the plane z=0z = 0 and each of the three waves — incident, reflected, transmitted — as cos⁡(k⃗⋅r⃗−ωt)\cos(\vec k\cdot\vec r - \omega t). For the boundary condition to hold at every point (x,y)(x,y) on the interface and every time tt, the phase factors of all three waves must agree there. This forces two things: all three waves share the same frequency ω\omega, and their wavevector components tangential to the interface are equal,

ki,∥=kr,∥=kt,∥.k_{i,\parallel} = k_{r,\parallel} = k_{t,\parallel}.

where: ki,∥k_{i,\parallel}, kr,∥k_{r,\parallel}, kt,∥k_{t,\parallel} are the components of the incident, reflected, and transmitted wavevectors lying in the interface plane. Combined with ∣k⃗∣=nω/c|\vec k| = n\omega/c in a medium of refractive index nn, this single matching condition yields both the law of reflection, θi=θr\theta_i = \theta_r, and Snell's law of refraction — worked out in the derivation below.

Figure
Incident reflected and refracted rays at a flat interface between two media with the normal drawn and angles marked
Boundary conditions force a reflected and a refracted ray interface z = 0 normal n medium 1, n1 medium 2, n2 incident reflected refracted theta i theta r theta t Tangential wavevector components match, giving theta i = theta r and n1 sin theta i = n2 sin theta t
Derivation ASnell's law from phase matching at the boundary

The goal is to show, using only the requirement that the incident, reflected, and transmitted waves share the same phase along the interface at every point and every instant, that the law of reflection and Snell's law of refraction follow directly, with no separate optical postulate needed beyond the electromagnetic boundary conditions themselves.

Step 1. Set up the geometry. Let the interface be the plane z=0z=0, with medium 1 (n1n_1) occupying z<0z<0 and medium 2 (n2n_2) occupying z>0z>0. The incident wave travels in medium 1 toward the interface at angle θi\theta_i from the normal; it produces a reflected wave back into medium 1 at some angle θr\theta_r, and a transmitted wave into medium 2 at some angle θt\theta_t. All three are plane waves of the form cos⁡(k⃗⋅r⃗−ωt)\cos(\vec k \cdot \vec r - \omega t), and all three must have the same angular frequency ω\omega because the boundary condition must hold at every instant, not just one.

Step 2. Impose phase matching. The tangential EE and HH continuity conditions must hold for every point (x,y)(x,y) on the plane z=0z=0, at every time. That is only possible if the phase of each wave, evaluated at z=0z=0, varies with xx, yy, and tt in exactly the same way for all three waves. Since each wave's phase is k⃗⋅r⃗−ωt\vec k\cdot\vec r - \omega t, this requires the component of each wavevector lying in the interface plane to be identical: ki,∥=kr,∥=kt,∥k_{i,\parallel} = k_{r,\parallel} = k_{t,\parallel}.

Step 3. Extract the law of reflection. The reflected wave stays in medium 1, so ∣k⃗r∣=∣k⃗i∣=n1ω/c|\vec k_r| = |\vec k_i| = n_1\omega/c. Both wavevectors have the same magnitude and the same tangential component, which forces them to make equal angles with the normal on opposite sides of it: θr=θi\theta_r = \theta_i. This is the law of reflection, derived from phase matching alone.

Step 4. Extract Snell's law. For the transmitted wave, ∣k⃗t∣=n2ω/c|\vec k_t| = n_2\omega/c, a different magnitude since it travels in medium 2. Writing the tangential components explicitly, ki,∥=∣k⃗i∣sin⁡θi=(n1ω/c)sin⁡θik_{i,\parallel} = |\vec k_i|\sin\theta_i = (n_1\omega/c)\sin\theta_i, and kt,∥=∣k⃗t∣sin⁡θt=(n2ω/c)sin⁡θtk_{t,\parallel} = |\vec k_t|\sin\theta_t = (n_2\omega/c)\sin\theta_t. Setting these equal and cancelling the common factor ω/c\omega/c gives

n1sin⁡θi=n2sin⁡θt.n_1 \sin\theta_i = n_2 \sin\theta_t.

Step 5. Read the result. Snell's law has appeared without ever assuming it — it is forced purely by requiring the wave phases to line up along the interface at all points and all times, which is itself forced by the tangential-field continuity conditions of Maxwell's equations. Nothing about ray optics or Fermat's principle was needed; the electromagnetic boundary conditions are the deeper reason light bends the way it does.

Worked example

A light ray travelling in air (n1=1.00n_1 = 1.00) strikes the flat surface of a glass slab (n2=1.50n_2 = 1.50) at an angle of incidence θi=40∘\theta_i = 40^\circ from the normal. Find the angle of reflection and the angle of refraction.

Step 1. Angle of reflection. By the law of reflection derived above from phase matching, θr=θi=40∘\theta_r = \theta_i = 40^\circ — no calculation needed beyond recognizing that both wavevectors share the same magnitude and tangential component in medium 1.

Step 2. Set up Snell's law for the refracted ray. n1sin⁡θi=n2sin⁡θt  ⟹  sin⁡θt=n1n2sin⁡θi=1.001.50sin⁡(40∘)n_1\sin\theta_i = n_2\sin\theta_t \implies \sin\theta_t = \dfrac{n_1}{n_2}\sin\theta_i = \dfrac{1.00}{1.50}\sin(40^\circ).

Step 3. Evaluate. sin⁡(40∘)≈0.643\sin(40^\circ) \approx 0.643, so sin⁡θt=0.6431.50≈0.4287\sin\theta_t = \dfrac{0.643}{1.50} \approx 0.4287, giving θt=sin⁡−1(0.4287)≈25.4∘\theta_t = \sin^{-1}(0.4287) \approx 25.4^\circ. The reflected ray leaves at 40∘40^\circ and the refracted ray bends toward the normal, entering the glass at about 25.4∘25.4^\circ — exactly as expected since n2>n1n_2 > n_1 makes light bend toward the normal on entering the denser medium.

Competitive stretch

Now send a wave the other way: from water (n1=1.33n_1 = 1.33) toward air (n2=1.00n_2 = 1.00). Find the critical angle for total internal reflection. At the critical angle θc\theta_c, the refracted ray grazes the interface, so θt=90∘\theta_t = 90^\circ and sin⁡θt=1\sin\theta_t = 1. Snell's law gives n1sin⁡θc=n2sin⁡(90∘)=n2n_1 \sin\theta_c = n_2 \sin(90^\circ) = n_2, so sin⁡θc=n2/n1=1.00/1.33=0.7519\sin\theta_c = n_2/n_1 = 1.00/1.33 = 0.7519, and θc=sin⁡−1(0.7519)≈48.75∘\theta_c = \sin^{-1}(0.7519) \approx 48.75^\circ. Beyond this angle, the tangential-matching condition sin⁡θt=(n1/n2)sin⁡θi\sin\theta_t = (n_1/n_2)\sin\theta_i would require sin⁡θt>1\sin\theta_t > 1, which has no real solution — a propagating transmitted wave cannot satisfy the boundary condition, so all the energy reflects (total internal reflection), while an evanescent, non-propagating field still exists just past the boundary to keep the fields continuous.

Common traps

  • Treating Snell's law as a memorized empirical rule disconnected from Maxwell's equations, instead of a direct consequence of phase-matching along the interface.
  • Mixing up which components are continuous: it is tangential EE and HH, and normal DD and BB — swapping tangential and normal is a frequent slip.
  • Trying to compute the full Fresnel reflection and transmission amplitudes or Brewster's angle here — that needs all four conditions applied quantitatively and is out of scope; this topic stops at existence of the two waves and Snell's law.
  • Assuming total internal reflection means zero field beyond the interface — an evanescent field exists just past the boundary even though no energy escapes on average.

Ask the tutor: if you would like to see the full algebraic derivation of the Fresnel reflection and transmission amplitudes, or a walkthrough of the evanescent wave beyond a total-internal-reflection boundary.

Why can't a single incident wave alone satisfy the boundary conditions?

Because the four conditions must hold at every point of the interface and every instant, and a lone incident wave's fields on the medium-1 side generally do not equal what medium 2 needs on the other side. There is simply no freedom left to force a match with only one wave. Nature's fix is to generate two more waves — a reflected one that adds to the incident field in medium 1, and a transmitted one in medium 2 — with amplitudes and directions chosen exactly so the combined fields satisfy all four conditions everywhere on the boundary at once.

Is Snell's law really "derived" here, or just restated?

It is genuinely derived, not restated. The argument never assumes Snell's law or ray optics; it starts purely from Maxwell's boundary conditions and the requirement that wave phases match along the interface at all points and times. That phase-matching requirement forces the tangential wavevector components to be equal, and turning that single vector statement into n1sin⁡θi=n2sin⁡θtn_1\sin\theta_i = n_2\sin\theta_t is pure algebra. Snell's law falls out as a consequence, which is exactly why it holds for light, sound, and any other wave obeying similar interface conditions.

If the boundary conditions are so restrictive, why don't they also fix the amplitudes of the reflected and transmitted waves here?

They do, in principle — the same four conditions, applied quantitatively rather than just for phase matching, produce the Fresnel equations for reflection and transmission amplitudes, including Brewster's angle where reflection vanishes for one polarization. That calculation is more involved and lies beyond this topic's scope, which stops at showing that reflected and transmitted waves must exist and that their angles obey the law of reflection and Snell's law. The amplitude story is a natural next step if you want to go further.

Before this

Where this leads