Optics

Rainbow Formation

One drop, three bends: refract in, reflect once, refract out — and the colors sort themselves into a 42° arc

A rainbow forms when sunlight refracts into a spherical raindrop, reflects once off the back surface, and refracts again on exit — emerging concentrated at a deviation angle of about 138°, which an observer sees as a 42° arc centered on the antisolar point. Dispersion (the refractive index of water varies with wavelength) sorts the colors, with red on the outside of the primary bow and violet on the inside.

  • Primary bow radius~42° (red 42.4°, violet 40.6°)
  • Secondary bow radius~51°, colors reversed
  • CenterAntisolar point (your head's shadow)
  • MechanismRefraction → 1 internal reflection → refraction
  • Color spread~1.8° (n: 1.331 red → 1.343 violet)
  • Caustic conditiondD/db = 0 (minimum deviation)

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The intuition — a sky full of tiny prisms

Every raindrop is a microscopic ball of water, and a ball of water is a surprisingly good prism. Sunlight hits the front of the drop and bends inward (refraction). It travels through the drop, hits the curved back surface, and bounces once (internal reflection). Then it bends again on the way out. Three optical events — refract, reflect, refract — and the light comes back toward the Sun's direction, tilted by a fixed angle.

Here's the part that surprises people: a single drop doesn't make a rainbow band. It sends light back in a whole range of directions depending on where the incoming ray strikes it. But the math conspires so that far more light comes back at one particular angle than any other. That angle is about 42° away from the line pointing straight away from the Sun. Pile up millions of drops, and every drop sitting at 42° from that line glows — and the locus of all such drops is a circle. You see an arc.

The colors come for free. Water bends violet light slightly more than red light, so each color's "favorite" exit angle is slightly different. The bow isn't one arc — it's a stack of nested arcs, one per wavelength, smeared into the band you recognize.

How it works — refract, reflect, refract

Follow one ray of sunlight into a spherical drop of radius R. It strikes the surface at an impact parameter b (the perpendicular offset from the drop's center, expressed as b/R = sin i, where i is the angle of incidence).

  1. Refraction in. At the front surface the ray bends according to Snell's law, sin i = n · sin r, where n ≈ 1.33 is water's refractive index and r is the refraction angle inside the drop.
  2. Internal reflection. The ray crosses the drop and hits the back surface. Most of the light leaks out, but a fraction reflects. By the geometry of a chord in a circle, the reflection turns the ray by (180° − 2r).
  3. Refraction out. The ray reaches the front surface again and refracts on exit, bending by the same (i − r) as on entry.

Add up every turn and the total deviation of the ray — the angle between the incoming sunlight and the outgoing ray — is:

D(i) = 2(i − r) + (180° − 2r) = 180° + 2i − 4r

You see the bow at the supplement of this: the angular radius from the antisolar point is 180° − D = 4r − 2i. The whole story of "why 42°" is hidden in how D depends on i.

The rainbow angle — why a caustic at 42°

Plot D against the impact parameter b (or equivalently against i). As b runs from the center of the drop to the grazing edge, D first decreases, reaches a minimum, then increases again. Near a minimum, dD/db ≈ 0, which means a wide band of incoming rays all leave at nearly the same angle. That pile-up of rays is a caustic — a bright fold in the light — and it's why the rainbow direction is so much brighter than its surroundings.

Set the derivative to zero to find the special incidence angle:

dD/di = 0   →   cos²i = (n² − 1) / 3

For n = 1.333 (yellow-green light), this gives i ≈ 59.5°, r ≈ 40.4°, and a minimum deviation

D_min = 180° + 2(59.5°) − 4(40.4°) ≈ 138°
rainbow radius = 180° − 138° = 42°

That's it. The 42° is not a coincidence or a measured fudge — it falls straight out of Snell's law plus the geometry of a sphere, first worked out by René Descartes in 1637 (the ray tracing) and refined by Isaac Newton, who added the color story in the 1660s. Light fainter than the caustic still arrives inside the bow (angles smaller than 42°), which is why the sky inside the arc is brighter than the dark band outside it.

Dispersion — sorting the colors

Water's refractive index is not a single number; it drifts with wavelength. This is dispersion, and it's the same effect that makes a glass prism throw a spectrum. Each color therefore has its own rainbow angle:

ColorWavelengthIndex n (water, 20 °C)Rainbow radius (primary)
Red700 nm1.33142.4°
Orange620 nm1.33242.1°
Yellow580 nm1.33342.0°
Green530 nm1.33541.6°
Blue470 nm1.33841.2°
Violet400 nm1.34340.6°

The full spread is only about 1.8° — roughly three and a half full-moon widths. Red bends least, so its caustic sits at the largest angle and forms the outer edge of the primary bow; violet bends most and forms the inner edge. Because the bands are only ~1.8° wide and overlap heavily, the colors you actually see are pastel and washed-out, not the saturated bands of a textbook prism — each "pure" color is contaminated by the wings of its neighbors.

Primary, secondary, and Alexander's dark band

Some light reflects twice inside the drop before exiting. That double-bounce path has its own caustic — but it lands at a larger angle and with the color order flipped:

FeaturePrimary bowSecondary bow
Internal reflections12
Angular radius~42° (40.6°–42.4°)~51° (50.4°–53.4°)
Color order (outer→inner)Red → violetViolet → red
Relative brightness1 (reference)much fainter — the extra back-surface reflection keeps only ~6% of the light (the rest escapes)
Width~1.8°~3.0° (wider, more washed out)
Discovered/explainedDescartes, 1637Newton; double-reflection geometry

Between the two bows lies Alexander's dark band, named after Alexander of Aphrodisias around 200 AD. Single-reflection light only ever reaches angles up to ~42° (and floods the region inside), while double-reflection light only appears beyond ~51°. The 42°–51° wedge gets almost no scattered light from either path, so it looks distinctly darker than the sky on either side. Spotting that band is the easiest way to confirm you're looking at a real two-bow rainbow.

By the numbers — what reaches your eye

At each surface, some light transmits and some reflects (Fresnel equations). For unpolarized light hitting water near these angles, only about 4% reflects at the front, but at the curved back surface a useful fraction internally reflects. Tracing the energy budget for the single-reflection (primary) path:

QuantityValueWhy it matters
Sun's angular size0.53°Blurs every color band by ~0.5°, softening the bow
Drop size for sharp bow0.5–2 mmBigger drops = brighter, more saturated colors
Drop size for white "fogbow"< 0.05 mmDiffraction smears all colors together into a pale arc
Fraction of incident light in primary bow~few %Most sunlight transmits straight through; the bow is the leftover caustic
Max Sun elevation for a ground rainbow42°Above this the whole bow sits below the horizon
Supernumerary spacingfractions of a degreeInterference fringes just inside the violet — wave optics, not ray optics

The ray-optics picture nails the position of the bow but predicts an infinitely sharp edge. Real rainbows have faint pinkish-green supernumerary arcs hugging the inside of the primary bow — these are interference fringes between rays that take slightly different paths to the same exit angle, and only the full wave theory (Airy's 1838 diffraction integral) reproduces them. The drop size sets their spacing, which is why supernumeraries show up best in fine, uniform drizzle.

Where rainbow physics shows up

  • Atmospheric optics. Fogbows (tiny drops, no color), moonbows (faint rainbows by moonlight), and sea-spray bows all use the same 42° geometry with different drop sizes.
  • Glories and coronae. Backscatter rings around the antisolar point (often seen from planes around the shadow of the aircraft) are the wave-optics cousins of the rainbow caustic.
  • Remote sensing. The exact rainbow angle depends on n, and n depends on liquid composition — "rainbow refractometry" measures droplet size and refractive index in fuel sprays and clouds without touching them.
  • Optical engineering. Caustics — bright folds where dD/di = 0 — govern lens aberrations, the bright cusp at the bottom of a coffee cup, and the design of reflectors.
  • Astronomy and other liquids. "Rainbows" on Saturn's moon Titan would form from liquid methane (n ≈ 1.29), placing the primary bow at a different angle than Earth's water bow.

Common misconceptions and edge cases

  • "The rainbow is at a fixed place." No — it's a direction, not an object. It's centered on the antisolar point (your head's shadow), so every observer has their own personal rainbow and you can never walk to its end.
  • "The drop splits white light like a prism slit." A single drop sends light back over a continuous range of angles; the bow exists only because the rays pile up at the caustic. It's a statistical brightness peak, not a clean spectrum from one drop.
  • "Rainbows are half-circles." They're full 42° circles around the antisolar point. The horizon cuts off the lower half on the ground; from a plane you can see the complete ring.
  • "Red is on top because it has the most energy." Red is on the outside because it refracts the least (lowest n), so its caustic sits at the largest angle. Photon energy has nothing to do with the ordering.
  • "The second rainbow's reversed colors are an illusion." They're real — the extra internal reflection genuinely flips the geometry, putting red on the inside of the secondary bow.
  • "Ray optics explains everything." It gets the 42° angle right but fails on supernumerary arcs and on fogbows, where the drops are small enough that diffraction dominates. You need wave optics for the fine structure.

Frequently asked questions

Why is a rainbow always at 42 degrees?

42° is the rainbow angle — the maximum angular radius from the antisolar point for sunlight that enters a spherical raindrop, reflects once off the back, and exits. The total deviation D passes through a minimum of about 138° (so the radius 180° − D peaks near 42°), and rays striking the drop across a wide range of impact parameters all leave near this extreme angle (where dD/db = 0), so light piles up there and the drop appears bright. Inside the bow (radius below ~42°) the sky is brighter because light still arrives there, while just outside ~42° almost none does, so an observer always sees the bright arc at a fixed angular radius of about 42° (red) around the antisolar point, regardless of how far away the rain is.

Why does the rainbow have its colors in that order?

Water's refractive index varies slightly with wavelength — about 1.331 for red (700 nm) and 1.343 for violet (400 nm). Because the rainbow angle depends on n, each color exits at a slightly different angle: red emerges at ~42.4° and violet at ~40.6°, a spread of about 1.8°. Red comes from the outer (higher-angle) ring and violet from the inner ring, so the primary bow runs red-orange-yellow-green-blue-violet from top to bottom.

What is the secondary rainbow and why are its colors reversed?

The fainter secondary bow comes from light that reflects twice inside the drop instead of once. The extra internal reflection appears at a deviation that maps to about 51° (red) around the antisolar point — outside the primary bow — and it flips the color order, so red is on the inside and violet on the outside. It's dimmer because the back-surface bounce is only a weak partial reflection — the internal angle there is below the critical angle, so most of the light (about 94%) escapes and only ~6% reflects. Each extra internal reflection costs that factor again, so the double-bounce path is far weaker.

What is Alexander's dark band between the two rainbows?

The sky between the primary (~42°) and secondary (~51°) bows is noticeably darker — Alexander's band, named after Alexander of Aphrodisias (~200 AD). Single-reflection light only reaches angles up to ~42° and double-reflection light only appears beyond ~51°, so the 42°–51° gap receives almost no scattered rainbow light. Inside the primary bow it's brighter because all wavelengths overlap there.

Why can't you ever reach the end of a rainbow?

A rainbow isn't a fixed object in space — it's a direction. Every observer sees their own rainbow, centered on the antisolar point (the shadow of your own head), at a 42° angular radius. As you walk toward it, the geometry travels with you and the arc stays the same angular distance away. There's no physical location to reach because the bow is defined by the angle between you, the Sun, and the drops, not by where the drops happen to be.

Why are rainbows arcs instead of full circles?

A rainbow is genuinely a full circle of 42° radius around the antisolar point — but the antisolar point is below the horizon whenever the Sun is up, so the ground cuts off the bottom of the circle. From an airplane or a high cliff you can see a complete circular rainbow. At ground level the Sun must be lower than 42° above the horizon for any rainbow to appear at all, which is why they're most common in the early morning or late afternoon.