# Fermat's principle

Fermat's principle leads to Snell's law; when the sines of the angles in the different media are in the same proportion as the propagation velocities, the time to get from P to Q is minimized.

In optics, Fermat's principle or the principle of least time is the principle that the path taken between two points by a ray of light is the path that can be traversed in the least time. This principle is sometimes taken as the definition of a ray of light.[1] However, this version of the principle is not general; a more modern statement of the principle is that rays of light traverse the path of stationary optical length with respect to variations of the path.[2] In other words, a ray of light prefers the path such that there are other paths, arbitrarily nearby on either side, along which the ray would take almost exactly the same time to traverse.

Fermat's principle can be used to describe the properties of light rays reflected off mirrors, refracted through different media, or undergoing total internal reflection. It follows mathematically from Huygens' principle (at the limit of small wavelength). Fermat's text Analyse des réfractions exploits the technique of adequality to derive Snell's law of refraction[3] and the law of reflection.

Fermat's principle has the same form as Hamilton's principle and it is the basis of Hamiltonian optics.

## Modern version

The time T a point of the electromagnetic wave needs to cover a path between the points A and B is given by:

$T=\int_{\mathbf{t_0}}^{\mathbf{t_1}} \, dt = \frac{1}{c} \int_{\mathbf{t_0}}^{\mathbf{t_1}} \frac{c}{v} \frac{ds}{dt}\, dt = \frac{1}{c} \int_{\mathbf{A}}^{\mathbf{B}} n\, ds\$

c is the speed of light in vacuum, ds an infinitesimal displacement along the ray, v = ds/dt the speed of light in a medium and n = c/v the refractive index of that medium, $t_0$ is the starting time (the wave front is in A), $t_1$ is the arrival time at B. The optical path length of a ray from a point A to a point B is defined by:

$S=\int_{\mathbf{A}}^{\mathbf{B}} n\, ds\$

and it is related to the travel time by S = cT. The optical path length is a purely geometrical quantity since time is not considered in its calculation. An extremum in the light travel time between two points A and B is equivalent to an extremum of the optical path length between those two points. The historical form proposed by French mathematician Pierre de Fermat is incomplete. A complete modern statement of the variational Fermat principle is that

the optical length of the path followed by light between two fixed points, A and B, is an extremum. The optical length is defined as the physical length multiplied by the refractive index of the material."[4]

In the context of calculus of variations this can be written as

$\delta S= \delta\int_{\mathbf{A}}^{\mathbf{B}} n \, ds =0$

In general, the refractive index is a scalar field of position in space, that is, $n=n\left(x_1,x_2,x_3\right) \$ in 3D euclidean space. Assuming now that light has a component that travels along the x3 axis, the path of a light ray may be parametrized as $s=\left(x_1\left(x_3\right),x_2\left(x_3\right),x_3\right) \$ and

$nds=n \frac{\sqrt{dx_1^2+dx_2^2+dx_3^2}}{dx_3}dx_3=n \sqrt{1+\dot{x}_1^2+\dot{x}_2^2} \ dx_3$

where $\dot{x}_k=dx_k/dx_3$. The principle of Fermat can now be written as

$\delta S= \delta\int_{x_{3A}}^{x_{3B}} n\left(x_1,x_2,x_3\right) \sqrt{1+\dot{x}_1^2+\dot{x}_2^2}\, dx_3$
$= \delta\int_{x_{3A}}^{x_{3B}} L\left(x_1\left(x_3\right),x_2\left(x_3\right),\dot{x}_1\left(x_3\right),\dot{x}_2\left(x_3\right),x_3\right)\, dx_3=0$

which has the same form as Hamilton's principle but in which x3 takes the role of time in classical mechanics. Function $L\left(x_1,x_2,\dot{x}_1,\dot{x}_2,x_3\right)$ is the optical Lagrangian from which the Lagrangian and Hamiltonian (as in Hamiltonian mechanics) formulations of geometrical optics may be derived.[5]

## Derivation

Classically, Fermat's principle can be considered as a mathematical consequence of Huygens' principle. Indeed, of all secondary waves (along all possible paths) the waves with the extrema (stationary) paths contribute most due to constructive interference. Suppose that light waves propagate from A to B by all possible routes ABj, unrestricted initially by rules of geometrical or physical optics. The various optical paths ABj will vary by amounts greatly in excess of one wavelength, and so the waves arriving at B will have a large range of phases and will tend to interfere destructively. But if there is a shortest route AB0, and the optical path varies smoothly through it, then a considerable number of neighboring routes close to AB0 will have optical paths differing from AB0 by second-order amounts only and will therefore interfere constructively. Waves along and close to this shortest route will thus dominate and AB0 will be the route along which the light is seen to travel.[6]

Fermat's principle is the main principle of quantum electrodynamics which states that any particle (e.g. a photon or an electron) propagates over all available, unobstructed paths and that the interference, or superposition, of its wavefunction over all those paths at the point of observer gives the probability of detecting the particle at this point. Thus, because the extremal paths (shortest, longest, or stationary) cannot be completely canceled out, they contribute most to this interference.

In the classic mechanics of waves, Fermat's principle follows from the extremum principle of mechanics (see variational principle).

## History

Hero of Alexandria (Heron) (c. 60) described a principle of reflection, which stated that a ray of light that goes from point A to point B, suffering any number of reflections on flat mirrors, in the same medium, has a smaller path length than any nearby path.[7]

Ibn al-Haytham (Alhacen), in his Book of Optics (1021), expanded the principle to both reflection and refraction, and expressed an early version of the principle of least time. His experiments were based on earlier works on refraction carried out by the Greek scientist Ptolemy[8]

Pierre de Fermat

The generalized principle of least time in its modern form was stated by Fermat in a letter dated January 1, 1662, to Cureau de la Chambre.[9] It was met with objections made in May 1662 by Claude Clerselier, an expert in optics and leading spokesman for the Cartesians at that time. Amongst his objections, Clerselier states:

... The principle which you take as the basis for your proof, namely that Nature always acts by using the simplest and shortest paths, is merely a moral, and not a physical one. It is not, and cannot be, the cause of any effect in Nature

The original French, from Mahoney, is as follows:

Le principe que vous prenez pour fondement de votre démonstration, à savoir que la nature agit toujours par les voies les plus courtes et les plus simples, n’est qu’un principe moral et non point physique, qui n’est point et qui ne peut être la cause d’aucun effet de la nature.

Indeed Fermat's principle does not hold standing alone, we now know it can be derived from earlier principles such as Huygens' principle.
Historically, Fermat's principle has served as a guiding principle in the formulation of physical laws with the use of variational calculus (see Principle of least action).