Quick Answer:Rainbows form when sunlight enters a raindrop, refracts (bends) as it passes from air into water, reflects off the back of the drop, and refracts again as it exits. Because different colors of light bend by different amounts, the light spreads into a spectrum — and because the geometry is fixed, the arc always appears opposite the sun, roughly 42 degrees from the antisolar point.

The science behind the bow

White sunlight contains all visible colors. When a ray enters a spherical raindrop, it slows and bends (refraction); part of it reflects off the drop's inner back surface; and as it leaves, it bends again. Each color bends by a slightly different angle — red least, violet most — so the returning light is spread into a spectrum. The classic diagram of this process is explained step by step inThe Physics Classroom's rainbow-formation lessonand in theSmithsonian Science Education Center's explainer.

The angle matters: light that has undergone one reflection inside the drop returns at about 42° from the direction of the incoming sunlight (the "antisolar point" — the shadow of your head). That fixed angle is why a rainbow is always an arc: every drop along that 42° cone sends the same color to your eye.

Why you see it and where

A rainbow requires three conditions at once: sunlight, water droplets in the air, and your position between them with the sun behind you. Because the geometry is tied to your own viewpoint, every observer sees a slightly different rainbow — the arc is personal to your location, which is why you can never "reach" the end of one. Rainbows appear most often in the morning or late afternoon, when the sun is low enough for the 42° arc to sit above the horizon.

Decoding the colors

The classic sequence — red on the outside, then orange, yellow, green, blue, indigo, and violet on the inside — follows the color-dependent bending angles. The colors are continuous, not discrete bands; the traditional seven-name list is a convention, not a physical boundary.Canon's optics tutorialshows how the physics of refraction produces the exact color order.

Variations: double bows and more

Light can reflect twice inside a drop instead of once. The second reflection produces a fainter secondary rainbow outside the primary one, with its colors reversed (red on the inside). Between and inside the arcs, a third and fourth reflection can create subtle extra bands; and under the primary bow, closely spaced interference effects can produce faint "supernumerary" arcs. TheAstronomy magazine guide to rainbowscovers these rarer variants and what to look for.

Historical insights

Rainbows have been explained scientifically for centuries. René Descartes traced the path of light through a raindrop in 1637 and correctly deduced the 42° angle using a large glass sphere and sunlight; Isaac Newton's prism experiments then established that white light is composed of colored rays, completing the modern explanation of how the colors arise. TheHowStuffWorks rainbow articlerecounts this history alongside the physics.

The bottom line

A rainbow is geometry and optics working on raindrops: refraction spreads the colors, reflection returns them to your eye at a fixed angle, and the result is an arc that is simultaneously a physical phenomenon and a personal optical illusion — different for every observer, anchored to each one's own shadow.

Sources & further reading

That’s the mechanism. The wonder is still allowed.