physics2u
Tier
⌕ Search ⌘K
Derivation

Laws of Reflection and Refraction from Fermat

D-198 Home PU-206 Threads light · symmetry Depends on Fermat's Principle from the Eikonal Equation
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
The two media are homogeneous and isotropic, so \(n_1,n_2\) are constants along each ray segment.If \(n\) varies within a segment the path is curved and \(L=\int n\,\mathrm{d}s\) cannot be split into two straight-line terms; one must solve the full eikonal/ray equation instead.
The interface is a smooth plane, or locally flat on the scale of a wavelength.Curvature or roughness comparable to \(\lambda\) redistributes energy into many directions (imaging aberrations, diffuse scatter) and the single stationary crossing point is replaced by a distribution.
Geometric-optics limit: the wavelength is negligibly small compared with all path lengths and the interface size.If \(\lambda\) is not small, neighbouring paths interfere appreciably and the ray picture (a single stationary path dominating) breaks into a diffraction problem.
Only the optical path length enters; polarisation, amplitude and phase-on-reflection are not tracked.Dropped information means Fermat gives the ray directions but says nothing about how much light reflects vs refracts — that requires the Fresnel equations from Maxwell's boundary conditions.
The refractive index is real (non-absorbing media) and dispersion is evaluated at a single frequency.Complex \(n\) makes \(\theta_2\) complex and the "angle" loses its naive geometric meaning (evanescent/inhomogeneous waves); different frequencies refract at different angles (chromatic dispersion).
Derivation
1
\[ A=(0,a),\qquad B=(d,-b),\qquad P=(x,0),\qquad a,b>0 \]
Set up coordinates: the interface is the plane \(z=0\); the source \(A\) sits a height \(a\) above it in medium 1, the target \(B\) a depth \(b\) below in medium 2, and the ray crosses at the free point \(P\). By Fermat's principle (from the eikonal) the physical ray makes \(L\) stationary in \(x\). A
2
\[ L(x)=n_1\,\overline{AP}+n_2\,\overline{PB}=n_1\sqrt{x^2+a^2}+n_2\sqrt{(d-x)^2+b^2} \]
Within each homogeneous medium the ray is straight (shortest \(\int n\,\mathrm{d}s\) between fixed endpoints when \(n\) is constant), so each segment's optical path length is index times Euclidean length. The total is the sum. A
3
\[ \text{Any out-of-plane crossing } P'=(x,y,0),\ y\neq0 \Rightarrow \overline{AP'}>\overline{AP},\ \overline{P'B}>\overline{PB} \]
Coplanarity: displacing \(P\) off the plane containing \(A\), \(B\) and the normal lengthens both Euclidean segments (a nonzero \(y\) adds \(y^2\) under each square root), so it strictly increases \(L\). The stationary crossing therefore lies in that plane, and the problem is genuinely one-dimensional in \(x\). C
4
\[ \frac{\mathrm{d}L}{\mathrm{d}x}=n_1\,\frac{x}{\sqrt{x^2+a^2}}-n_2\,\frac{d-x}{\sqrt{(d-x)^2+b^2}}=0 \]
Impose stationarity \(\mathrm{d}L/\mathrm{d}x=0\). Differentiate each square root by the chain rule; the minus sign in the second term comes from \(\mathrm{d}(d-x)/\mathrm{d}x=-1\). This is the single condition Fermat supplies. B
5
\[ \sin\theta_1=\frac{x}{\sqrt{x^2+a^2}},\qquad \sin\theta_2=\frac{d-x}{\sqrt{(d-x)^2+b^2}} \]
Identify the geometry: \(\theta_1\) and \(\theta_2\) are the angles the two segments make with the normal (the \(z\)-axis). The horizontal run over the slant length is exactly the sine of the angle from the vertical normal. A
6
\[ n_1\sin\theta_1-n_2\sin\theta_2=0 \;\Longrightarrow\; \boxed{\,n_1\sin\theta_1=n_2\sin\theta_2\,} \]
Substitute the sine identities of step 5 into the stationarity condition of step 4. The refracted ray also lies in the plane of incidence (step 3), completing Snell's law. A
7
\[ \text{Reflection: } B=(d,+b)\ \text{in medium 1}\Rightarrow L(x)=n_1\!\left[\sqrt{x^2+a^2}+\sqrt{(d-x)^2+b^2}\right] \]
For reflection both endpoints lie in the same medium and the ray touches the interface at \(P\). The single index \(n_1>0\) factors out, so stationarity of \(L\) is stationarity of the purely geometric path length. A
8
\[ \frac{\mathrm{d}L}{\mathrm{d}x}=n_1\!\left[\frac{x}{\sqrt{x^2+a^2}}-\frac{d-x}{\sqrt{(d-x)^2+b^2}}\right]=0 \;\Longrightarrow\; \sin\theta_i=\sin\theta_r \]
Same differentiation as step 4 but with a common index. Dividing by \(n_1\neq0\) gives \(\sin\theta_i=\sin\theta_r\); since both angles lie in \([0,\tfrac{\pi}{2})\) this forces \(\boxed{\theta_i=\theta_r}\), the law of reflection (formally the \(n_2\to n_1\) limit of Snell's law with the reflected branch). B
9
\[ \frac{\mathrm{d}^2L}{\mathrm{d}x^2}=\frac{n_1 a^2}{(x^2+a^2)^{3/2}}+\frac{n_2 b^2}{((d-x)^2+b^2)^{3/2}}>0 \]
Check the nature of the extremum. Both terms are strictly positive for \(n_1,n_2>0\), so \(L\) is convex and the stationary crossing is a genuine minimum for a single planar interface. (Fermat only requires stationarity; curved mirrors can make it a maximum or saddle.) C
Result
\[ \theta_i=\theta_r \qquad\text{and}\qquad n_1\sin\theta_1=n_2\sin\theta_2 \]

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
1
Air into crown glass. A ray in air (\(n_1=1.000\)) strikes a flat glass surface (\(n_2=1.520\)) at \(\theta_1=30.0^\circ\). Find the refraction angle and confirm the ray bends toward the normal.
\[ \sin\theta_2=\frac{n_1}{n_2}\sin\theta_1 \]
Rearrange Snell's law for the unknown angle in medium 2. A
\[ \sin\theta_2=\frac{1.000}{1.520}\sin 30.0^\circ=\frac{0.5000}{1.520}=0.3289 \]
Insert numbers; \(\sin30^\circ=0.5000\). A
\[ \theta_2=\arcsin(0.3289)=19.2^\circ \]
Take the inverse sine. Since \(19.2^\circ<30.0^\circ\), the ray bends toward the normal, as expected for entering a denser medium. A
\[ \theta_2=19.2^\circ \]

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.

2
Critical angle and total internal reflection, water to air. Light inside water (\(n_1=1.333\)) meets the flat top surface with air above (\(n_2=1.000\)). Find the critical angle, then decide the fate of a ray incident at \(\theta_1=55.0^\circ\).
\[ \sin\theta_c=\frac{n_2}{n_1}\quad(\theta_2=90^\circ) \]
The critical angle is where the refracted ray grazes the surface, \(\theta_2=90^\circ\Rightarrow\sin\theta_2=1\). Set Snell's law to that boundary. B
\[ \sin\theta_c=\frac{1.000}{1.333}=0.7502\;\Rightarrow\;\theta_c=48.6^\circ \]
Evaluate and invert. A
\[ \theta_1=55.0^\circ>\theta_c=48.6^\circ \]
Compare the incidence angle with the critical angle. Because \(55.0^\circ\) exceeds \(48.6^\circ\), Snell's law would require \(\sin\theta_2=1.333\sin55^\circ=1.09>1\), which is impossible. B
\[ \theta_c=48.6^\circ;\quad \text{at }55.0^\circ:\ \text{total internal reflection} \]

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
  1. 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.
  2. 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).
  3. 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).
  4. 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}\).
  5. 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.