Skip to main content

Physics III course sequence · Interactive lesson

Fermat's principle and the ray laws

First year handed you Fermat's principle as a slogan: light takes the quickest route. Here it is a calculus tool. Write travel time as an integral of refractive index, differentiate once for both ray laws and once more to see why quickest is the wrong word, price the paraxial shortcut with θ³/6, and find when rays exist at all.

UPIII-04.01 · Lesson 1 of 9 in this unit. Position is not a completion score.
Starting model: Fermat's principle and the ray lawsLeft: a trial path from A, 4.0 cm above a flat interface (n₁ = 1.00), to B, 4.0 cm below and 6.0 cm along (n₂ = 1.50), bending at x = 3.00 cm; the dashed line is the normal there. Right: travel time T(x) against crossing point, the trial one marked, where c dT/dx = n₁ sin θ₁ − n₂ sin θ₂ = -0.300. The ray sits where this is zero.ABn₁ = 1.00n₂ = 1.50494 ps334 ps0x = 6 cmc dT/dx = −0.300
Start with a picture. Change the model in the lab below.
1

Build the model

Light follows stationary time, and every ray law is one derivative of it.

The key idea

Fermat's principle states that between two points light follows a route whose optical path length ∫ n ds, and so its travel time, is stationary against small deformations of the route: unchanged to first order, not necessarily least.

Example. For light from air into glass of index 1.50 meeting the surface at 40°, dT/dx = 0 reads 1.00 sin 40° = 1.50 sin θ₂, so θ₂ = 25.4°; every neighbouring crossing point takes longer, so here the stationary route is also the quickest.

The complete physical model and assumptions

Geometrical optics is a theory of phase. A wave reaching B from A arrives by every conceivable route, each carrying a phase 2π OPL/λ₀ set by its optical path length OPL = ∫ n ds, and the routes that matter are the ones whose neighbours agree with them: only where OPL is stationary against a small deformation do nearby paths add instead of cancelling. That is Fermat's principle in its honest form, δ(OPL) = 0, or dT/dx = 0 for a route pinned to a surface at x, and it is a statement about stationarity, not speed. Differentiate once at a flat surface and the derivative is n₁ sin θ₁ − n₂ sin θ₂: zero gives Snell's law, with both legs in one medium it gives the law of reflection, and a sideways derivative puts the ray in the plane of incidence. Differentiate twice and you learn what kind of stationary point the ray sits on: a minimum at a plane, a whole degenerate family on an ellipsoid, a maximum on a mirror curving inside one. The price of the paraxial optics that follows is the θ³/6 dropped from sin θ, a fraction θ²/6 that is 0.5% at 10° and 4.6% at 30°, and the third-order aberrations are that term coming back. The model stops where its own premise fails: the band of reinforcing paths is about √(λL) wide, so apertures and surfaces must be far larger than that, NF = a²/(λL) ≫ 1, or there is no ray to trace.

1Optical path length counts wavelengths, not metres

Light in a medium of index n moves at c/n, so a stretch ds takes n ds/c. Add the pieces along any route and the travel time is T = (1/c) ∫ n ds. The integral is the optical path length, OPL = ∫ n ds: the vacuum distance that would take the same time. It is a length in metres, and it is what a wave actually counts, because the phase accumulated along the route is φ = k₀ OPL = 2π OPL/λ₀, with λ₀ the vacuum wavelength. A 1.00 mm plate of glass with n = 1.52 has OPL 1.52 mm; the extra 0.52 mm is 945 wavelengths of 550 nm light, about 5.9 × 10³ rad of phase that a 1.00 mm gap of air would not have supplied. Fermat's principle in its working form is a statement about this length: of all routes between two fixed points, light follows one for which OPL, and with it T and φ, is stationary under a small deformation of the route, δ(OPL) = 0.

2Why stationary: only neighbours that agree in phase survive

The principle is not a preference of light; it is what a wave does. Every route from A to B contributes an amplitude proportional to e(iφ), and what arrives at B is their sum. Deform a route slightly and, in general, φ changes at first order, so nearby routes arrive with phases spread over many cycles and cancel in pairs. Only around a route where dφ/dx = 0 does the first-order change vanish; there a whole band of neighbours arrives nearly in phase and reinforces. That band is the ray, and it has a width. Bend a straight path of length L through a point displaced sideways by h at its midpoint: each half grows from L/2 to √((L/2)² + h²) ≈ L/2 + h²/L, so the extra path is 2h²/L. The neighbours stay within half a wavelength, phase within π, out to 2h²/L = λ/2, that is h = ½√(λL). For L = 1.0 m and λ = 500 nm that is 0.35 mm either side: the ray is a tube about 0.7 mm across, and everything the ray laws say applies inside it.

3One derivative, both laws, and the plane of incidence for free

Put a flat surface along the x axis, A a height a above it and B a depth b below, a horizontal distance d apart, and let the route cross at x. Then T(x) = [n₁√(a² + x²) + n₂√(b² + (d − x)²)]/c, and one differentiation gives c dT/dx = n₁ x/√(a² + x²) − n₂ (d − x)/√(b² + (d − x)²) = n₁ sin θ₁ − n₂ sin θ₂, the angles measured from the normal. Setting it to zero is Snell's law. Reflection is the same derivative with the second leg back on the first side, so n₂ = n₁ and sin θᵢ = sin θᵣ: the law of reflection. Away from the stationary point the derivative is a signed error whose sign says which way to move the crossing point, which is how a computer, or the figure below, finds the ray. Differentiate instead with respect to a displacement z of the crossing point sideways, out of the plane containing A, B and the normal: c dT/dz = n₁z/L₁ + n₂z/L₂, zero only at z = 0. That is the third ray law: the refracted and reflected rays lie in the plane of incidence.

4Stationary is not minimum: read the second derivative

Differentiate again for the flat surface: c d²T/dx² = n₁ cos²θ₁/L₁ + n₂ cos²θ₂/L₂, both terms positive, so at a plane interface or plane mirror the ray really is the quickest route and the time landscape is a single bowl. Curve the surface and the sign is no longer guaranteed. An ellipsoidal mirror with A and B at its foci reflects every wall point to B, because the two focal distances sum to the same 2a for every point of the wall: T is constant, d²T/dx² = 0, and the whole wall is stationary. A mirror that curves more tightly than that ellipsoid, touching it at one point P, puts its other points inside the ellipsoid, where the focal sum is smaller, so the path through P is longer than through any neighbour and the real ray is a local maximum of T. A mirror flatter than the ellipsoid gives a minimum. In all three cases the first derivative vanishes at P and the law of reflection holds there. The first derivative fixes the ray; the second only says what kind of stationary point it sits on, and nothing in the physics needs that to be a minimum.

5The paraxial bill: sin θ = θ − θ³/6

Every imaging equation later in this section replaces sin θ by θ. The series sin θ = θ − θ³/6 + θ⁵/120 − … prices that move: the fractional error of writing sin θ ≈ θ is θ²/6, which is 0.13% at 5°, 0.51% at 10°, 2.0% at 20° and 4.6% at 30°, where the exact figure is already 4.7%. Propagate it through Snell's law. For 25° incidence on glass of index 1.52 the paraxial form n₁θ₁ = n₂θ₂ gives θ₂ = 25°/1.52 = 16.45°; the exact law gives sin θ₂ = 0.4226/1.52 = 0.2780, θ₂ = 16.14°. The paraxial answer is 0.30° high, 1.9%. Substituting the series on both sides shows the fractional error is (θ₁² − θ₂²)/6 = 1.85%: the two cubic terms partly cancel, and the denser side, with its smaller angle, contributes less. Keep the cubic terms and solve θ₂ − θ₂³/6 = (θ₁ − θ₁³/6)/1.52 by iteration and you get 16.139°, within 0.005° of exact. That third-order correction is the term the Seidel theory of aberrations keeps, and spherical aberration is what the paraxial equations lost when they dropped it.

6Where rays stop: the Fresnel number

The band of reinforcing paths met above is about √(λL) wide. A ray picture makes sense only if the aperture or obstacle that defines the beam is much wider than that band, so that the stationary path has its neighbourhood to itself. The ratio squared is the Fresnel number, NF = a²/(λL), for an aperture of half-width a viewed at distance L. A coin of radius 1.0 cm at 1.0 m under 550 nm light has NF = (10⁻²)²/(5.5 × 10⁻⁷ × 1.0) = 1.8 × 10²: a sharp geometrical shadow. A pinhole of radius 1.0 mm at the same distance has NF = 1.8, and its patch of light is a diffraction pattern that no ray tracing predicts. In the same way the mirrors and lenses of this section must be smooth on the scale of λ and large compared with it. The formal statement is that geometrical optics is the λ → 0 limit of wave optics, the eikonal limit, in the way that classical mechanics is the ħ → 0 limit of quantum mechanics: sending λ → 0 sends NF → ∞ and every diffraction angle λ/a to zero, leaving exactly the ray laws.

2

Key equations

Read the units, assumptions and limits before substituting.

Optical path length

OPL = ∫ n ds = c T

Turns least time into least length: a metre of glass of index n counts as n metres of vacuum, and the wave's phase along the route is 2π OPL/λ₀.

n dimensionless, ds a path element in m, T the travel time in s, c = 2.998 × 10⁸ m s⁻¹

Fermat's stationary condition

dT/dx = 0, with T(x) = [n₁L₁(x) + n₂L₂(x)]/c

The ray is the crossing point at which the travel time is stationary; at one surface this single equation is the whole of ray optics.

x the crossing coordinate along the surface in m; L₁, L₂ the two leg lengths in m

The derivative at a flat surface

c dT/dx = n₁ sin θ₁ − n₂ sin θ₂

Zero is Snell's law; with n₂ = n₁ on a reflected leg it is θᵣ = θᵢ. Away from zero its sign says which way the crossing point must move.

θ₁, θ₂ measured from the surface normal; n₁, n₂ dimensionless

Curvature of the time landscape

c d²T/dx² = n₁ cos²θ₁/L₁ + n₂ cos²θ₂/L₂

Says only what kind of stationary point the ray is: a minimum at a plane, degenerate on an ellipsoid, a maximum on a mirror curving inside it.

L₁, L₂ the leg lengths in m; both terms positive at any flat surface

Paraxial cost

sin θ = θ − θ³/6 + θ⁵/120 − …

0.51% at 10°, 2.0% at 20°, 4.6% at 30°. The θ³/6 term is the third-order optics that every paraxial imaging equation drops.

θ in radians; the fractional error of writing sin θ ≈ θ is θ²/6

Ray-optics validity: Fresnel number

NF = a²/(λL) ≫ 1

Compares the aperture with the √(λL) band of paths that reinforce one another; below NF ≈ 1 there is no ray to trace.

a the aperture half-width in m, λ the wavelength in m, L the distance to the observation point in m
3

Interactive lab

Predict first. Explore the model. Compare the result.

Explore the model

3.00 cm
0 to 6 cm; steps of 0.05.
1.00
1 to 2; steps of 0.05.
1.50
1 to 2; steps of 0.05.

Try this. Drag the crossing point until c dT/dx changes sign: with n₂ = 1.50 that happens between 3.85 and 3.90 cm, well past the 3.00 cm straight-line crossing, and θ₁ and θ₂ there obey Snell's law. Then set n₂ = 1.00 and the bottom of the curve slides back to 3.00 cm, the straight line, as it must.

Live results

TRAVEL TIME T(x)
417.0 ps
ANGLE θ₁ FROM NORMAL
36.9 °
ANGLE θ₂ FROM NORMAL
36.9 °
c dT/dx = n₁sinθ₁ − n₂sinθ₂
-0.300

Results follow this lesson’s model and assumptions. Displayed values are rounded.

Interactive Physics III modelLeft: a trial path from A, 4.0 cm above a flat interface (n₁ = 1.00), to B, 4.0 cm below and 6.0 cm along (n₂ = 1.50), bending at x = 3.00 cm; the dashed line is the normal there. Right: travel time T(x) against crossing point, the trial one marked, where c dT/dx = n₁ sin θ₁ − n₂ sin θ₂ = -0.300. The ray sits where this is zero.ABn₁ = 1.00n₂ = 1.50494 ps334 ps0x = 6 cmc dT/dx = −0.300
Left: a trial path from A, 4.0 cm above a flat interface (n₁ = 1.00), to B, 4.0 cm below and 6.0 cm along (n₂ = 1.50), bending at x = 3.00 cm; the dashed line is the normal there. Right: travel time T(x) against crossing point, the trial one marked, where c dT/dx = n₁ sin θ₁ − n₂ sin θ₂ = −0.300. The ray sits where this is zero.

Predict → change one variable → check

Plan a change before running it. Every other input stays at the saved baseline.

Saved baseline. Crossing point x: 3.00 cm; Index n₁ above: 1.00; Index n₂ below: 1.50

Baseline 3.00; choose 0 to 6, in steps of 0.05.
4. Compared with the saved baseline, this result will…

This experiment is kept only while this page is open. It does not change saved course progress.

4

Catch the common trap

The first-year slogan that light takes the fastest path is wrong in a way that matters. If it were true there would be no reflected ray at all, since the direct route from A to B is always shorter than any bounce off a mirror. The real condition is stationarity, dT/dx = 0: the route's time is unchanged to first order by a small deformation. At a plane that stationary point happens to be a minimum. At an ellipsoidal mirror with A and B at the foci every wall point ties, and on a mirror curving more tightly than that ellipsoid the actual ray is a local maximum of time; the law of reflection holds in all three cases. The physical reason is interference, not choice: light does not sample routes and pick one, it arrives by all of them, and only near a stationary route do the neighbours fail to cancel.

5

Practice & worked examples

3 authored examples. Make an attempt, then reveal the reasoning one step at a time.

EasyExample 1

A point source A is 2.0 m above a flat horizontal mirror and a detector B is 1.0 m above it, 4.5 m away horizontally. Write the travel time of the reflected route as a function of the reflection point x, use dT/dx = 0 to locate that point, and find the route's length and travel time.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 5 steps revealed.

MediumExample 2

A point A sits 3.0 cm above the flat surface of water (n = 1.333) and a point B sits 5.0 cm below it, 6.0 cm away horizontally. Starting from the straight-line crossing point, use Newton's method on the derivative c dT/dx to find where the actual ray crosses the surface, verify Snell's law there, and find the time saved relative to the straight line.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 6 steps revealed.

HardExample 3

A parabolic mirror y = x²/(4f), with f = 1.00 m, faces a plane wave travelling in the −y direction. (a) Using optical path length from a wavefront at y = h to the focus (0, f), show that every ray, whatever its height x, is a stationary path. (b) The mirror is replaced by a sphere of radius R = 2f. Show that its sag exceeds the parabola's by x⁴/(8R³), and find the ray height at which the round-trip path error reaches λ/4 for λ = 550 nm.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 6 steps revealed.

6

Quick check

Select an answer and explain it before checking.

Light travels from A in air (n₁ = 1.00) to B in glass (n₂ = 1.50) across a flat surface. Let x measure the crossing point along the surface from the foot of A towards the foot of B. A trial crossing point gives c dT/dx = n₁ sin θ₁ − n₂ sin θ₂ = +0.12. Where does the true ray cross?
7

Review & continue

Fermat's principle states that between two points light follows a route whose optical path length ∫ n ds, and so its travel time, is stationary against small deformations of the route: unchanged to first order, not necessarily least.

  • Explain the relationship without looking at the equation.
  • Check a sign, a unit and a model assumption in your working.
  • Return to the lab or worked example if a step is still unclear.

Optional supporting lessons

These chapter resources can help with earlier ideas; they are not additional required Physics III completion tasks.

Extra challenging questions

Connect several ideas, explore supplied data, and compare your reasoning with a worked solution.