Choose the mirror as the line , the source as and the observer as , with positive heights. Within the plane of incidence, let the reflection point be . In a uniform medium the optical length is a constant index timesStationarity with respect to the point on the mirror givesThese two ratios are the sines of the angles to the normal, with the stationary point between the two projected endpoints. ThereforeThe angles lie in , where sine is injective. Varying a second tangential coordinate in three dimensions also enforces that the source, normal and reflected ray lie in one plane. This derives the law of reflection from Fermat principle.
The original PDF places both endpoints at height ; the vertically stacked fraction can be misread in extracted text. The coefficient in the index is , multiplying .
For the optical-length integrand , the Beltrami identity applies because there is no explicit dependence. It giveswhere is constant. Therefore . The full Euler-Lagrange equation is , and combining these gives . This also excludes a constant curve, which would satisfy the squared first integral but not the full variational equation. Integration yieldsEqual endpoint heights at require . The height condition then becomes , or . Its two positive roots are and . Hence the two possible stationary rays areBoth stay in , have the required endpoints and satisfy the variational equation. These are the two optical rays in a square-root refractive-index profile. Fermat stationarity supplies two rays; it does not assert that both globally minimize travel time.
The Fermat principle makes the optical path length stationary. For a graph the variational integrand isThe Euler-Lagrange equation isUse the chain rule and differentiate to obtainMultiplying through and combining the terms gives the required second-order ordinary differential equation with no derivatives in denominators:All partial derivatives of the refractive index are evaluated along the ray.
Take the fixed source and receiver to be and on the same side of the mirror, with . In the uniform medium, the Fermat principle minimizes the length through a reflection point :Its stationary equation isThe two fractions are the signed tangential components of the ray directions. Equality of their magnitudes gives , where both angles are measured from the normal vector to the mirror and lie in . Hence the law of reflection isFor uniqueness, differentiate once more:Thus is a strictly convex function, its derivative increases from to , and it has exactly one stationary point, its global minimum. Explicitly,Substitution gives , verifying the reflection angles and the existence of that unique solution. Equivalently it is the point where the line from to the mirror image crosses the mirror.
The Fermat principle states that the actual path of a light ray makes its travel time stationary under small admissible variations with fixed endpoints. Equivalently, its optical path length is stationary:where is the local light speed, is the refractive index, and the two integrals differ by the constant vacuum light speed. In a uniform medium this reduces to stationarity of geometric path length. The principle is a stationarity statement; for the planar reflection considered next the stationary path is also the unique minimum.
Fermat principle states that the optical path length , equivalently the travel time in the nondispersive stationary isotropic ray model, is stationary for the actual light ray between fixed endpoints. It need not be a minimum in every optical system.
For two homogeneous media separated by , place the fixed endpoints at and , with positive heights. If the ray crosses at , its optical path isStationarity with respect to the crossing point givesThe two fractions are and , with angles measured from the interface normal. Thuswhich is Snell's law. Dividing by the vacuum light speed gives the corresponding travel time; minimizing geometric distance without refractive-index weighting would incorrectly predict a straight ray through unlike media.
Ray in an exponential-speed medium 2026-10-13
For positive and light speed , the Fermat principle uses the time integrand . The Beltrami identity sets constant. Solving this first integral gives the displayed symmetric ray between when . Its travel time is . The ray's central height diverges as , while its travel time tends to .
For refractive index with , the optical-length integrand is . The Beltrami identity gives , while the full Euler-Lagrange equation gives . Together these yield the displayed parabolas and exclude a spurious constant solution of the squared first integral. Equal-height endpoints force and . There are two positive stationary rays for , one coalesced ray for , and none of this smooth family for . For , the two paths are and . Fermat principle requires stationary optical length, not a global minimum over every competing path.
For speed in , Fermat principle gives the elapsed-time integrand . Its symmetric stationary light rays through are the displayed catenaries. Set . The endpoint equation is . This function decreases and then increases, with unique minimum where . Thus above the minimum there are two stationary rays, at the minimum one, and below it none. The travel time on either ray is , and its minimum height is .
For and , one solution is , with . A second has , with . Hence these endpoints do not uniquely specify the ray. Stationarity is distinct from global minimization: paths descending almost to have limiting travel time , below either stationary value in this example.
Two stationary catenary rays connect the same endpoints
. For speed , the endpoints and admit stationary light rays with minimum heights and . Their different travel times illustrate that Fermat principle is a stationarity condition. Details. Variational principle Created 2026-10-20 Updated 2026-10-31
A variational principle specifies a function, path or field by requiring a functional to be stationary under an allowed class of variations. The admissible class includes the prescribed boundary conditions and constraints. A stationary value need not be a minimum: the Euler-Lagrange equation expresses the first-order stationarity condition, while a minimum requires additional analysis. Fermat principle applies this idea to optical path length, and the Rayleigh-Ritz method approximates a variational problem in a chosen family of trial functions.

