Why is the sky blue
Light from the Sun (white light) is made up of many colors - red, green, blue, and so on. Each of these colors has a different wavelength and frequency. When light reaches the atmosphere it hits gas molecules which scatter the light in all directions. This scattering is called Rayleigh scattering after Lord Rayleigh who worked out the mathematical equations to describe it.
So how does Rayleigh scattering work? Rayleigh scattering only happens when the molecules of gas encountered by the light waves are small compared to the wavelength of the light. What’s strange about Rayleigh scattering is that not all of the light is scattered evenly. Some wavelengths are scattered more. With white light, mostly the light of shorter wavelengths (the blue end of the visible range) is scattered whilst the longer wavelengths (the red end) are
mostly unaffected. This means the blue light is scattered more than the red.
But violet light has the shortest wavelength so why isn’t the sky violet? Well it’s true that the violet light is scattered more than the blue light, but our eyes aren’t so good at picking up violet light. This means we see the sky as being blue even though there is some violet light there too.