When light propagates from air into glass or from glass in to air it may change its direction of travel. Snell's law reveals the relationship between the directions of travel in the two media.
n1sinθ1 = n2sinθ2
Consider light propagating in glass with index of refraction n1 = 1.5 towards a glass-air boundary. If the angle the light makes with the normal to the boundary in the glass is θ1, then the angle it makes in the air is given by
sinθ2 = (n1/n2)sinθ1 = 1.5 sinθ1.
If sinθ1 > (1/1.5) = 2/3, or θ1 > 41.8o, then sinθ2 is greater than 1 and there is no solution for θ2. The angle θc for which sinθc = n2/n1 is called the critical angle. For angles greater than the critical angle there exists no solution for θ2, and there is no refracted ray. The incident light is totally reflected, obeying the law of reflection. If n2 = 1.5 and n1 = 1 then the critical angle is θc = 41.8o.
Total internal reflection occurs only if light travels from a medium of high index of refraction to a medium of low index of refraction. Let light travel from medium 1 into medium 2 and let n1 > n2. Then the critical angle θc is given by
sinθc = n2/n1
For angles greater than the critical angle the incident light is totally reflected, obeying the law of reflection.