Fermat Principle and the Eikonal Equation
Here is where geometrical optics stops being a convenient fiction and earns a derivation. Rays, wavefronts, Fermat's principle — the whole apparatus of lenses and mirrors — are not fundamental; they are what Maxwell's electromagnetic waves look like when the wavelength is far smaller than anything the light passes through. This chapter takes the debt geometry owes to wave physics and pays it, by extracting the ray from the wave in a single controlled limit. The tool is an old one, borrowed from mechanics. Write a monochromatic field as a slowly varying amplitude riding on a rapidly spinning phase, , and feed it to the wave equation. Sort the result by powers of the vacuum wavenumber . As — the short-wavelength limit — the leading term is a clean statement about the phase alone, : the eikonal equation. Its level surfaces are the wavefronts; their perpendiculars are the rays. Everything geometrical follows. This is the exact optical twin of a move made in classical mechanics, where the short-wavelength limit of the Schrödinger equation is the Hamilton–Jacobi equation and the "rays" are particle trajectories. We take that correspondence by name from mechanics rather than re-deriving it, and use it as a compass: the eikonal is the optical action, the index is the optical momentum, and is the optical . From the eikonal equation we recover the ray equation, Snell's law, the law of reflection, and Fermat's stationary optical path — three faces of one limit. We also learn exactly where the ray picture must fail: at foci, edges, and caustics, where the amplitude varies on the scale of a wavelength and the neglected diffraction term roars back.
- Geometrical optics is the short-wavelength limit of wave optics. Insert into the Helmholtz equation and keep the leading power of : the phase obeys the eikonal equation .
- The eikonal is the optical path length; surfaces are wavefronts and their normals are the rays.
- Differentiating along a ray turns the eikonal equation into the ray equation — a Newton-like law with as the force, so rays bend toward higher index.
- Matching the tangential part of across an interface gives Snell's law and the law of reflection; the variational form of the same limit is Fermat's principle .
- The equation is formally the Hamilton–Jacobi equation of mechanics under the optical–mechanical analogy, so mirrors the classical limit — recalled by name from mechanics, not re-derived.
- The neglected term scales as ; geometrical optics fails near foci, caustics, and edges, where a predicted infinite intensity signals the breakdown.
- Key idea: write the field as and send ; the wave equation collapses to , whose constant-phase surfaces are wavefronts and whose normals are rays — geometrical optics is wave optics with the wavelength sent to zero.
Write a monochromatic field as and take the short-wavelength limit . The wave equation collapses to the eikonal equation : the eikonal is the optical path length, its level surfaces are the wavefronts, and their orthogonal trajectories are the rays. All of geometrical optics — the ray equation, Snell's law, Fermat's principle — is the leading term of this one limit.
Where this lives today
The eikonal equation is the quiet engine behind any computation that turns waves into rays. Every optical-design program traces rays by integrating the ray equation surface to surface, and the same equation — now with — is the basis of seismic travel-time tomography, imaging the Earth's interior from the least-time paths of earthquake waves, and of the fast-marching and level-set solvers that compute first-arrival times in ultrasound, sonar, and radar. In photonics the parabolic-profile result designs GRIN lenses, fibre collimators, and endoscope relays, while the mirage, the flattened setting Sun, and the day-lengthening horizon refraction are the atmosphere solving the same equation for free. Its deepest modern echo is conceptual: because the eikonal equation is the Hamilton–Jacobi equation in disguise, the WKB approximation of quantum mechanics — semiclassical quantization, tunnelling exponents, the classical limit itself — is the eikonal method wearing an instead of a , exactly the correspondence Hamilton foresaw and Schrödinger exploited.
The physical picture
Picture a wavefront as a rank of marchers, all abreast, and the eikonal as the distance each has marched measured in optical path. Where the index is larger the local phase speed is smaller, so that stretch of the rank lags and the front tilts. The marching direction — perpendicular to the front — is the ray, and it swings toward the slow, high-index side. That single sentence is the ray equation before any calculus.
The parameter that decides whether this cartoon is exact is the ratio of the wavelength to the scale over which the index or the amplitude changes. When , a single wavelength barely notices the variation: the wave marches locally like a plane wave with a well-defined direction, and geometry is exact. Diffraction is the leading correction, of relative size . Now the punchline — what the ray equation does when the index varies smoothly.
The graded core does with a smooth index what a lens does with curved glass: a ray launched off-axis is pulled back, overshoots, and oscillates, its path a sinusoid of pitch set entirely by the index profile. A collimated ray reaches the axis after a quarter pitch — the graded rod is a lens with flat faces. Mirages, the flattened setting Sun, and self-focusing fibres are all this one figure with a different gradient.
The core equations
The starting point is the wave equation for a single frequency. For a monochromatic field in a medium of slowly varying index , the vector wave equation reduces (component by component, when varies little over a wavelength) to the scalar Helmholtz equation:
where: — one Cartesian component of the complex field amplitude; — the vacuum wavenumber; — local refractive index. The whole content of monochromatic wave optics sits in ; geometrical optics is one limit of it. The controlled step is to separate the fast phase from the slow amplitude. Because the phase advances by every wavelength while the amplitude drifts on the scale , we posit the eikonal ansatz with and both real:
where: — real, slowly varying amplitude; — the real eikonal, an optical path length (units of metres). This is the optical version of the WKB ansatz of mechanics; the large parameter that will order the expansion is . Substituting into and demanding that the leading power of vanish gives the eikonal equation (Derivation 1):
where: — gradient of the eikonal, whose magnitude equals the local index. This first-order nonlinear equation for alone is geometrical optics: it contains no wavelength, which is exactly why the ray picture is scale-invariant and blind to diffraction. Its geometric content is read off directly. The ray direction is the unit normal to the wavefronts:
where: — unit tangent to the ray, perpendicular to the surfaces ; the normalization is just the eikonal equation divided by . Rays are the orthogonal trajectories of the wavefronts. Differentiating along the ray converts the algebra of into the ray equation (Derivation 2), a second-order law of motion for the ray path :
where: — arc length along the ray; ; — the index gradient, playing the role of a force. Set and rays are straight; let vary and rays curve toward higher index. The next power of — the term we dropped — is not zero but small; setting it to zero gives the transport equation , which says the energy flux is conserved within a tube of rays. It is the first correction, and its blow-up at a focus is the tell-tale that geometry is failing there. Finally, integrating along a ray shows the eikonal difference is the optical path length, so — Fermat's principle — is the variational shadow of the eikonal equation. This family of ideas is not confined to optics, and the link is exact rather than poetic. Under the optical–mechanical analogy, the refractive index plays the role a particle's momentum plays in mechanics and an optical ray maps onto a mechanical trajectory; the eikonal is the optical twin of Hamilton's principal function, so the eikonal equation is precisely the geometrical-optics image of the Hamilton–Jacobi equation. Both limits hold for one and the same reason: geometrical optics is the short-wavelength limit of wave optics exactly as classical mechanics is the classical () limit of quantum mechanics — the content of the WKB / eikonal connection. We take these three statements by name from mechanics and do not re-derive them here.
This is the structural heart of the article: we extract geometrical optics from wave optics by inserting the eikonal ansatz into the Helmholtz equation and keeping only the leading power of the large wavenumber . The strategy is a bookkeeping one — compute the Laplacian of , sort the resulting terms into powers , , , and recognise that as the term alone must balance the source term . That balance is a statement about the phase only, and it is the eikonal equation.
Step 1. Take the gradient of the ansatz : . Why the two pieces: the amplitude gradient is , but differentiating the phase pulls down a factor , so the second piece is — the phase dominates the derivative.
Step 2. Take the divergence for the Laplacian, keeping every term: . Why four terms: each differentiation either hits (no factor) or the phase (a factor ), giving orders , , , and respectively.
Step 3. Substitute into the Helmholtz equation and cancel the common : . Why split real and imaginary: and are real, so the real part (the and terms) and the imaginary part (the terms) must each vanish separately.
Step 4. Collect the leading real part, : , and divide by to get . Why this is the leading balance: the dropped term is smaller than by , so in the limit the eikonal equation is exact; the imaginary part gives the transport equation, and is the diffraction correction. *Verified in verify_eikonal-equation.py: sympy inserts symbolically, confirms the real coefficient is and the imaginary coefficient is the transport combination ; a 1-D check gives .*
Go deeper · Derivation B · 1 minThe ray equation from the eikonal equation
Having the phase law , we now derive how the ray itself curves. The strategy is to differentiate the ray-direction relation with respect to arc length, use the fact that a gradient field is curl-free, and apply the eikonal equation once more to turn the right-hand side into . The outcome is a Newton-like equation with the index gradient as the force — the equation every ray-tracer integrates.
Step 1. Start from the ray-direction relation , true because . Why this is the launch point: it expresses the ray's tangent purely in terms of the eikonal, so its arc-length derivative will involve only and .
Step 2. Differentiate along the ray using : . Why the chain rule takes this form: moving along the ray by advances position by , so the directional derivative is , and .
Step 3. Use the vector identity valid for a curl-free field (since ): the right-hand side becomes . Why curl-free matters: the identity needs ; is a gradient, so its curl vanishes automatically, and the awkward advective term collapses to a plain gradient.
Step 4. Apply the eikonal equation : . Hence . Why it reads as a force law: with as an optical potential, pushes the ray toward higher index — the mechanism of mirages, GRIN lenses, and atmospheric bending. *Verified in verify_eikonal-equation.py: sympy checks for a sample curl-free field, and reduces the ray equation to for the parabolic GRIN profile, giving a sinusoid of pitch .*
Go deeper · Derivation C · 1 minSnell's law from continuity of the tangential eikonal
Geometry at a sharp interface should also fall out of the eikonal picture, and it does — from a single continuity requirement. The strategy: at a plane boundary between two media the phase, and hence the tangential component of , cannot jump (a discontinuity would mean the field is many-valued along the surface). Since , the tangential component is , and equating it on the two sides is Snell's law. Reflection is the same statement on the incident-medium branch.
Step 1. Impose continuity of the tangential part of across the surface: is the same on both sides. Why it must be continuous: is single-valued and continuous along the interface, so its surface-tangential derivative — the tangential — is fixed by that shared boundary value; only the normal part may jump.
Step 2. Resolve into normal and tangential parts. With from the eikonal equation and the angle between the ray and the surface normal, the tangential magnitude is . Why the sine appears: the tangential projection of a vector of length making angle with the normal is .
Step 3. Equate the two sides: — Snell's law. Taking both rays in the incident medium () with the normal component reversed gives , the law of reflection. Why the normal jump is allowed: it carries the change of ray direction; only the tangential part is pinned, and that pinning is exactly the refraction law. *Verified in verify_eikonal-equation.py: for , , the matched tangential eikonal gives with ; the reflection branch returns .*
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| homogeneous medium, | rays are straight lines; wavefronts are planes or spheres — rectilinear propagation | |
| weak linear gradient | , radius | rays curve toward higher with radius — mirages, GRIN fibres, atmospheric refraction |
| parabolic GRIN, | , pitch | sinusoidal rays; a flat-faced rod focuses at the quarter pitch |
| sharp interface, discontinuous | matching tangential gives Snell's law and | |
| (focus, edge, caustic) | dropped term not small | diffraction must be restored; predicted infinite intensity at a focus is the failure flag |
Worked examples
1 · A graded-index rod as a flat lens (confidence builder)
A GRIN rod has index profile with and gradient constant . Find the ray pitch, the length that focuses collimated light, and the axial crossing of a ray launched parallel to the axis at height .
Step 1. In the paraxial regime the ray equation with this profile becomes (the transverse index gradient is , and along the axis). This is simple harmonic motion in , so every ray is a sinusoid.
Step 2. The spatial period — the full pitch — is . A ray completes one oscillation in one pitch, independent of its launch height (to this order).
Step 3. A ray entering parallel to the axis at follows . It first crosses the axis when , i.e. at the quarter pitch : a rod cut to this length turns a bundle of parallel rays into a point, focusing with two flat faces.
Step 4. The launch height sets only the amplitude, not the focus: all parallel rays cross at , which is what makes the GRIN rod a genuine lens. A 3.14 mm rod of this glass is an -flat imaging element, the workhorse of endoscope relays and fibre collimators.
2 · Why the horizon Sun sits higher than it should (exam level)
Near the ground the air's index falls with height at roughly . Estimate the radius of curvature of a horizontal ray and compare it with the Earth's radius; comment on the horizon refraction of .
Step 1. For a nearly horizontal ray the index gradient is essentially vertical, perpendicular to the ray, so the ray equation gives a radius of curvature . With , .
Step 2. Compare with the Earth's radius : the ray's curvature radius is — the ray bends with about four times the Earth's radius, curving gently around the planet. This is the surveyor's and radio engineer's "four-thirds Earth," since the effective Earth radius is .
Step 3. Because the ray curves the same way as the surface, light from just below the geometric horizon is bent back to the eye: objects appear lifted. Integrated over the whole atmosphere this raises the apparent position of a body at the horizon by the standard astronomical refraction of about — a bit more than the Sun's own diameter.
Step 4. The everyday consequence: when you watch the Sun's lower limb touch the horizon, the true Sun is already entirely below it. The same ray-equation bending flattens the setting Sun's disk and lengthens the day by a couple of minutes at each end.
Physics of the portrait
The eikonal equation is the centrepiece of a program one man built almost single-handed: the reduction of both optics and mechanics to a single geometry of "characteristic functions." That man measured optical systems by a single function whose gradients are the rays, and then found the very same mathematics waiting in dynamics.
Origins · 1 minWilliam Rowan Hamilton and how this was discovered
Hamilton was a prodigy — reading Greek at five, appointed Royal Astronomer of Ireland and Andrews Professor at Trinity College Dublin while still an undergraduate. His Theory of Systems of Rays (1828, with supplements to 1837) recast geometrical optics around a single characteristic (eikonal) function whose partial derivatives yield every ray of a system; from it he predicted conical refraction in biaxial crystals in 1832, a startling effect confirmed by Humphrey Lloyd within months — one of the first triumphs of a purely theoretical prediction in optics. Hamilton then carried the identical mathematics into dynamics, producing the Hamilton–Jacobi equation and the formulation of mechanics that bears his name, and stating explicitly that optics and mechanics are one variational subject. It was this optical–mechanical analogy that Schrödinger, a century later, ran in reverse — guessing wave mechanics from ray mechanics — so the eikonal equation is a direct ancestor of the Schrödinger equation. Hamilton's later years were consumed by the quaternions; the ray function that opened his career remains the cleaner monument.
Going further
Texts. Born & Wolf, Principles of Optics, 7th ed., §3.1–3.2 (the eikonal and geometrical optics) · Hecht, Optics, 5th ed., §4.2 and §3.5.2 · Saleh & Teich, Fundamentals of Photonics, 3rd ed., §1.2 (eikonal and ray equations) · Goodman, Introduction to Fourier Optics, 3rd ed. (WKB limit of scalar diffraction) · Landau & Lifshitz, Classical Theory of Fields, §53 (geometrical optics and the eikonal).
Provenance. The eikonal equation , the ray equation , and the transport equation are standard (Born & Wolf §3.1–3.2; Saleh & Teich §1.2). verify_eikonal-equation.py reproduces: the symbolic balance and the transport combination from inserting ; the curl-free identity ; the GRIN reduction with pitch and quarter-pitch focus for ; the tangential-eikonal Snell match (); and the atmospheric ray-curvature radius . The optical–mechanical analogy, Hamilton–Jacobi identification, and WKB/ limit are recalled by name from aq-mech-optical-mechanical-analogy, aq-mech-hamilton-jacobi-equation, and aq-mech-wkb-eikonal-connection (grep-verified), not re-derived here. Atmospheric refraction and the "four-thirds Earth" are standard.
Builds on: Refractive Index and Optical Path Length · Ray Model of Light · Fermat's Principle of Least Time. Leads to: Snell's Law of Refraction · Law of Reflection · Refraction at a Spherical Surface · Dispersion and Prisms.
Is the eikonal S the same thing as the optical path length, or just proportional to it?
It is exactly the optical path length. Integrating the eikonal equation along a ray gives , so the accumulated eikonal between two points on a ray is the index-weighted distance — the same OPL that appears in Fermat's principle. That is why surfaces of constant are wavefronts (surfaces reached at the same phase) and why : moving one metre along the ray advances by metres of optical path. The phase of the wave is just .
How is the ray equation like Newton's second law?
Rewrite and read as an optical "potential": the left side is the rate of change of the ray's momentum-like quantity , and the right side is a force pushing toward higher index. In a uniform medium the force vanishes and rays go straight, like a free particle; in a gradient they accelerate transversely, curving toward high . This is not a loose analogy — under the optical–mechanical analogy the ray equation is literally the trajectory equation of a particle with in the role of momentum, which is why the same solver traces light rays and classical orbits.
Why do we drop the ∇²A term, and what is it physically?
Because it is smaller than the term we keep by the factor , where is the scale over which the amplitude varies. In the eikonal ansatz the phase carries a factor every time it is differentiated, so the phase-derivative terms dominate the amplitude-derivative terms whenever . The dropped term is the seed of diffraction: it is precisely what spreads a beam, fills in a shadow edge, and keeps the intensity finite at a focus. Restoring it is the business of physical optics; keeping only the leading term is geometrical optics.
Does the eikonal equation handle graded-index media, or only homogeneous ones and sharp interfaces?
Graded media are exactly where it shines. The ray equation holds for any smooth , and integrating it produces curved rays: parabolic index profiles give sinusoidal rays (GRIN fibres and rods), a vertical atmospheric gradient gives the mirage and horizon refraction, and a spherically symmetric gives the trajectories of light around gradient lenses. Sharp interfaces are the singular case, handled by matching the tangential eikonal (Snell's law); smooth gradients are the generic, and easier, case.
Where exactly does the wavelength re-enter if the eikonal equation has none?
Through the next terms in the expansion. The eikonal equation is scale-free, but the transport equation and, beyond it, the diffraction correction restore the wavelength: the size of a focal spot, the width of a diffraction fringe, and the angular spread of a beam all scale with . So a ray trace tells you where light goes to leading order, but the resolution limit, the Airy disk, and the depth of focus require the wave corrections. Practical design pairs ray tracing (geometry, aberrations) with wave optics (the diffraction limit near the focus).
Why is this called an "analogy" with mechanics if it is supposed to be exact?
"Analogy" is historical understatement. The eikonal equation has the identical mathematical form as the time-independent Hamilton–Jacobi equation , with the eikonal matching Hamilton's principal function , the index matching the momentum , and optical rays matching mechanical trajectories. The correspondence is a genuine isomorphism in the short-wave / classical limit, which is why the WKB method of quantum mechanics and the eikonal method of optics are the same technique. We recall the mechanics side by name (aq-mech-optical-mechanical-analogy, -hamilton-jacobi-equation, -wkb-eikonal-connection) rather than re-derive it, but the identity — not mere resemblance — is the point.