← All lessons

Fermat's principle

Every line below is a path light could take from A to B. Change the indices and watch which one takes the least time.

Upper medium n₁
Lower medium n₂

Drag A, B or the white diamond on the interface to try your own path.

How this works

Travel time of a patht = (n₁L₁ + n₂L₂) / c = OPL / c

L₁ and L₂ are the lengths of the path in each medium.

Least time gives Snell's lawdt/dx = 0 → n₁ sin θ₁ = n₂ sin θ₂

x is where the path crosses the interface.