"Daddy, why is the sky blue?"
"For the same reason the sunset is red, and we had a blood moon the other night, Little One."
It is not, as I used to think, a result of air pollution.
The sun gives off the full rainbow* of colors that mix to make what we call "white." Those colors--red, orange, yellow, green, blue, and violet--differ from one another in wavelength. Visible light of the longest waves we see as red, while orange, yellow, etc., are progressively shorter wave, and violet light has the shortest waves of all. Earth's atmosphere, made predominantly of nitrogen and oxygen gas, is fairly transparent to all of these wavelengths. They shine through air like it was glass.
However a funny thing happens with light waves that have wavelengths similar in size to molecules in the air. This is true of light nearer the violet end of the spectrum. When these rays encounter molecules they sometimes scatter in random directions, so that the sky glows blue.
Blue sky is visible wherever sunlight shines through air and scatters to our eyes. But a byproduct of this scattering is only obvious** when the sun is low in the sky: reddened sunsets and sunrises. At low angles sunlight is skimming through so much of the atmosphere that the bluer wavelengths lost to scattering leave the remaining light noticeably red.
Now you have the ingredients for a gorgeous sunset. Anything lighted by sky-glow will be blue, while anything lighted by direct sun will be red, and these colors will grow more intense as the sun drops lower in the sky so its light passes through more air, scattering more blue.
What of the "blood moon" of the the recent lunar eclipse? In a lunar eclipse, the moon passes through Earth's shadow. In space, unlike on Earth, shadows are typically totally dark, since there isn't a lot of reflected light around to lighten them. So why was the shadowed moon visible at all?
The edges of Earth's atmosphere curve to form a sort of lens; sunlight skimming this edge is bent (refracted) inward, into the shadow, to light the dark face of the moon. And of course with much of the blue light light scattered out of it, that light is sunset-red, resulting in the poetic blood moon.
Learn more at Science Made Simple.
Nice graphic showing earth's shadow lighted by reddened sunlight.
[A model like this usually only explains one thing; "truth" otherwise goes by the boards.
It's fun to critique such models: how many things does this one get "wrong?"***]
(image from blogs.jccc.edu)
Informal shot through a small telescope soon after the moon
began to emerge from Earth's shadow. 11:28pm, 9/27/15
With the all but gone, only clouds a little bit "round the bend" are still pink with direct light.
Nearer clouds are lit only by fading sky-glow.
Sometimes snow, like water, is blue with reflected sky-glow;
water itself has almost no color.
The sun is at that magical sunset angle that it lights the clouds from beneath.
Earth rotates as the seconds pass, and the clouds so lighted recede into the distance.
Sequence shot at Nippenicket Pond, June 2014 is only two minutes long.
These last five photos were taken while sailing across Long Island Sound in September 2013.
If I hadn't soon had night navigation to contend with, I'd have enjoyed a sunset like this
with a glass of red wine!
Refraction of light by the atmosphere has another consequence: the bending of the sun's light means we are still seeing a sun that, in reality, is probably already below the horizon!
Deja vu! Yes, you might have seen this post a week ago. I accidentally deleted it a day or so later, but decided to reconstruct it!
*Actually, the sun also gives off a good deal of light that is beyond the visible rainbow: much of its output is in the infrared (with wavelengths longer than red light), while some is in the ultraviolet range (waves shorter than violet). These are invisible to our eyes, although some animals can see a little way into these ranges.
**The little blue scattered from sunlight shining more directly down through the atmosphere leave the sun appearing yellow; the astronauts see a nearly white sun.
***Now that you've come up with your own "errors," Here are a few I spotted.
1. Sizes are a bit out of proportion: the moon should be a little smaller, since it has a diameter about 1/4 that of Earth.
2. Distances are way out of wack: Earth and moon are about 30 earth-diameters apart. (Of course, making everything proportional would make Earth and Moon so small as to be hard to see.)
3. Only the right-hand sides of Earth and moon should be lit.
4. Sunlight should shine from the right over the whole image, not be "aimed" only at Earth's edges.