The question of why the sky is blue is one of the most frequently asked by children, and the answer involves a very elegant physics of light. Sunlight appears white because it contains all the colors in the spectrum โ from red to violet. When this light enters Earth's atmosphere, it collides with gas molecules such as nitrogen and oxygen.
These air molecules scatter light in a phenomenon called Rayleigh scattering, named after Lord Rayleigh who explained it in the 19th century. The special feature of Rayleigh scattering is that it is much stronger for light with short wavelengths (blue and violet) compared to light with long wavelengths (red and orange). Quantitatively, the intensity of scattering is inversely proportional to the fourth power of the wavelength โ meaning blue light (wavelength ~450nm) is scattered about ten times more strongly than red light (wavelength ~700nm).
So why does the sky appear blue and not violet? Actually, violet light is scattered more strongly than blue light. However, there are two reasons why the sky appears blue: first, the Sun produces more blue light than violet; second, the human eye is more sensitive to blue than to violet.
The same phenomenon explains why the sky appears red and orange during sunrise and sunset. When the Sun is low on the horizon, its light has to pass through a much thicker layer of the atmosphere. The blue light is scattered away during this journey, leaving only the red and orange light that reaches our eyes.
