On a clear day, the sky looks blue so naturally that it is easy to forget it is a question at all. Sunlight itself looks white, and space is dark. So where does all that blue come from? The answer lies in how sunlight interacts with the air on its way to our eyes.

Sunlight is a mix of colors

White sunlight contains a whole range of colors, from red through orange, yellow, green, and blue to violet. You can see this when light passes through a prism or when a rainbow forms after rain. Each color corresponds to a different wavelength of light. Red has the longest wavelengths in the visible range, while blue and violet have shorter ones.

Air scatters short wavelengths more

As sunlight travels through the atmosphere, it meets countless tiny gas molecules, mostly nitrogen and oxygen. These molecules scatter some of the light in all directions. Importantly, they scatter shorter wavelengths much more strongly than longer ones. This effect is known as Rayleigh scattering, named after the British physicist Lord Rayleigh, who described it in the nineteenth century.

Because blue light is scattered far more than red light, blue reaches our eyes from every part of the sky, not just from the direction of the Sun. When you look up at any patch of a clear sky, you are seeing sunlight that has been bounced toward you by the air.

Then why not violet?

Violet light has even shorter wavelengths than blue, so it is scattered even more. Yet the sky does not look violet. There are a few reasons. Sunlight contains less violet than blue to begin with, some violet is absorbed high in the atmosphere, and human eyes are more sensitive to blue than to violet. The combination is what we perceive as sky blue.

Sunsets tell the same story

Near sunrise and sunset, sunlight reaches us at a low angle and has to pass through much more air. Along that longer path, much of the blue light is scattered out of the direct beam before it gets to us. What remains is richer in longer wavelengths, which is why the Sun and the clouds around it can glow orange and red in the evening.

A different sky elsewhere

The color of a sky depends on what light is passing through. On the Moon, which has almost no atmosphere, the sky looks black even in daytime. Images from the surface of Mars show a daytime sky with a dusty, butterscotch tone, because fine dust in its thin atmosphere scatters light differently.

So the blue above us is not paint on a dome. It is sunlight being gently redirected, again and again, by the air we breathe.