What a rainbow actually is

A rainbow is sunlight bent and reflected by countless water droplets in the air, with the colors separated by dispersion — the wavelength-dependent refractive index of water.

Each drop you can see in the rainbow is doing the same thing:

  1. A ray of sunlight enters the drop, refracting on the way in.
  2. The ray reflects off the inside back surface of the drop (total internal reflection).
  3. The ray exits the drop, refracting again on the way out.

The combined refractions split the white sunlight into a spectrum. Red bends by a slightly different total angle than violet. So the red light from one drop and the violet light from a nearby drop reach your eye from slightly different directions — different drops contribute different colors, but each drop's contribution is a single color (from your specific viewing angle).

The full geometry — looking back toward the sun, the rainbow forming at a specific angle — produces the colored arc you see.

The geometry

The rainbow appears as a circular arc at about 42° from the antisolar point (the point in the sky directly opposite the sun from your viewing position). This is for the primary (single-reflection) rainbow.

If you're on the ground with the sun behind you, the antisolar point is below the horizon (it's the shadow of your head, more or less). The rainbow appears above the horizon, ~42° up, in an arc. You only see the part above the horizon — the rest is below.

From an airplane, you can see complete circular rainbows when conditions allow.

If the sun is higher than 42° in the sky (typical at midday in summer), the rainbow's full arc would be entirely below the horizon — no rainbow visible from the ground. Rainbows are most common when the sun is low (morning, evening), with rain showers between you and the sun.

The angle (42°) comes from the geometry of refraction + reflection + refraction inside a spherical water drop, combined with the refractive index of water (n ≈ 1.33). Red light comes out at about 42.4°; violet light at about 40.6°. The 1.8° spread is what produces the visible color separation.

Why dispersion happens

The refractive index of water (and most transparent materials) depends slightly on wavelength. For water:

  • Red light (~700 nm): n ≈ 1.331
  • Yellow light (~590 nm): n ≈ 1.333
  • Green light (~530 nm): n ≈ 1.335
  • Blue light (~470 nm): n ≈ 1.338
  • Violet light (~400 nm): n ≈ 1.342

These differences look tiny, but they translate into noticeable angular differences after refraction-reflection-refraction inside the drop.

The physical origin: water molecules have electromagnetic resonances at specific frequencies (mostly in the UV for water). Light frequencies closer to those resonances interact more strongly with the molecules, producing higher refractive index. Blue/violet light is closer to UV than red light, so it has slightly higher refractive index.

The phenomenon is called normal dispersion when n decreases with wavelength (the usual case in the visible band). Anomalous dispersion exists near absorption peaks; it's important in some specialized contexts but doesn't affect everyday rainbow formation.

The path through a single drop

Following a ray of one specific color through a drop:

  1. Entry: ray hits the drop's surface, refracts inward according to Snell's law.
  2. Travel: ray crosses the drop in a straight line inside.
  3. Back reflection: ray hits the back surface of the drop. For typical incoming angles, it reflects internally (water-air interface, with the angle steeper than the critical angle).
  4. Exit: ray refracts again on the way out.

The total deflection (angle between incoming and outgoing ray) depends on:

  • The incoming ray's position on the drop (which determines the angle of incidence at entry).
  • The wavelength (which determines the refractive index).
  • The geometry of the spherical drop.

Computing this for many different incoming positions, you find:

  • Most positions produce widely varying total deflections.
  • BUT there's a specific angle where the deflection rate (with respect to entry position) goes to zero — meaning rays from a range of entry positions all come out at nearly the same angle.
  • This is the rainbow angle. For red light, ~138° total deflection from straight-through (so 180° - 138° = 42° from antisolar).

The reason there's an enhancement at this angle: many rays from neighboring entry points all converge to the same exit direction, creating a bright caustic. Slightly different angles give much fewer rays.

Each color has a slightly different rainbow angle because of dispersion. The visible spectrum spreads over about 1.8° of angle. The brightness peaks at the caustic for each color; the spread between colors is what we see as the bands.

Why the colors appear in the order they do

The primary rainbow's color order (from outside to inside as seen in the sky): Red → Orange → Yellow → Green → Blue → Violet

This is because red light bends less than violet light, so red exits the drop at a larger angle from the antisolar point (~42° vs ~40° for violet). Red appears on the outside of the arc; violet on the inside.

The mnemonic "ROYGBIV" comes from Isaac Newton's analysis. Modern color science treats indigo and violet as essentially overlapping; the full distinction Newton drew was partly cultural.

Double rainbows

Sometimes you'll see a fainter second rainbow outside the primary, with the colors reversed. This is the secondary rainbow.

It's produced by light that undergoes two internal reflections inside the drop before exiting (instead of one for the primary). The extra reflection has two effects:

  1. Reversed color order: the geometry causes red to come out closer to the antisolar point and violet farther, opposite from the primary. From outside to inside: violet → red.
  2. Larger angle: the secondary appears at about 51° from the antisolar point — outside the 42° primary.
  3. Dimmer: each internal reflection loses some light. The secondary is several times fainter than the primary.

Between the primary and secondary is a darker region called Alexander's dark band (named after Alexander of Aphrodisias, who described it around 200 CE). Light from drops in this angular range can't reach your eye via either the primary or secondary mechanism, so this part of the sky receives only weak scattered light.

Tertiary and quaternary rainbows (3 and 4 internal reflections) exist but are extraordinarily faint. They appear on the sunward side of the sky rather than opposite the sun, with characteristic angles tens of degrees from the sun. Both have been photographed in carefully controlled conditions but are essentially never visible to casual observation — partly because of their faintness and partly because the sky glare near the sun overwhelms them.

Other variations

Supernumerary rainbows: faint pastel bands just inside the primary rainbow's violet edge. They come from wave-optics interference between rays that emerge slightly different paths through small drops. They tell you something about the drop size — supernumeraries are only visible when drops are relatively uniform and small (sub-mm).

Fogbow / cloudbow: rainbow-like arc seen in fog or thin clouds, often white or pale because the droplets are small enough that diffraction blurs the colors together.

Moonbow: rainbow at night, produced by moonlight. Usually appears white to the eye because the light is too dim to trigger color vision, but photographs reveal colors. Most often seen at waterfalls or in the spray of large waves.

Reflection rainbows: produced when sunlight reflects off a water surface (lake, ocean) before hitting the raindrops. The geometry of the reflected sunbeam produces a second rainbow that can intersect the primary at strange angles.

Reflected rainbows: a rainbow's reflection in a still water surface, appearing below the horizon line. Different from a reflection rainbow despite the similar name.

Why you can't reach a rainbow

A rainbow isn't a physical object — it's an optical phenomenon at a specific angle relative to the sun and you. Walk toward where you see the rainbow, and the geometry changes: the rainbow appears to move with you, always staying at 42° from your personal antisolar point.

Two people standing some distance apart are technically seeing slightly different rainbows, formed by different sets of drops. The colors and arc are the same, but the specific drops contributing are different.

There's no pot of gold at the end — the rainbow has no "end" in the physical sense.

A note on color vision and the rainbow

The colors you perceive in a rainbow are a real physical fact (different wavelengths) plus a subjective interpretation by your visual system. Color perception isn't quite the same as wavelength:

  • The visible spectrum (~400-700 nm) is continuous, but your eye has only three color cones (S, M, L, peaking at ~420, 530, and 560 nm).
  • Many different spectra can produce the same perceived color (metamerism).
  • "Indigo" was Newton's attempt to fit seven colors to match the seven musical notes; perceptually it's hard to distinguish from blue.

The rainbow's apparent color bands are real, but the boundaries between them are partly cultural artifacts of how humans named and categorized colors. Different cultures historically described different numbers of bands.

If you'd like a guided 5-minute course on rainbow physics and atmospheric optics, NerdSip can generate one.

The takeaway

A rainbow is sunlight dispersed by water droplets. Inside each drop, light refracts in, reflects off the back, and refracts out, with the total deflection depending on wavelength. Red and violet exit at slightly different angles (~42° vs ~40° from the antisolar point), separating the colors into a visible arc. The 42° geometry is set by the refractive index of water and the geometry of a spherical drop. Double rainbows (51°, reversed colors) come from two internal reflections; the dark band between primary and secondary is Alexander's band. Supernumeraries, fogbows, moonbows, and reflection rainbows are variations on the same physics. The rainbow isn't a physical object — it's an angular phenomenon that moves with the observer, always centered opposite the sun, and only visible when the sun is below 42° altitude.