text: As you know, Fermat's principle states that light always travels the path between points that requires the least amount of time.  Before Fermat, people believed that light always travels the shortest distance between points (Hero's principle I believe).  Hero's principle explains the law of reflection...that the angle of incidence=the angle of reflection, but it doesn't explain refraction.  As you're probably aware, refraction is the bending of light that occurs when light travels into different substances.  If Hero's princple were true, you wouldn't expect the light's path to bend.  Fermat realized that since light traveled different speeds in different substances, the path of least time would necessarily be a bent path.  Thus he came up with the idea that light always travels the path of shortest time between two points.  If you like, Fermat's principle can also be thought of as a consequence of Hamilton's principle and the therory of relativity.  I personally like to think of Hamilton's principle as a Fermatlike principle governing the motion of physical objects.  When veiwed quantum mechanically, Fermat's principle is kind of interesting...hence the other people's reference to Feynmann.