Blue Sky and Red Sunset

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

If the Sun were viewed from beyond the Earth's atmosphere, it would appear to be an intense glowing white sphere. But the Sun's light, as it passes through the atmosphere to an observer on the Earth's surface, undergoes scattering by the molecules in the air.


Nitrogen and oxygen molecules have diameters of the order of 2 Å or 0.2 nm. Rayleigh scattering of light in the visible spectrum ( nm) by objects much smaller than its wavelength is proportional to . This means that the blue end of the spectrum ( nm) is scattered by about an order of magnitude more intensely than the red end ( nm). The observed pale blue color of the sky is determined by sunlight multiply scattered by the atmosphere. More precisely, the blue sky comes from microscopic density fluctuations caused by the random motions of air molecules, which results in fluctuations of the refractive index. Another consequence of Rayleigh scattering is that light coming directly from the Sun is depleted in the blue end of the spectrum, thus giving it the appearance of a yellow sphere.

Clouds consist mainly of tiny water droplets, which are of comparable dimension to the wavelengths of white light. Rayleigh scattering under such conditions approximates Mie scattering, in which all wavelengths are scattered with nearly equal intensity. This accounts for the white or grayish appearance of clouds.

As the Sun nears the horizon, its light must travel a greater distance through the atmosphere. In addition, the more oblique angles of incidence cause the light to be refracted by the atmosphere. This is shown in the inset at the lower-right corner of the graphic. The setting Sun thus enhances the yellow, orange, and red components of the spectrum as it appears to an observer. The great variety of beautiful sunsets is well known to everyone. The detailed appearance of the sunset is dependent on a large number of possible environmental conditions. This Demonstration shows only a highly idealized and simplified representation of the sunset, as it might occur in late summer.


Contributed by: S. M. Blinder (July 2012)
Open content licensed under CC BY-NC-SA




[1] J. Trefil, Meditations at Sunset: A Scientist Looks at the Sky, New York: Scribner, 1987 pp. 3–11.

[2] C. R. Nave. "Blue Sky." HyperPhysics. Department of Physics and Astronomy, Georgia State University (Jul 3 2012).

[3] Wikipedia. "Rayleigh Scattering." (Jul 3, 2012). Reason_for _the _blue _color _of _the _sky.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.