Home▸Articles▸Physics & Mechanics

The Science Behind Rainbows: A Spectacular Display of Light and Water

Rainbows have captivated humans for centuries, but understanding their formation involves the fundamental principles of light refraction, reflection, and dispersion.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Is a Rainbow?

A rainbow is an optical phenomenon that occurs when light passes through water droplets in the atmosphere, causing it to be refracted (bent), reflected within the droplet, and then refracted again as it exits. This process separates white light into its constituent colors, creating a spectrum of hues.

The primary rainbow appears with red on the outermost part because red light is bent the least during refraction, while violet light is bent the most. However, secondary rainbows can also be observed, which are formed by an additional internal reflection within the water droplets.

How Rainbows Are Formed

When sunlight enters a water droplet, it slows down and bends (refracts) at the air-droplet interface. Inside the droplet, light reflects off its inner surface before exiting again. As the light exits, it refracts once more, separating into different wavelengths corresponding to various colors of the spectrum.

The angle between the incoming sunlight and the observed rainbow is approximately 42 degrees for a primary rainbow and about 50 degrees for a secondary one. This angular separation ensures that each color appears in its correct position within the rainbow.

live demo · related simulation● LIVE

Why Rainbows Matter

Understanding rainbows not only enhances our appreciation of natural beauty but also aids in fields such as meteorology, where they can help predict weather conditions. Additionally, studying rainbows contributes to advancements in optics and photonics, with applications ranging from fiber optics to laser technology.

Rainbows are also significant in cultural and mythological contexts, symbolizing hope and promise across many societies.

Real-World Examples of Rainbows

Rainbows can be observed after rain showers or during the misty conditions of a foggy day. They are particularly striking in environments with high humidity, such as near waterfalls or in tropical climates.

In certain atmospheric conditions, like ice crystal formations, similar phenomena known as halos and sun dogs can occur, providing further insights into how light interacts with different types of particles.

Frequently asked questions

Can rainbows be seen at night?

No, rainbows are typically visible only during daylight because they require sunlight to form. However, moonbows can sometimes occur under the light of a full moon in very dark conditions.

Why do secondary rainbows appear fainter than primary ones?

Secondary rainbows are fainter because the light undergoes two internal reflections within the water droplets, causing more scattering and loss of intensity compared to the single reflection in primary rainbows.

Are there different types of rainbows besides primary and secondary ones?

Yes, other phenomena like supernumerary arcs and glory can also be observed under specific atmospheric conditions, though they are less common than primary and secondary rainbows.

How do rainbows form in artificial settings, such as water fountains or sprinklers?

Artificial rainbows form similarly to natural ones when light passes through water droplets. However, the size and shape of these droplets can affect the clarity and visibility of the rainbow.

Try it live

Everything above runs in your browser — open Rainbow and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Rainbow simulation

What did you find?

Add reproduction steps (optional)