Today I’m going to tell you why the sky is blue. Basically, it’s all due to a scattering phenomenon that takes place currently known as Rayleigh scattering. The sun emits light throughout the visible spectrum (and also into the ultraviolet and infrared spectrum) from red to deep blue with the majority of the light emitted being yellow. Since our yellow sun is near the center of the visible spectrum (recall that the visible spectrum of light is known as ROY G BIV or red, orange, yellow, green, blue, indigo, and violet) there are equal amounts of red and blue light, but both are much less than yellow light. As light from the sun reaches Earth it has to travel through the atmosphere. The atmosphere (or air) isn’t void of matter; there are many small particles within it. These small particles scatter the sunlight, but they don’t scatter it equally.
For particles with a circumference much less than the wavelength of light the scattering is a function of 1/wavelength to the fourth power (or σ ≈ 1/λ4, where σ is the scattering cross section). This means that blue light (which has half the wavelength of red light) gets scattered 16 times as much as red light and 4 times as much as yellow light.* This means when we are looking at the sky, what we see is scattered sunlight, and blue light from the sun is scattered so much more than either yellow light or red light. Lastly, this scattering effect is attributed to Lord Rayleigh who discovered the scattering phenomenon first. Humans have a tendency to personalize math (it helps us in remembering it) and usually denote specific useful formulas or variables to the person that first discovers it. In this case, Rayleigh scattering named after Lord Rayleigh.
*Note: There are some generalities being made here. In reality the wavelength of blue light is about 475 nm, yellow light is 570 nm, and red light is 650 nm. The scattering isn’t nearly as much as the simple math states. Another reason that the sky doesn’t look violet to humans, is that human eyes have a very low responsivity to indigo light. While scotopic vision has a peak responsivity at 510 nm, normal photopic vision peaks around 560 nm and drops of significantly at 400 nm (less than 1%) and about 10% at blue light.