Refraction is the bending of a light wave as it crosses the boundary between two different mediums. This is caused by the wave changing speed as it crosses into a different medium. The angle at which the light wave refracts away from the normal in the second medium can be found using Snell's Law, which states:
n1sin(θ1)=n2sin(θ2)
n1 is the index of refraction of the incident medium and n2 is the index of refraction of the refractive medium. Likewise, θ1 is the angle of incidence and θ2 is the angle of refraction.
Using simple logic, if n1 is bigger than n2 (for example, air and water have indices of refraction of 1 and 1.33), then θ1 has to be bigger than θ2. This means that θ2 will seemingly bend towards the normal (perpendicular axis to the border between the two mediums).
Snell's law (also known as the Snell–Descartes law and the law of refraction) 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.
This is a derivation of Snell's Law. We will derive the law using Fermat's Principle, which states that, when light travels from one point to another, it takes the path that requires the least amount of time.
Suppose that we have a linear, horizontal boundary between two media (the fact that it's horizontal doesn't matter; we are just assigning an orientation for convenience of terminology). The first medium has refractive index n1 and the second medium has refractive index n2. Point A lies in the first medium at a distance a from the boundary, and point B lies in the second medium at a distance b from the boundary. The horizontal separation between A and B is d.
Suppose that the light travels from A to B. It will travel in a straight line from A to a point X on the boundary and then travel in a straight line from X to B. The horizontal separation between A and X is x, so the horizontal separation between X and B is d−x. Let θ1 be the angle between segment AX and the normal to the boundary at X, and let θ2 be the angle between segment BX and the normal to the boundary at X.
We want to find the point X that minimizes the travel time T. The Pythagorean Theorem allows us to easily calculate T:
T=c/n1a2+x2+c/n2b2+(d−x)2T=c1(n1a2+x2+n2b2+(d−x)2)
For convenience, we will mininize f(x)=cT. Computing the derivative,
f′(x)=a2+x2n1x−b2+(d−x)2n2(d−x)f′(x)=n1sinθ1−n2sinθ2
Setting the derivative equal to 0, we get:
n1sinθ1=n2sinθ2.
To confirm that this is indeed a minimum, we can see that decreasing x decreases sinθ1 and increases sinθ2, and increasing x does the opposite. Thus, f′(x)<0 when x is less than the desired value and f′(x)>0 when x is more than the desired value.
It follows that light takes the minimum time to travel from A to B if and only if:
n1sinθ1=n2sinθ2.
Thus, by Fermat's Principle, light will travel in a path that satisfies this equation. Thsi is called Snell's Law.