Fermat’s principle and optical path
Derive ray directions from stationary optical path while distinguishing phase, travel time, and a true minimum.
On this page
The question for today
What you’ll understand
- Calculate optical path in piecewise uniform media.
- Derive the planar refraction condition by varying a crossing point.
- Explain why stationarity does not guarantee a global minimum.
A ruler measures geometric distance, but a monochromatic wave accumulates phase according to both distance and refractive index. This distinction makes it possible for a longer route through a faster medium to compete with a shorter route through a slower one. Fermat’s principle identifies physical ray paths through a first-order stationarity condition. We will derive that condition for a movable interface crossing, then separate its reliable mathematical meaning from the tempting claim that every ray finds the globally fastest route.
The quantity being varied
Assume a transparent, isotropic, stationary medium with a real positive phase index at the chosen vacuum wavelength . Optical path length is the integral of index times geometric arclength. It has units of metres, although it is not the distance a ruler measures. Multiplying it by the vacuum wavenumber gives propagation phase. A uniform glass segment of length two centimetres and index one and a half therefore contributes three centimetres of optical path.
In a nondispersive medium the speed is , so optical path divided by c is travel time. For a dispersive material, however, phase index and group index differ. A narrow pulse’s delay requires the group index, whereas monochromatic ray geometry is usually formulated with phase index at a fixed frequency. Calling every optical-path calculation a pulse arrival-time calculation silently introduces an assumption about dispersion. We retain the monochromatic formulation throughout this derivation.
A crossing point supplies a derivation
Place a horizontal interface between media with indices and . A source is a perpendicular distance a above it, and the receiver is a perpendicular distance b below it with horizontal displacement X. Let x be the crossing coordinate measured from the source’s vertical projection. Each segment is straight because its index is uniform. The remaining freedom is a single real number, so the path integral becomes an ordinary differentiable function.
Differentiating each square root produces a horizontal displacement divided by that segment’s length. Those ratios are the sines of the respective angles to the interface normal. Setting the derivative to zero balances the index-weighted sines. This route also explains which angle convention belongs in Snell’s law; measuring angles from the interface would replace sines with cosines. Endpoint positions stay fixed while the crossing point moves, which is essential to interpreting the derivative.
Stationarity is the general statement
For this planar two-segment geometry, positive indices and nonzero perpendicular distances make the second derivative positive. Its stationary crossing is therefore the unique minimum in that restricted family. The same conclusion does not follow for an arbitrary curved reflector or an optical system with multiple images. Stationary paths can have different second variations, and several physical rays can connect the same endpoints. Fermat’s principle is a local variational condition, not an algorithm that compares every possible route.
The wave interpretation helps diagnose the misconception. Nearby nonstationary contributions rapidly acquire different phases and tend to cancel, whereas the phase changes only to second order near a stationary path. This is an asymptotic explanation of rays when wavelengths are small compared with system scales; it does not eliminate diffraction. Near a caustic, several rays crowd together and a naive ray amplitude can diverge even though the wave field remains finite. Stationarity survives as a geometric guide while the amplitude approximation needs repair.
Work it through
Test a candidate crossing
A source and receiver lie 3 cm and 4 cm from opposite sides of an interface. Their horizontal separation is 8 cm. The upper index is 1 and the lower index is . Test the candidate crossing for stationarity.
The upper segment is long. The lower segment is long, so geometric length alone does not determine stationarity.
The derivative is . Its units are centimetres of optical path per centimetre of crossing displacement, hence dimensionless.
A small positive displacement of the crossing therefore decreases optical path to first order. The candidate is not stationary; the minimum crossing lies farther to the right because the derivative increases strictly in this geometry.
The proposed crossing fails Fermat’s condition. Its negative derivative identifies which adjustment reduces optical path without requiring a numerical solution for the final crossing.
The living notebook
Explore the model
Interactive lab · function
First and second variation near a candidate
Use the parabola only as a local model of optical-path change near a stationary coordinate. Reset, set Coefficient a = 1 and Position x = 0.5, and predict positive slope 1. For a separate run Reset, set a = −1 and x = 0.5, and predict slope −1. Both curves have zero slope at the origin, with opposite curvature.
- y at chosen x
- 0.608
- Tangent slope · 2ax
- 1.35
- Signed area · ax³/3
- 0.182
This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA zero first derivative alone does not classify a stationary path. This parabola instrument does not trace an optical interface or calculate an optical-path integral.
Pause & reason
Check your understanding
Your turn
Try it yourself
A monochromatic beam traverses 6 mm of air with index 1 and 8 mm of nondispersive glass with index 1.5. Find optical path, phase advance in cycles for , and travel time using .
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Add index-weighted lengths before converting millimetres to metres or micrometres.
Compare with the solution
The optical path is . The number of cycles is , so the phase advance is radians. Nondispersion allows the delay , or 60 ps. The geometric length is only 14 mm; using it would underestimate both phase and delay.
Keep the idea
Take it with you
- Optical path weights length by phase index at a specified frequency.
- Varying an interface crossing derives the index-weighted sine condition.
- Stationarity is more general than global minimization and does not remove diffraction.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.