Different materials have different densities. Light waves may change direction at the boundary between two transparent materials. Refraction is the change in direction of a wave at such a boundary.
It is important to be able to draw ray diagrams to show the refraction of a wave at a boundary.
Refraction can cause optical illusions as the light waves appear to come from a different position to their actual source.
Water waves will change direction at a boundary between deep and shallow water.
The waves slow down as they enter the shallow water which causes the wavelengths to shorten.
Glass is denser than air, so a light ray passing from air into glass slows down. If the ray meets the boundary at an angle to the normal, it bends towards the normal.
The reverse is also true. A light ray speeds up as it passes from glass into air, and bends away from the normal by the same angle.
wave speed = frequency × wavelength
So if a wave slows down, its wavelength will decrease. The effect of this can be shown using wave front diagrams, like the one below. The diagram shows that as a wave travels into a denser medium, such as water, it slows down and the wavelength decreases. Although the wave slows down, its frequency remains the same, due to the fact that its wavelength is shorter.
In this diagram, the right hand side of the incoming wave slows down before the left hand side does. This causes the wave to change direction.