When the Sir Isaac Newton explained the colours of the rainbow with refraction the poet John Keats was horrified. Keats complained (through poetry of course) that a mathematical explanation robbed these marvels of nature of their magic.

Whether you, dear reader, agree with Keats’ view or not, it is time to deep dive into the mathematical explanation, requiring just basic geometry of lines and circles. As we will see, the explanation is just as elegant as the rainbows themselves.
When sunlight enters a droplet from any angle some light is reflected and some is refracted into the raindrop. We most commonly encounter refraction when we look at a straw in a glass, it seems distorted and cut off. How much light is refracted is determined by the refraction index Latex formula which is simply Latex formula; the speed of light in vacuum divided by the speed of light in the new medium which makes n a number between one and (usually) two.
Due to this underlying mechanism, the angle of the light beam changes according to Snell’s law Latex formula , where Latex formula is the geometry1refractive index of the first medium (air, Latex formula = 1) and Latex formula is the incidental angle. The secondary angle is a bit smaller because the refractive index of water is around 1,34.  From here some of the sunlight reflects off the back side of the raindrop and then leaves the raindrop through the “bottom” where the light is refracted again, same as when it entered the raindrop.

Now, depending on where the light enters the raindrop it will exit the raindrop at different angles. We can calculate the total deflection D by adding up all grey angles Latex formula. We then calculate the derivative for the incidental angle to find the minimum. This minimum angle has the most intense light and creates what we can see as a rainbow. Remember that we are plotting the total deflection, the angle between the sunlight and you looking up will be 180°-D. This ends up to be around 42° and does not depend on the size of the water droplet.

observerSupposedly Descartes (mostly known for his philosophy) figured all this out graphically, but he did not understand why the rainbow showed different colors. He didn’t know that every medium has a different refractive index for each color which is a wavelength in the electro-magnetic spectrum, Blue’s refractive index is around 1,342 while red’s is around 1,331 resulting in different deflection angles.

There are so many further interesting facts to point out but I will try to keep the list short:

26273684822_26a9df07f0_zIn theory there are many more orders of the rainbow, each one reflects light once more inside of the rain trop. The second order rainbow which has its colors reversed is the only one you can frequently see with bare eyes and is located about 10° above the first order rainbow.

Rainbows seen from the ground can only occur in the morning or the evening due to the 42°-degree angle between you and the sun. If the sun is higher than 42° -degrees, the rainbow will be below the horizon (unless you are up high and looking down). Seen from an airplane, rainbows are full circles directly opposite of the sun!

seawaterrainbowLast but not least, seawater has a higher refractive index than rain water, so the radius of the seabow is a bit smaller, making for some crazy photos!



So next time you see one of these colorful arcs appear in the sky, try to remember the elegant math behind what you’re seeing!

And as always, stay curious!