Why Is the Sky Blue?

The sky is blue because nitrogen and oxygen molecules in the air scatter short blue wavelengths much more strongly than long red ones. Blue light is redirected in all directions, so it reaches your eyes from every part of the sky. Sunsets look red because the Sun's light crosses a longer stretch of air, which scatters the blue out of the direct beam.
In this explainer +
Look up on a cloudless day. What you're seeing took four steps to get to your eyes, and you can walk through them in under a minute.
Step one: sunlight holds every visible color. Step two: a prism can spread that white light into a rainbow. Step three: the tiny molecules in the air redirect the short blue wavelengths far more than the long red ones. Step four: that redirected blue arrives at your eyes from every direction at once, so the whole sky glows with it.
The answer, in one sentence: the sky is blue because tiny nitrogen and oxygen molecules scatter short blue wavelengths much more strongly than red, so blue light reaches you from all across the sky. Physicists call this Rayleigh scattering, and NASA's Space Place describes it the same way.
The sunset follows from the same rule. Over a much longer path through the air, the blue leaves the direct beam, and orange and red are what remain.
What the air does to sunlight
Sunlight looks white, but it carries every visible color. A prism proves it by spreading a white beam into a rainbow.
When that light enters the atmosphere, it meets molecules, mostly nitrogen and oxygen. They are tiny. They don't block the light so much as knock it sideways. NASA's tour of the electromagnetic spectrum describes the shorter blue wavelengths being redirected in many directions while more of the red light carries on forward.
Think of it like this: a pinball machine. Send a stream of balls through it, and the ones that get batted around by the bumpers end up flying off in every direction. The ones that slip through keep going straight. The air is the bumpers, blue is the ball that gets batted, and red mostly slips through.
That's why the blue seems to come from everywhere. Wherever you look, some blue has been bounced into the line between you and that patch of sky.
One limit is worth stating once. The sky is blue because of what happens in the air itself, not because it mirrors the ocean.

The two men who worked it out
The first name is John Tyndall. In January 1859, he began studying the radiative properties of gases, meaning how gases absorb and pass along radiant heat. His main subjects were water vapor, carbon dioxide and ozone, according to NASA's Earth Observatory.
Then he turned to light. In the 1860s, Tyndall ran experiments in which a beam of white light looked blue from the side and red at the far end when fine particles scattered it. The Royal Institution holds a blue-sky apparatus that it dates to 1869. Tyndall tied what he saw in the lab to the blue daytime sky and to red sunsets.
He got the effect right. He got the culprit only partly right. He thought dust or water vapor particles were responsible.
The second name is Lord Rayleigh, born John William Strutt. In 1871 he published “On the Light from the Sky, Its Polarization and Colour”, which gave the mathematics for scattering by particles much smaller than the wavelength of light. The journal record is in the Philosophical Magazine.
His result: the scattered intensity varies roughly with the inverse fourth power of wavelength. In other words, shorten the wavelength and the scattering climbs very fast. If one color's wavelength were half of another's, it would scatter about sixteen times as strongly. That is why short blue is thrown around so much more than long red.

Why sunsets turn red
When the Sun is overhead, its light crosses a fairly short path of air before it reaches you. Near the horizon, the path is much longer.
Along that longer path, blue and violet get scattered out of the direct beam. More of the yellow, orange and red stays on the straight route to your eyes, so the setting Sun and the sky near it look orange or red. NASA's Space Place gives this account.
Dust, smoke, pollution and volcanic particles can intensify or change those colors, as NASA's Earth Observatory notes in its page on light scattering. The same rule applies; the particles just change what is left in the beam.
Mars shows what a different atmosphere does. It has a thin carbon dioxide atmosphere with fine dust, and NASA Science says the daytime sky there generally looks orange or reddish. Near sunset, the sky around the Sun can look blue or blue-gray. Fine dust lets blue light through more efficiently and keeps it concentrated near the Sun, while yellow and red light spread across the rest of the sky.
Spirit, Curiosity, InSight, Perseverance and Mars Pathfinder have all photographed Martian sunrises and sunsets. Photo color depends on camera calibration and filters, so a photo is not identical to what unaided eyes would see. NASA/JPL's color variations in the sky at sunset is one example.

Two follow-up questions
Two natural next questions are about violet and about the rest of the world.
1. Why isn't the sky violet?
Violet has an even shorter wavelength than blue, so it scatters even more. The sky still looks blue for three reasons: sunlight holds less violet than blue, some violet is absorbed high in the atmosphere, and human eyes are much more sensitive to blue than to violet. The astronomers at UNAM's Institute of Astronomy in Mexico lay out the same explanation.
2. Is the sky blue the same way everywhere?
The physics is the same worldwide, because it depends on sunlight passing through Earth's atmosphere. What shifts is the shade. Altitude, humidity, dust, smoke, pollution and volcanic particles all change what a local sky looks like.
Astronomy educators in other countries give the same account. Spanish-language astronomy materials tied to CSIC and the Instituto de Astrofísica de Canarias explain the blue sky and the longer path at sunset. In Argentina, Gloria Dubner of CONICET and the Instituto de Astronomía y Física del Espacio makes the case in EXACTAmente No. 29: oxygen and nitrogen scatter blue and violet more strongly, and longer paths at sunrise and sunset leave red and yellow.

The record
| Date | What happened | Source |
|---|---|---|
| January 1859 | John Tyndall begins studying the radiative properties of gases | NASA Earth Observatory, "John Tyndall" |
| 1860s | Tyndall's light experiments show a white beam looking blue from the side and red at the far end when fine particles scatter it | Royal Institution, "John Tyndall's Blue Sky Apparatus" |
| 1869 | The date the Royal Institution gives for Tyndall's blue-sky apparatus | Royal Institution, "John Tyndall's Blue Sky Apparatus" |
| 1871 | Lord Rayleigh publishes "On the Light from the Sky, Its Polarization and Colour" | Huntington Library |
| 1871 | The Philosophical Magazine record for the same paper, which gives the math for particles much smaller than the wavelength of light | Taylor & Francis, Philosophical Magazine |
Questions people ask
Why does the sky look pale near the horizon? 01
Repeated scattering, humidity and larger particles mix more wavelengths together there. The mix of colors moves toward white, so the deep blue fades.
Why are clouds white? 02
Cloud droplets are much larger than air molecules. They scatter the visible colors more evenly, and an even mix of colors looks white.
Why is the sky black from the Moon or outer space? 03
There is no substantial atmosphere there to scatter sunlight across an observer's field of view. With nothing bouncing the blue around, the background looks black.
Why does the sky change color after volcanic eruptions, wildfires or dust storms? 04
Aerosols and fine particles add absorption and scattering beyond ordinary Rayleigh scattering. Sunset colors can come out more intense or different.
The line to repeat
Every part of this story comes back to one thing: the sky is a lot of air, and air scatters light.
Air scatters blue light in every direction, so the sky looks blue. At sunset the same scattering leaves red and orange in the direct beam.
Sources
- NASA Space Place, "Why Is the Sky Blue?"
- NASA, "Tour of the Electromagnetic Spectrum"
- NASA Earth Observatory, "John Tyndall"
- Royal Institution, "John Tyndall's Blue Sky Apparatus"
- J. W. Strutt, "On the Light from the Sky, Its Polarization and Colour," 1871, Huntington Library
- Philosophical Magazine record for Rayleigh's 1871 paper
- NASA Earth Observatory, "Crepuscular Rays and Light Scattering"
- NASA Science, "What Do Sunrises and Sunsets Look Like on Mars?"
- NASA/JPL, "Color Variations in the Sky at Sunset"
- Instituto de Astronomía, UNAM, "¿Por qué el cielo es azul?"
- Spanish-language NASE astronomy materials, CSIC, "Espectro Solar y Manchas Solares"
- Universidad de Buenos Aires, EXACTAmente No. 29


