Snell's law
Snell's law is a formula used to describe the relationship between the angles of incidence and refraction, when referring to light or other waves passing through a boundary between two different isotropic media, such as water, glass, or air.
It is also of importance in some optimization problems. For example, a lifeguard running to save a drowning person in the ocean will take a path that follows Snell's law. If the lifeguard can run at speed on the beach, and swim at speed in the ocean, then the angle at which the lifeguard enters the ocean (the angle of incidence) and the angle at which the lifeguard swims towards the drowning person (the angle of refraction) satisfies Snell's law if he takes the shortest possible path:
Insight: If Snell's law gives an undefined result (perhaps because of a domain error for ), that means the light wouldn't be refracted, but reflected instead. In terms of optimization, this means that the given scenario is not optimal.

