We all know that air is transparent. If it wasn’t then we wouldn’t be able to see anything. We also know that sunlight isn’t blue. If the sky is just air and sunlight is white, then how come is the sky blue? In order to understand why we look at the sky and all we see is blue, we need to first understand how light works. The white light of the sun is actually made up of all the colours in the rainbow mixed together. To demonstrate that, we can shine a white light through a prism and see all its colours separated out as it refracts out of the other side.
Light energy travels in waves. This means all the different colours in the rainbow are carried by different types of waves, called wavelengths. Some of them are short and choppy while others are long and lazy. Blue and violet light waves are the shortest while red light waves are the longest and slowest. This is also the reason that the colours of the rainbow are always in the same order: violet, indigo, blue, green, yellow, orange, and red. But until the white light gets reflected, refracted or scattered by an object, all light will travel in a single straight line.
So, what happens to light once it reaches the atmosphere? As the white light from the Sun enters Earth’s atmosphere, much of the red, yellow, and green wavelengths of light do not come in contact with anything and pass straight through the atmosphere to our eyes. The shorter smaller waves of blue scatter, however, are just the right size to bounce off the molecules and gas particles present in the atmosphere and scatter in all directions. This is how the colour of the sky looks blue to us. This phenomenon is known as the Rayleigh effect.
But if violet waves are also just as short, why isn’t the sky purple? This is because some of the violet light is absorbed by the upper atmosphere. Adding to that, our eyes aren’t as sensitive to the colour violet as they are to blue. The rest of the colours are still mixed together and, in their unscattered state, still appear white to our eyes. As we direct our gazes towards the horizon, the blue light fades back into white. The sunlight reaching us from the horizon has passed through even more air than the sunlight reaching us from overhead, which makes it scatter and re-scatter, making less blue light reach us.