Voiceover: Check out this ray of light.
When it enters a new medium, like water,
its path will bend, and the larger the index of refraction
of the new medium, the more the light will bend
from its initial direction that it had in the air.
This follows from Snell's Law,
since if the index of refraction is larger,
the angle of the refracted light must be smaller,
and in order to have a smaller angle from the normal line,
the light ray has to bend more from its initial direction.
But here's the interesting thing,
when you send in white light,
composed of all visible wave lengths,
the colors will disperse and get separated from each other.
We call this separation of light, dispersion.
So, why does dispersion happen?
The reason for dispersion is that the index of refraction
for water and most other materials are actually
a function of the wavelength of the light.
For instance, if you ask a physicist,
or look up the index of refraction of water,
most sources would say the index of refraction of water
is 1.33, but what those sources or physicists
really mean is that the index of refraction
is pretty much 1.33 for the entire visible range
of wavelengths; however, each visible wavelength
has a slightly different index of refraction in water.
The index of refraction of red light in water
is about 1.33, but the index of refraction
of blue light is closer to about 1.34.
In fact, for most materials the smaller the wavelength
of the light, the larger the index of refraction,
which means smaller wavelength light will bend more
than larger wavelength light will in most materials.
This is why in water the violet light would bend the most,
since it has the smallest wavelength for visible light.
Blue light would bend slightly less,
green light a little less,
yellow light a little less than that,
orange light even less,
and red light would bend the least.
So, remember, dispersion and the rainbow patterns
that emerge result from the fact that
most materials have an index of refraction
that's a function of the wavelength of the light,
and in most materials, the smaller the wavelength,
the more the light will bend.