# Fermat's Principle and Snell's Law

Fermat's Principle and Snell's Law

Fermat's principle states that light travels between two points in such a way that the total time traveled is a minimum. Since light travels at different speeds through different media, the path of least time may not be a straight line. In particular, light travels a longer distance in the medium in which it has a higher speed. You can find the path followed by the light ray by dragging the point on the boundary between the two media so as to minimize the total time + traveled. At this minimum, sin()=sin(), as predicted by Snell's law.

t

1

t

2

n

1

θ

1

n

2

θ

2