The white light from the sun is a mixture of
all colours of the rainbow. This was demonstrated by Isaac
Newton who used a prism to separate the different colours
and so form a spectrum. The colours of light are distinguished
by their different wavelengths. The visible part of the spectrum
ranges from red light with a wavelength of about 750 nm to
violet with a wavelength of about 380 nm with orange, yellow,
green, blue and indigo between.
A clear cloudless day-time sky is blue because
molecules in the air scatter blue light from the sun more
than they scatter red light. When we look toward the sun at
sunset we see red and orange colours because the blue light
has been scattered out and away from the line of sight.
In 1859 John Tyndall discovered that when light
passes through a clear fluid holding small particles in suspension,
the shorter blue wavelengths are scattered more strongly than
the red. This can be demonstrated by shining a beam of white
light through a tank of water with a little milk or soap mixed
in. From the side the beam can be seen by the blue light it
scatters, but the light seen directly from the end is reddened
after it has passed through the tank. This is most correctly
called the Tyndall effect or Rayleigh scattering after Lord
Rayleigh who studied it in more detail a few years later.
He showed that the amount of light scattered is inversely
proportional to the fourth power of wavelength for sufficiently
small particles. It follows that blue light is scattered more
than red light by a factor of (700/400)4 ~= 10.
When you look up into the sky in
a direction that is not the sun, you see the scattered light,
which is predominently blue; hence you see a blue sky. If
you look towards the the west at sunset,(or toward the east
at sunrise, you are looking in a direction toward the sun
and are seeing light that has passed through a large distance
of air. Most of the blue light has been scattered by the air
between you and the sun. The light that survived this trip
through the air to you has had much of his components scattered
and is thus heavily weighted toward the red end of the spectrum;
as a result, you see the red and orange colors of the sunset.
However, a blue sky is seen by someone to your west for whom
it is still a quarter hour before sunset.