Same physics, different geometry

The article on why the sky is blue covered Rayleigh scattering — how air molecules preferentially scatter short wavelengths. That's why the sky appears blue when you look up.

Sunsets are the same mechanism applied to a different geometry. When the sun is at the horizon, sunlight has to travel through much more atmosphere to reach you than when it's overhead. Over that long path, the short wavelengths get scattered out almost completely. What survives the journey is mostly long-wavelength red and orange light.

That's the entire explanation. The other articles in this cluster cover what waves are in general, the Doppler effect, and refraction in water.

The path length math

When the sun is directly overhead at noon, sunlight passes through approximately one atmosphere's worth of air to reach you. The atmosphere's effective thickness is a few hundred kilometers, but at this angle, you're looking through the minimum.

When the sun is near the horizon at sunset, sunlight passes through about 30 to 40 times as much air. The geometry is like looking sideways through a glass of water vs. straight down through it — the diagonal path is much longer.

In that long path, Rayleigh's 1/λ⁴ scattering removes light very effectively at short wavelengths. By the time the light reaches you, most of the blue has been scattered out, and the spectrum is dominated by the long-wavelength end — red and orange.

You can estimate this with rough numbers. If the noon atmosphere scatters out, say, 10% of the blue and 1% of the red, then after 30 atmospheres' worth, the blue is reduced by (0.9)³⁰ ≈ 4% (so 96% of original blue is gone), while the red is reduced by (0.99)³⁰ ≈ 74% (so only 26% of original red is gone). What's left reaching your eye is mostly red and orange — and that's what you perceive.

Where the scattered blue goes

That blue light isn't destroyed; it's just sent in all directions. The blues scatter sideways into the rest of the sky, which is why the sky away from the sun stays blue even at sunset.

If you stand looking due east during a sunset (sun behind you, to the west), the sky overhead and to the east is still blue. The sun's path takes the long route through the atmosphere; the scattered blue from that long route ends up illuminating the sky around it.

The horizon at sunset glows red in the direction of the sun. Look 90° away from the sun and the sky is still blueish. Look 180° away and it can sometimes appear pinkish (the "alpenglow" or "Belt of Venus" effect, when blue light scattered back from the upper atmosphere mixes with the long red wavelengths).

What changes the colour

Several factors modify the basic effect:

Air clarity. Cleaner air gives more "pure" red — short wavelengths scatter cleanly, leaving a clear orange-red residue. Dustier or smokier air spreads out the scattering more, giving more orange and pink.

Aerosol size. Different particle sizes scatter different wavelengths preferentially. Pure air molecules (very small) follow Rayleigh and give red. Larger particles (dust, water droplets) follow Mie scattering and give whiter or pinker hues. Sea spray, volcanic ash, smoke, and pollution all shift the mix.

Cloud cover. Underlit clouds reflect the long-wavelength sunset light from below, creating the spectacular pink and gold underbellies people photograph. Without clouds, sunsets are simpler but less dramatic.

Volcanic eruptions. When a major volcano erupts (Krakatoa 1883, Pinatubo 1991, the 2022 Hunga Tonga eruption), sulfate aerosols spread through the upper atmosphere globally and persist for months to years. They scatter green and yellow strongly, leaving sunsets noticeably more red than usual. Krakatoa's sunsets in the 1880s were so vivid they were mistaken for fires and panic-inducing.

Wildfire smoke. Like volcanic aerosols but regional and seasonal. The orange-red skies during major fire events in the western US, Australia, and Canada are wildfire smoke shifting the sunset spectrum dramatically.

The "green flash"

A rarer effect: just as the sun's upper rim sinks below the horizon (or just rises above), there's sometimes a brief flash of green light visible for a second or two. It's caused by atmospheric refraction (different wavelengths bend by different amounts) acting like a prism on the sun's image.

Conditions: clear air, unobstructed horizon (usually ocean), stable atmospheric layering. Most people never see one because the conditions are uncommon and the flash is brief. When you do see one, you remember it.

Why daytime "high in the atmosphere" is still blue

A surprising fact: even an airplane at 35,000 feet still has a blue sky above it. The atmosphere thins out, but it doesn't vanish. There's still enough air above the plane to scatter blue light, and enough below to scatter blue down to your eye. The blue gets deeper at high altitude (less air to make pale), but it's still blue.

Get high enough — say into the stratosphere at 30 km — and the air becomes thin enough that the sky overhead starts looking distinctly dark blue, even violet, even during day. Above 100 km, you're effectively in space and the sky is black.

The takeaway

Sunsets are red because of Rayleigh scattering acting over an unusually long atmospheric path. When the sun is near the horizon, sunlight travels through 30–40 times more air than at noon. The blue and green wavelengths get almost completely scattered out into the surrounding sky. What reaches your eye is the long-wavelength red and orange. The same 1/λ⁴ scattering law that makes the noon sky blue gives you red sunsets — same physics, different geometry. Volcanic ash, wildfire smoke, and atmospheric clarity all modulate the exact colors, which is why sunsets vary so dramatically.