Let us consider two points A and B in space and the path taken by light from A to B. The length of the optical path from A to B is L.
Let p be a parameter defining the path from A to B with a small variation dp, A and B remaining the path extremes, and dL the variation induced from the optical path L.
Fermat's principle which imposes light to run an extremal to the optical path is expressed thus :