Derivation from Fermat's principle[edit]
Snell's law can be derived from Fermat's principle, which states that the light travels the path which takes the least time. By taking the derivative of the optical path length, the stationary point is found giving the path taken by the light (though the result does not show light taking the least time path, but rather one that is stationary with respect to small variations as there are cases where light actually takes the greatest time path, as in a spherical mirror). In a classic analogy, the area of lower refractive index is replaced by a beach, the area of higher refractive index by the sea, and the fastest way for a rescuer on the beach to get to a drowning person in the sea is to run along a path that follows Snell's law.
As shown in the figure to the right, assume the refractive index of medium 1 and medium 2 are and respectively. Light enters medium 2 from medium 1 via point O.
is the angle of incidence, is the angle of refraction.
The traveling velocities of light in medium 1 and medium 2 are
- and
- respectively.
is the speed of light in vacuum.
Let T be the time required for the light to travel from point Q to point P.
To minimize it, one can differentiate :
- (stationary point)
Note that
and
Therefore,