Fermat's principle, also called the principle of least time, states that a light ray between fixed endpoints makes its optical path length stationary. For a curve , the optical path length is the functional
|
(1)
|
where
is the index of refraction and
is the arc length element.
In a stationary, isotropic, nondispersive medium the ray speed is
, where
is the speed of light in vacuum. The travel time is then
, so the two functionals
have the same stationary paths. If
is constant,
is proportional to arc length
and the ray is a straight line (Open University 2016, pp. 28-30).
Consider two uniform media separated by the x-axis, with indices of refraction and
. The two segments from fixed
points
and
to the crossing point
give
|
(2)
|
where
and
. For
, differentiating and
setting
gives
|
(3)
|
where
and
are the angles the two segments make with the normal to
the interface. This is Snell's law of refraction, which Fermat derived using this
principle (Andersen 1983).