What’s in a rainbow? Fairytales and pixie dust? Gold and leprechauns? A boatload of drugs? Nope, just clear cold geometry and physics, just how we like it.

Rainbows are a funny phenomenon. Everyone vaguely knows they have something to do with sunlight and water. But why should sunlight haphazardly reflecting from water produce such a clearly-defined ring, with the colours all nicely separated? Surely if the sunlight was bouncing off of all of the raindrops in the sky we should just be seeing some crazy fuzzy mess?

To get a handle on what’s going on, let’s look at what happens when light hits a spherical drop of water. Typical raindrops are around 1 mm in size, which is thousands of times larger than the wavelength of visible light and we can be comfortable using a geometric optics approach where the light is approximated by discrete ‘rays’.

Now rainbows always appear on the opposite side of the sky to the sun. The reason is that sunlight reflects from water in the air, back into your eye, as sketched below. What we need to do is work out how the light reflects back given the geometry of a spherical rain drop.

Suppose a light ray hits a drop of radius a distance of from the centre (we only need to consider 1 side due to symmetry):

The light ray enters the drop and is deflected by a small angle due to the differing refractive index of the water drop (roughly 1.33 for visible light). The ray then bounces once inside, and is deflected by an angle . Finally the ray leaves the drop and again is deflected due to the change in refractive index, this time by an angle .

As the dashed lines are all radii of the circle, we immediately know all of the angles inside the drop

By Snell’s Law we know that the angles and are given by

.

From geometry we also know that

.

Finally, the deflection angle between the light ray going in and the light ray going out is just

.

Phew! That GCSE circle geometry comes in useful after all. What we want to know is the relation between the incidence position and the deflection angle . To proceed note that

so

.

This function is plotted below, and looks like it makes sense. For the deflection is 0, the ray just bounces straight back no matter what the refractive index. For all where there is some reflection the deflection angle gets larger as you move farther up the droplet.

However, the fact that the angle starts to decrease again is critical. We’d like to know how much power reflects at every angle. The angle is represented in terms of because we know that the light power is equally distributed along the direction. The sun is very far away, so the rays are almost exactly parallel and straight. We therefore know that over a distance , there is some amount of light power , and this is constant – this is the assumption of straight parallel rays. What we’d like to know is how much of this power goes into each angle, for which we need:

The light intensity coming out of the droplet will therefore diverge when . As plotted below for water this divergence is very sharp, and is essentially caustic focussing of the incoming rays. What this means for our rainbow is that all the light we see comes from one angle, in a very narrow band. The reason it’s a circle is due to the spherical symmetry of a rain drop. This explains why rainbows are so sharp and neatly contained, and the reflection of light doesn’t end up in a big mess on the sky.

We can calculate this condition, and it occurs for a critical position

.

We can substitute this into our expression for and find the critical angle at which point the reflections are brightest

.

Slightly surprisingly, as the refractive index goes up and the light gets more strongly focussed, the angle at which most light is reflected goes down. For water we have (which agrees with Wikipedia, yay!), for higher refractive indicies the rainbow would shrink dramatically. Also of note is that the term only appears in the combination , which means this reflection angle is independent of drop size. All of the rain drops in the sky (assuming they’re spherical) will then reflect at the same angle! This is nice to know, and helps us understand why rainbows are so neatly contained. A final point to mention is that the refractive index of water changes very slightly for different wavelengths. Each wavelength has its own critical angle, but they’re all slightly different. Each colour then gets assigned its little spot in the rainbow

Now from a previous post I know I have the computational machinery to directly simulate electromagnetic waves, so lets see what this looks like for a water drop. For computational reasons I’ll have to scale the drop down pretty small, only 30 m, but it’s still quite a few times the light wavelength so hopefully the geometric results here will hold. Light is injected from the left, with a flat wavefront to approximate the sun’s rays. For simplicity of visualisation only the top half of the drop receives light, the bottom half would look the same but flipped.

The result is very nice! We see the light enter the drop, bend downwards, reflect from the back surface then exit out of the bottom. It’s also clear there’s are a few things we neglected to mention – transmission at the back surface and secondary reflections inside. They don’t change our reasoning behind as the reflection coefficients are much less important than the geometric focussing power of the drop in determining the angle of peak intensity. However it’s clear most of the light leaves the drop at the back, which also makes sense as rainbows are much fainter than the sun! There is also a second reflection, and from the geometric results above we just need to add another bounce to calculate the angle for double reflections:

.

I’ll leave it as an exercise to the reader to find the critical angle for double reflections, but it does exist and is larger than the one for single reflections. This then creates a second rainbow outside the first, and the extra bounce means all of the colours are inverted.