The idea: slower light, shorter waves

Light is a wave (see Electromagnetic Waves). In empty space it travels at c = 3.00 × 10⁸ m/s; in water, glass or diamond it is slower. The refractive index n says by how much:

v = c / n        λ = λ₀ / n        f stays the same

The frequency cannot change at the boundary: the wave on one side drives the wave on the other, crest for crest. Slower light with the same frequency must have shorter waves. Orange light with λ₀ = 600 nm in air has λ = 451 nm in water and 248 nm in diamond. The canvas draws one blue line per crest, so you can see the crests crowd together below the boundary.

Crests of a wave in air hit a boundary with water at 45 degrees. Below the boundary the crests are closer together and the wave travels at 32 degrees from the normal. The crest spacing d along the boundary is the same on both sides
The crests stay joined at the boundary; shorter waves below means a smaller angle.

Why it bends: Snell's law from matching crests

Take two neighbouring crests. They hit the boundary a distance d apart. In medium 1 they are one wavelength λ₁ apart, measured at right angles to the crests, and the right triangle between them gives λ₁ = d·sin θ₁. Below the boundary the same two crests are λ₂ apart, so λ₂ = d·sin θ₂. Divide one by the other:

sin θ₁ / sin θ₂ = λ₁ / λ₂ = (λ₀/n₁) / (λ₀/n₂) = n₂ / n₁

n₁ sin θ₁ = n₂ sin θ₂        (Snell's law)

Demo 2: why it bends draws the two triangles in green and plays a period: d slides along the boundary, but the triangles keep their shape.

Toward or away from the normal

The normal is the line at right angles to the boundary, and the angles are measured from it. Into a slower medium (n₂ > n₁) the wave turns toward the normal; into a faster one it turns away. Straight in (θ₁ = 0) it does not bend at all, it only slows down and its wavelength shrinks (Demo 3).

Mediumnv (10⁸ m/s)λ of 600 nm lightθ₂ for θ₁ = 45° from air
air1.003.00600 nm45.0°
water1.332.25451 nm32.1°
glass1.502.00400 nm28.1°
diamond2.421.24248 nm17.0°

Total internal reflection and the critical angle

Going from glass into air, sin θ₂ = 1.5·sin θ₁ grows faster than sin θ₁. At θ₁ = 41.8° it reaches 1: the refracted wave skims along the boundary. Past that critical angle θc = arcsin(n₂/n₁) no refracted wave fits at all, and every bit of the light is reflected back: total internal reflection (Demo 6). Optical fibres trap light this way over thousands of kilometres, and a diamond's small critical angle (24.4°) is why it sparkles.

Three drawings of light going from glass into air. At 30 degrees it refracts out at 48.6 degrees. At the critical angle 41.8 degrees it skims along the boundary at 90 degrees. At 50 degrees it is all reflected
Glass → air: below 41.8° the light gets out; above it, all of it bounces back.

How much is reflected

Even when the light gets through, a little bounces off. The Fresnel equations give the fraction R; the page averages the two polarizations, as for sunlight or a lamp. Head-on, air → water reflects 2% and air → glass 4%, which is why you see faint reflections in a window. Toward grazing incidence R climbs to 100% (Demo 7): a lake at sunset is a mirror.

The reflected fraction R against the angle theta 1 from 0 to 90 degrees. For air into glass it starts at 4 percent and rises to 100 percent at 90 degrees. For glass into air it starts at 4 percent and jumps to 100 percent at the critical angle 41.8 degrees
Reflected fraction: air → glass rises slowly to 100% at grazing; glass → air hits 100% at θc.

Where you meet it

What you seeWhy
A straw looks broken in a glass of waterLight from the straw bends away from the normal leaving the water
Lenses and glasses focus lightA curved surface bends each ray by a different amount (see Lens Ray Diagrams)
Optical fibresTotal internal reflection keeps the light in the glass core
Diamonds sparklen = 2.42: small critical angle, most light bounces around inside before it leaves
Rainbows and prismsn is slightly larger for blue than for red, so colours bend by different amounts
Mirages over hot roadsHot air has a lower n; light curving through it is turned back up

What the page leaves out

Dispersion (n depends on the colour, which splits white light), absorption, curved boundaries, the evanescent wave that leaks a short way into medium 2 during total internal reflection, the phase shifts on reflection, and the different reflection of the two polarizations (Brewster's angle, where one of them is not reflected at all). Reflected crests are drawn only for total internal reflection, to keep the picture readable.