Contrary to popular belief the sky is not blue because of refraction.

Refraction is not a significant enough effect to have this sort of affect although it can change the apparent position of the sun

The real reason why the sky is blue is due to a phenomenon known as Rayleigh Scattering whereby blue light is absorbed by gaseous molecules in the atmosphere ( ie air ) and then re-emitted in a random direction.

Thus as white light from the sun travels through the atmosphere the blue light is scattered away from its original direction of travel, and some of it is scattered down towards us which causes us to perceive the sky as blue.

This is also the reason why the sun is yellow.



No offence Sporus but the reason it wasn't printed is probably because it's piffle
This is slightly related to the title of this node, so I have no compunction about writing this here.

One day, at the place where I worked (at the time), I was given the task of reprogramming the phone system used for the place. It seemed like a challenge worthy of me, so I took it on. I started by using the 'primary' programming functions: mostly reading commands out of a manual, and pushing the appropriate buttons on the command phone.

After about a half an hour, I figured out this was impractical; I had no feedback on what I was doing, no way to tell if I had changed a setting correctly or not. As I flipped through the manual for a solution, I saw that the 'secondary' programming option was to hook up a direct cable connection with a computer, install some software so the phone box could talk to the computer box, and program the thing with feedback from a monitor. I wondered briefly why this was 'secondary,' then started asking around for a spare machine.

Turned out the only unused computer was a 286 with MS-DOS version 5 (!) Well, despite being very obsolete, the machine was doing the job. Except some people would go into the room when I was not there, see the DOS prompt, and try to restart Windows, which often resulted in some serious problems. So, I changed the command prompt to read, "I am the Oracle. Ask me your question." Just because I prefer consistency, I also altered the command files so "Bad command or file name" was replaced with "I do not know."

The next day, the machine's screen looked like this:

I am the Oracle. Ask me your question:  why is the sky blue?
I do not know.
I am the Oracle. Ask me your question:  what kind of answer is that?
I do not know.

WHY IS THE SKY BLUE?

WAVELENGTH AND DISCRIMINATION

If waves are made at the side of a lake and a rock is sticking out of the water, a little off shore, when they reach it, do the ripples "see" the rock - do they bounce off it, bend round it - or do they pass it by, as if nothing was there? If the wavelength of the waves (the distance between crests) is smaller than, or equal too (roughly) the size of the rock, the waves "see" it. If they are longer than the rock they pass by unchanged. For this reason a light microscope may only discriminate detail of a size equal to the wavelength of light. Finer detail requires an electron microscope - electrons have a shorter wavelength than photons because of their high momentum. (See: Quantum Mechanics Basic Idea.) White light contains blue wavelengths. If there are the appropriate sized "rocks" in the air the problem is close to being solved.

SUNLIGHT JUST MISSING THE EARTH

If a searchlight beam was looked at from the side nothing would be seen, unless there was some sideways scatter of the light. Some light from the Sun just misses the Earth. If it were not scattered (some of it downward) by the atmosphere none of it would ever illuminate the surface. If the blue light is scattered - if there is something in the atmosphere blue waves can "see" - then, when someone looks up at the sky, they will observe blue.

The problem is there are no particles in the atmosphere of the appropriate size.

ATMOSPHERE PARTICLES

All molecules and atomic scale particles are too small. Neither are the various dust particles appropriately sized; they would scatter all wavelengths, not pick out the blue. Indeed, if a glass tube is filled with perfectly dustless, clean air and white light shone along it, blue light scatters out of the sides. It is clear therefore that it is the air itself and not any sophistications which is responsible for dissipating blue light.

RESOLUTION OF THE "PARADOX," HOLES IN THE SKY

There is no particle in the atmosphere of an appropriate size to scatter blue light; we appear to be up against a brick wall.

The - rather elegant, perhaps - resolution of this metaphorical paradox is gained by imagining the air to consist in many particles flying about at random. By pure chance there will exist holes in the air where, simply by chance, no particles happen to be. These holes are the desired size, turning the sky blue.

PREDICTION

Should the Earth's covering of gas get thinner, for any reason, it is easy to see that the holes in the sky would grow larger and the sky would turn red.

SHEPHERD'S DELIGHT

The Sun is red when low in the sky because its light has traveled through a large thickness of atmosphere, before reaching the eye and the scattering of the blue sideways, throughout its journey, has left only the longer, redder wavelengths.

SHEPHERD'S WARNING

Bugger off or I'll shove a sheep up your tradesman's entrance.


[Note of caution: This frequently asked question was addressed in New Scientist magazine; the above explanation was not among those printed.]

Quote from Kung 'No offence Sporus but the reason it wasn't printed is probably because it's piffle.' This raises an interesting point. I got the theory from a book by Jeans. Jeans and Rayleigh worked together (recall the Jeans-Rayleigh Law). Perhaps they fell out over the sky blue question. I'd back Jeans, he was unquestionably a genius.

The ordinary telegraph is like a very long cat: pull the tail in New York, and it meows in Los Angeles.
-- Albert Einstein

Einstein's genius is that he compared the telegraph to the cat -- the temptation, especially for someone who knows a lot of science, is to do the opposite, to say something like, "The nervous system of a cat is rather like a telegraph: in the tail, physical motion is encoded by nerve fibers into a set of electrical signals that flies up the spinal chord and into the brain, where it is decoded back into physical motion, in the form of neurotransmitters flowing between the neurons, and into other electrical signals, which jump down the axons and create the sensation of a tug."

It's a good explanation -- precise and accurate, fairly interesting, conveying relevent information, but it doesn't impart any sort of intuitive feel for what's going on, and it's not the sort of thing you'd tell a 10-year-old.

We know what cats are like; we've interacted with them for years, since childhood -- when confronted with the idea that telegraphs and cats work on the same principle, it's much more useful, in most contexts, to think of the telegraph as a strange sort of cat than the other way around.

Essentially, the other writeups in this node are saying, "the sky is blue because light waves of blue length are reflected in all directions by the atmosphere, while other wavelengths travel straight from sun to eye and are seen as originating from there, not from elsewhere in the sky."* A good answer, but not really a satisfying one, and probably not what most people who ask the question are looking for; in a way, it misses the point:

The sky is blue because air is blue.

Of course, most people think air is clear -- and it is, mostly, but it's clear in the same way the water of a swimming pool is clear: which is to say, it's not entirely clear, it's translucent. The Earth's atmosphere is a very, very light blue, a blue that only becomes visible when you're looking through miles and miles and miles of it. As they say in art class, when teaching perspective drawing: "Farther objects should be smaller, hazier, and bluer." Bluer, because the air makes them blue, like the the wall of a swimming pool looks green through the chlorinated haze, like a figure emerging from fog looks white.


* This is a simplification, of course, but not an oversimplification. Yes, there are situations in which the atmosphere scatters light to your eyes of other wavelengths, and for a full understanding of the way it all works it helps to know the technical details -- but the same can be said for any object. A blue couch doesn't look blue when illuminated by orange light; your hand looks red when a flashlight beam is shone through it; the back of a white billboard is brown.

The short answer:
The scattering of light is dependent on the wavelength.

Now what does that mean?
Imagine the following:

                              (scattering)
----------------------------------0-------------------------------> (ray of light from the sun)
       (white - all colors)       |                (red)
                                  |
                                  | (blue)
                                  |

                                (you)
                   ++++++++++++++++++++++++++++++               
         ++++++++++                              +++++++++++
    +++++                                                   ++++++
++++                  (surface of the earth)                    +++++

The light from is sun is actually white light, meaning that it contains all colors (look at a rainbow). If there was no scattering, the sky would be black like during the night, because the light from the sun would just pass through the atmosphere and never fall into your eyes.

But in fact there are even two kinds of scattering at work here! One is called Rayleigh scattering (with very small particles and molecules), the other Mie scattering (with larger particles, eg in fog or haze). The former is much more important here and strongly dependent on the wavelength (proportional to 1/λ4, to be precise), meaning that blue light gets scattered much more. Therefore the red light never reaches us and the sky looks blue! This scattered light will also be polarized (the deeper reason for this is that it's dipole radiation) - that's why the sky looks even more interesting through a polarization filter.

Other examples for the same effect:
  • A sunset looks red because this time we only see the red remnant of the original ray. During daytime it's not so extreme (the angle is steeper and thus the light does not have to penetrate so much air) and the sun "only" looks yellow.
  • Distant mountains look blueish because there's much air in between us and them that scatters blue light from the sun in our direction.

Log in or register to write something here or to contact authors.