Fermat's Principle:Reflection
Fermat's Principle: Light follows the path of least time. The law of reflection can be derived from this principle as follows:
 | The pathlength L from A to B is Since the speed is constant, the minimum time path is simply the minimum distance path. This may be found by setting the derivative of L with respect to x equal to zero. |

This derivation makes use of the calculus of max-min determination, the derivative of a square root, and the definitions of the triangle trig functions.
Fermat's Principle and Refraction
Fermat's Principle: Light follows the path of least time. Snell's Law can be derived from this by setting the derivative of the time =0. It shows how the refraction of light at an interface depends upon the indices of refraction.
