It is one of the first science questions children ask, and one of the few with an answer that is both simple and complete. The blue of a midday sky and the red of a sunset come from exactly the same effect.
Sunlight is a mixture
Sunlight looks white, but it is a mixture of all the colours of the rainbow, each with a different wavelength. Violet and blue light have short wavelengths. Orange and red light have long ones.
Air scatters short wavelengths more
As sunlight passes through the atmosphere, it runs into nitrogen and oxygen molecules, which are far smaller than the wavelength of visible light. When light meets particles that small, some of it is bounced off in all directions. This is called Rayleigh scattering, after the British physicist Lord Rayleigh, who worked out the maths in the 1870s.
The key result is that scattering gets much stronger as the wavelength gets shorter. Blue light is scattered several times more than red light.
So when you look at any part of the sky away from the sun, you are seeing sunlight that has been knocked sideways towards your eyes by air molecules, and that light is mostly the blue part of the spectrum.
Then why isn’t the sky violet?
Violet light is scattered even more than blue, so this is a fair question. There are three reasons:
- Sunlight contains less violet than blue to begin with.
- Some violet light is absorbed high in the atmosphere.
- Our eyes are much more sensitive to blue than to violet.
Put together, the sky looks blue to us, even though a lot of violet is up there too.
Sunsets: the long way through
At midday, sunlight takes a fairly short path through the atmosphere to reach you. At sunrise and sunset, the sun is low, and its light has to cross a much thicker layer of air.
Along that long path, most of the blue light is scattered away before it reaches you. What is left in the direct beam is mainly orange and red. That is the colour of the sun itself at sunset, and of the clouds it lights up.
Dust, smoke and tiny droplets in the air can make sunsets even more vivid, or dull and hazy, depending on their size. After large volcanic eruptions, people around the world have reported unusually deep red sunsets for months.
The same effect, elsewhere
Rayleigh scattering is also why distant mountains look blue, and why a glass of water with a few drops of milk in it can look slightly blue from the side and orange when you look through it at a lamp.
On Mars, where the thin air is full of fine reddish dust, the pattern is reversed: the daytime sky looks butterscotch, and sunsets have a bluish glow around the sun.
The next time you watch a sunset, you are watching the blue light that was taken out of it, now colouring someone else’s afternoon sky.