A young child looked up in the sky,
And said, “It’s so blue, Mum, but why?”
You see, blue scatters more,
(There’s this power of 4),
So it rarely comes straight to your eye.
– Author unknown
Most of what is between us and space is air, which is made up of very small molecules. There are also varying amounts of other stuff – aerosols, dust, haze, clouds, smoke and so on.
The light from the sun has to pass through this “stuff” to get to the surface of the earth. But some of the light does not make it, or if it does arrive at the surface, it gets there indirectly.
Why? Because the light – or more accurately, part of the light – is scattered by “stuff” in the atmosphere.
Visible light is an electromagnetic wave of a rather narrow range of wavelengths (roughly 390-700 nanometres, where 1 nanometre is 1 billionth of a metre) in the complete spectrum. This electromagnetic spectrum spans the very long wavelengths of radio to the extremely short wavelengths of gamma rays.
Within the visible portion of the spectrum red light has a longer wavelength than blue – 650 nm vs 450 nm.
When light is scattered in the atmosphere, the amount of scatter and the angle by which it is scattered depend on the wavelength and the size of the scatterer.
If the scatterer’s size is significant compared to the wavelength of the light being scattered, the shape of the scatterer becomes important too.
Molecules are the smallest scatterers, being about a factor of 1,000 smaller than the wavelength of visible light. For these molecules – such as nitrogen gas (N2) which makes up 78% of the atmosphere – the dependence of scattering on wavelength goes as the inverse fourth power of wavelength.
That is, comparing blue to red, we take the wavelength ratio (650/450) and raise that to the fourth power to calculate how much more likely (4.3 times, as it turns out) it is blue will be scattered than the red.
If you look away from the sun, blue light travelling from the sun through the earth’s atmosphere (but not directly toward you) is scattered by the molecules toward your eye.
Thus the sky looks blue because scattering from molecules is much more probable for blue light than red.
There is so much blue light from any particular direction that it completely dominates the light from the stars, which is nonetheless still there.
If you get close enough to space, the sky is black (see image below). This is just because there is nothing significant up there that will scatter the sunlight to your eye.
Conversely, if you look through a clean atmosphere (i.e. with no dust or smoke) towards the sun, a significant amount of the blue light is scattered away from the line of sight, which tends to give the sun a yellowish hue.
This sort of scattering – when the scatterer is considerably smaller than the wavelength of the light – is usually called “Rayleigh scattering”, after the 19th century British physicist Lord Rayleigh.
Near sunset, the path sunlight takes on its way through the atmosphere to you is especially long. In this case, so much blue light is lost (i.e. scattered away) that the sun appears orange or even red (see image below).
The water droplets and ice crystals that make up clouds are quite large compared to the wavelength of visible light (at least 20 times greater). In this case the scattering of light is strong and nearly independent of wavelength, over the visible range at least.
Because nearly all wavelengths of visible light are scattered, clouds appear white, or varying shades of neutral grey if they are in the shadow of other clouds.