Laws of Reflection and Refraction from Fermat
Statement
For a ray crossing a smooth planar interface between two homogeneous media of refractive indices \(n_1\) and \(n_2\), requiring the optical path length \(L=\int n\,\mathrm{d}s\) to be stationary with respect to the crossing point forces the incident, reflected/refracted, and normal directions to be coplanar, and yields the law of reflection \(\theta_i=\theta_r\) together with Snell's law \(n_1\sin\theta_1=n_2\sin\theta_2\), where all angles are measured from the interface normal.
Why it matters
Reflection and refraction are usually stated as empirical laws, but they are in fact the two elementary consequences of a single variational principle. Deriving them from Fermat's principle shows that the observed ray angles are not arbitrary boundary rules but the geometric signature of stationary optical path length, and it fixes the physical meaning of the refractive index as the local slowing factor \(n=c/v\).
The same stationary-path logic scales directly to lenses, mirrors, gradient-index media, and ultimately to the classical limit of quantum electrodynamics, so the interface case is the smallest complete illustration of how global optimisation produces local angle laws.
Assumptions
Derivation
Result
Reading. The stationary-path requirement at an interface says nothing more nor less than: the quantity \(n\sin\theta\) — the transverse component of the optical wavevector, up to \(2\pi/\lambda_0\) — is conserved across the boundary. Reflection is the special case of equal indices; refraction bends the ray toward the normal on entering a denser medium (\(n_2>n_1\Rightarrow\theta_2<\theta_1\)). All three rays share the plane of incidence.
Units check. Refractive index \(n=c/v\) is dimensionless and \(\sin\theta\) is dimensionless, so both sides of \(n_1\sin\theta_1=n_2\sin\theta_2\) are pure numbers. The underlying optical path length \(L=\int n\,\mathrm{d}s\) carries units of length (metres), consistent with a differentiation \(\mathrm{d}L/\mathrm{d}x\) that is dimensionless before being set to zero.
Limiting cases
- \(n_2=n_1\): Snell gives \(\theta_2=\theta_1\) — the ray passes undeviated (index-matched), and the reflected branch reproduces \(\theta_i=\theta_r\).
- Normal incidence \(\theta_1=0\): then \(\sin\theta_2=0\), so \(\theta_2=0\); the ray crosses straight through and the reflected ray retraces the incident path.
- \(n_2\gg n_1\) (into a very dense medium): \(\sin\theta_2=(n_1/n_2)\sin\theta_1\to0\), so all incident rays refract nearly along the normal (basis of high-index immersion optics).
- Grazing incidence \(\theta_1\to90^\circ\), \(n_2>n_1\): \(\sin\theta_2\to n_1/n_2\), the maximum internal angle — the origin of the refraction cone seen looking up from underwater (Snell's window).
Breaks when
- Total internal reflection. Going from dense to rare (\(n_1>n_2\)) with \(\sin\theta_1>n_2/n_1\), Snell's law demands \(\sin\theta_2>1\), which has no real solution. No refracted ray exists; the light is wholly reflected and only an evanescent field penetrates. The purely geometric Fermat argument no longer describes a real transmitted path.
- Wavelength not negligible. When \(\lambda\) is comparable to path lengths or aperture (near-field, sub-wavelength apertures, gratings), many neighbouring paths interfere and no single stationary ray dominates; diffraction replaces the sharp Snell angle.
- Absorbing or metallic media. Complex \(n\) makes \(\theta_2\) complex; the transmitted wave is inhomogeneous and the real-valued angle law fails as a geometric statement.
- Anisotropic (birefringent) media. \(n\) depends on polarisation and propagation direction, so a single scalar Snell relation splits into ordinary and extraordinary rays with different laws.
Failure modes
- Measuring angles from the surface, not the normal. Snell's law uses angles from the normal; using the grazing angle silently replaces \(\sin\theta\) with \(\cos\theta\) and inverts the bending.
- Putting the indices on the wrong sides. Writing \(n_2\sin\theta_1=n_1\sin\theta_2\) flips the direction of bending; the index always pairs with the angle in its own medium.
- Claiming Fermat means "shortest time" always. The principle is stationary, not minimum: the correct statement is \(\delta L=0\). The single planar interface happens to give a minimum (step 9), but curved mirrors can give a maximum or saddle.
- Applying Snell past the critical angle. Taking \(\arcsin\) of a number \(>1\) on a calculator returns an error or garbage; the physical answer is total internal reflection, not a refracted ray.
- Forgetting coplanarity. Solving only the 2D projection and asserting the refracted ray can leave the plane of incidence — step 3 forbids it.
- Treating \(n\sin\theta\) as conserved along a single ray in a graded medium while still using the two-media formula. The invariant is correct, but it is the ray invariant of the eikonal, not the interface formula.
Discussion
The derivation exposes a conserved quantity that outlives the two-media picture: the transverse component of the wavevector \(k_x=(\omega/c)\,n\sin\theta\). Translational symmetry of the interface along its own plane is what makes \(k_x\) conserved, exactly as momentum is conserved when a Lagrangian has no explicit position dependence. Snell's law is therefore a Noether-type statement — "\(n\sin\theta\) constant" is the optical analogue of transverse momentum conservation across a boundary that is uniform in the transverse direction. This is why the derivation sits on the symmetry thread as much as the light thread.
Reading the result as \(\sin\theta_1/v_1=\sin\theta_2/v_2\) (using \(n=c/v\)) recovers Huygens' wavefront construction: the wavefront must stay continuous across the interface, so the trace speed of the wavefront along the boundary is the same on both sides. The lifeguard/beach analogy — run fast on sand, swim slow in water, and the optimal entry point bends your path — is not a loose metaphor but literally the same minimisation with \(v\) in place of \(1/n\).
The interface case is the seed of all of imaging. A lens is a shaped stack of interfaces engineered so that every ray from an object point arrives at the image point with the same optical path length (Fermat's principle applied globally, giving a stationary — indeed equal — \(L\) for a whole bundle). Aberrations are precisely the failure to keep \(L\) equal across the aperture.
At the deepest level Fermat's principle is not fundamental but emergent: in Feynman's path-integral formulation each path contributes \(e^{iL/\lambda\!\!\!\!-}\)-like phase, and in the short-wavelength limit stationary-phase (steepest descent) selects the paths where \(\delta L=0\). Snell's law is thus the classical shadow of constructive interference — neighbouring paths near the stationary one add in phase while all others cancel. The refractive index itself is the low-frequency, forward-scattering summary of the microscopic polarisability of the medium, so \(n\sin\theta=\text{const}\) is a statement about coherent forward scattering by atoms lined up along a plane.
Common misconceptions. Fermat's principle is often taught as "light takes the fastest route," which is wrong in general — it takes a stationary route. Light also does not "choose" or "try" paths; the variational statement is a compact bookkeeping of wave interference, not teleology. And Snell's law fixes only the direction of the refracted ray, never how much energy refracts versus reflects — that split is governed by the Fresnel coefficients, which Fermat's scalar argument cannot supply.
Worked examples
Reading. The transverse invariant is \(n\sin\theta=1.000\times0.500=0.500\) in air and \(1.520\times0.3289=0.500\) in glass — conserved to three figures, the numerical signature of Snell's law.
Units check. Every quantity is dimensionless; the answer is an angle in degrees.
Reading. No refracted ray leaves the water; the ray reflects wholly back with \(\theta_r=55.0^\circ\) (law of reflection), and only an evanescent field leaks into the air. This is the same \(\sim49^\circ\) cone that bounds a diver's "Snell's window."
Units check. \(n_2/n_1\) is a ratio of dimensionless indices; \(\theta_c\) is an angle. Consistent.
Problems
- Basic refraction. A ray travels from air (\(n=1.00\)) into diamond (\(n=2.42\)) at an incidence angle of \(45.0^\circ\). Find the refraction angle.
Solution
\(\sin\theta_2=\dfrac{1.00}{2.42}\sin45.0^\circ=\dfrac{0.7071}{2.42}=0.2922\). Then \(\theta_2=\arcsin(0.2922)=17.0^\circ\). The ray bends strongly toward the normal because diamond's index is large. - Reverse the ray. Light in glass (\(n=1.50\)) exits into air (\(n=1.00\)) at an internal angle of \(25.0^\circ\). Find the exit angle in air, and state the exit angle for an internal angle equal to the critical angle.
Solution
\(\sin\theta_2=\dfrac{1.50}{1.00}\sin25.0^\circ=1.50\times0.4226=0.6339\), so \(\theta_2=39.3^\circ\) (bends away from normal on leaving the denser medium). Critical angle: \(\sin\theta_c=1.00/1.50=0.6667\Rightarrow\theta_c=41.8^\circ\); at exactly \(\theta_c\) the exit angle is \(90^\circ\) (grazing). - Two-layer stack. A ray passes from air (\(n_0=1.00\)) at \(\theta_0=60.0^\circ\) into a layer of oil (\(n_1=1.47\)), then into water (\(n_2=1.33\)). Find the angle in the water and comment on whether the oil layer's index matters.
Solution
Snell at each interface: \(n_0\sin\theta_0=n_1\sin\theta_1=n_2\sin\theta_2\). The intermediate index cancels through the chain, so \(\sin\theta_2=\dfrac{n_0}{n_2}\sin\theta_0=\dfrac{1.00}{1.33}\times0.8660=0.6511\), giving \(\theta_2=40.6^\circ\). The oil layer shifts the ray sideways but does not affect the final angle — only the first and last indices set it (the invariant \(n\sin\theta\) is conserved throughout). - Lateral displacement through a slab. A ray strikes a parallel-sided glass slab (\(n=1.50\), thickness \(t=8.0\,\mathrm{mm}\)) in air at \(\theta_1=50.0^\circ\). The emergent ray is parallel to the incident ray but laterally shifted by \(s=t\,\dfrac{\sin(\theta_1-\theta_2)}{\cos\theta_2}\). Find \(s\).
Solution
Inside: \(\sin\theta_2=\dfrac{1.00}{1.50}\sin50.0^\circ=\dfrac{0.7660}{1.50}=0.5107\Rightarrow\theta_2=30.7^\circ\), \(\cos\theta_2=0.8595\). Then \(\theta_1-\theta_2=19.3^\circ\), \(\sin19.3^\circ=0.3305\). So \(s=8.0\,\mathrm{mm}\times\dfrac{0.3305}{0.8595}=3.1\,\mathrm{mm}\). The ray emerges parallel (same air on both sides restores \(\theta_1\)) but offset by about \(3\,\mathrm{mm}\). - Fermat check by direct minimisation. Take \(A=(0,3.0)\) in medium 1 (\(n_1=1.00\)) and \(B=(6.0,-2.0)\) in medium 2 (\(n_2=1.50\)), lengths in cm, interface at \(z=0\). Write \(L(x)\), impose \(\mathrm{d}L/\mathrm{d}x=0\), locate the stationary crossing numerically, and confirm it satisfies Snell's law.
Solution
\(L(x)=1.00\sqrt{x^2+3.0^2}+1.50\sqrt{(6.0-x)^2+2.0^2}\). Stationarity: \[ f(x)=\frac{x}{\sqrt{x^2+9}}-1.50\,\frac{6-x}{\sqrt{(6-x)^2+4}}=0. \] Bracket the root: \(f(4)=0.800-1.061=-0.261<0\) and \(f(5)=0.857-0.671=+0.187>0\), so the crossing lies between \(4\) and \(5\,\mathrm{cm}\). Bisecting: \(f(4.5)=-0.068\), \(f(4.7)=+0.025\), \(f(4.65)\approx+0.001\). Hence \(x\approx4.65\,\mathrm{cm}\). Check Snell at that point: \(\overline{AP}=\sqrt{4.65^2+9.0}=\sqrt{30.62}=5.534\), so \(\sin\theta_1=4.65/5.534=0.840\), giving \(n_1\sin\theta_1=0.840\); \(\overline{PB}=\sqrt{1.35^2+4.0}=\sqrt{5.82}=2.413\), so \(\sin\theta_2=1.35/2.413=0.560\), giving \(n_2\sin\theta_2=1.50\times0.560=0.840\). The index-weighted sines agree to three figures, so the point that makes \(L\) stationary is exactly the point that obeys \(n_1\sin\theta_1=n_2\sin\theta_2\) — Snell's law is the stationarity condition, not an independent rule.