Rainbows and Moonbows

Some Interesting Facts about Rainbows

Here are a few facts and things to look out for when you are running…

  1. Rainbows appear in front of you when the sun is behind you, and it is raining in front of you.
  2. The primary rainbow is brightest with blue nearer the ground, red higher up. The angle between the observer, the rainbow and the sun is about 42°.
  3. The secondary rainbow is much fainter than the primary with colours inverted compared to the primary rainbow, so red is nearer the ground. The angle between the observer, the rainbow and the sun is about 52°, so it appears above the primary rainbow.
  4. The area inside a rainbow is brighter than the area outside it.
  5. The rainbow arc is circular. How much of the circle you see depends on the geometry between the observer, the sun and the ground (which obscures some of the arc). If the observer is above the ground, e.g. on a mountain top then a full circle may be visible.
  6. Rainbows can be produced not just by the sun; a Moonbow is produced by light from the moon (which is of course reflected sunlight) or in foggy conditions, a Fogbow.

What is colour?

Visible light is part of the electromagnetic spectrum with wavelengths between approximately 400nm (violet) and 700nm (red) as shown below…


The retina in the eye has two types of cells for detecting light: cones and rods. There are three types of cone cells (Short [S], Medium [M] and Long [L]) that respond differently to different wavelengths as shown below…


You can think of the S cone cells reacting to blue; the M to green and the L to red. Most colour blindness is due to a fault in one type of cone cells. There are around 6 million cone cells in a human retina concentrated in the centre. They work best in light levels associated with daylight and not so well at night.

Rod cells on the other hand are more sensitive than cone cells, and therefore are responsible for night vision. They are not able to detect different light wavelengths like cone cells. So at night, when rod cells are providing night vision, colour tends to be absent. This is why Moonbows tend to be black and white.

So with the three types of cone cells, different combinations of light frequencies will cause each cone cell type to respond in a certain way. Our brains interpret this as different colours.


If we look at just red light the brain would receive a response from L cones but not much from M and L cones. We would see red. If we look at red and green light, the brain would receive responses from the L and M cones and not much from S cones. We would see yellow. The human eye is able to detect about 10 million variations in colour but for reasons of brevity we refer to the spectrum as: violet, indigo, blue, green, yellow, orange and red. This is thanks to Isaac Newton who named it thus. Things often got named in sevens.

What is White Light?

White light is what we perceive when we see light from all parts of the visible spectrum at about the same intensity so that no one colour dominates. The sun is a reasonable example of this.

It is possible to split white light into its constituent components because the refractive index of different wavelengths is different in something like glass or water.

Black is the absence of all colours.

Conditions for a Rainbow

In order for a rainbow to occur you need some sort of white light source, like the sun. You also need some something to act like a prism to split the white light into its constituents and it turns out that rain drops can do just this.


So what is happening is that light hits the raindrop. Some will be reflected, some will go into the raindrop and will deviate from the previous straight line (refraction). The refracted light will then hit the back of the raindrop where some will be reflected and some will pass through the back of the raindrop. For the reflected part, the light will traverse the raindrop again and some will be reflected and some pass through back into the air (and be refracted again).

Raindrops would tend to be spherical due to surface tension pulling them into a sphere. The water surface has potential energy associated with it so the shape of the droplet will be the one with the least potential energy for a given volume of water. The least potential energy equates to the least surface area. The shape with the least surface area for a given volume is a sphere.

When the raindrop falls to earth it experiences air resistance that will tend to flatten the underside so the shape will actually be a slightly squashed sphere. However, lets assume its a sphere from here on.


Lets assume light hits the raindrop at an angle α and is refracted at an angle β as shown in the diagram.

The reason to setup the problem like this is that we can easily apply Snell’s Law to the air / raindrop boundary. This states::

n_1.sin(\alpha) = n_2.sin(\beta)


n_1 is the refractive index of air which is approximately 1

n_2 is the refractive index of water, which for red light is about 1.33 and for blue about 1.34

Now, consider the angle through which the light is rotated through coming into contact with the water raindrop. There are three points to consider:

  1. On entering the raindrop, the rotation is: \alpha - \beta
  2. On reflection at the back of the raindrop: 180 - 2.\beta
  3. On leaving the raindrop: \alpha - \beta

So, the total rotation, D = \alpha - \beta + 180 - 2.\beta + \alpha - \beta

D = 180 + 2.\alpha - 4.\beta

Now, using Snell’s Law, \sin(\alpha) = n_2.\sin(\beta)

D = 180 + 2.\alpha - 4.\arcsin(\frac {\sin(\alpha)} {n_2})

graphThis equation is interesting. Graphing α versus D gives the following shape to the curve, and the key to the formation of the rainbow is the minimum point of the curve at about α = 60°

The point about the minimum is that the value of D is approximately the same for a small change of α. What this means is that light hitting the raindrop at or around, this particular angle gets deviated by the same amount so there is a peak in light intensity at this angle. This peak in intensity is what you see as a rainbow.

To get the exact value of α, its easy to differentiate D with respect to α, and for the minimum this equals zero:

\frac {dD} {d\alpha} = 0 = 2 - 4.\frac {\arcsin(\frac {\sin(\alpha)} {n_2})} {d\alpha}

Now, remembering:

  1. {d(\arcsin(x))} {dx} = \frac {1} {\sqrt(1-x^2)}, and
  2. \sin^2x + \cos^2x = 1

0 = 2 - \frac {4} {\sqrt(1-\frac {\sin^2\alpha} {n_2^2})}.\frac {\cos\alpha} {n_2}

\sqrt(1-\frac {\sin^2\alpha} {n_2^2}) = \frac {2.\cos\alpha} {n_2}

1 - \frac {\sin^2\alpha} {n_2^2} = \frac {4.\cos^2\alpha} {n_2^2}

1 + \frac {\cos^2\alpha - 1} {n_2^2} = \frac {4.\cos^2\alpha} {n_2^2}

\frac {n_2^2 - 1} {n_2^2} = \frac {3.\cos^2\alpha} {n_2^2}

\cos\alpha = sqrt(\frac {n_2^2 - 1} {3})

So, solving for red light n_2 = 1.33 gives α = 59.6°, β = 40.4°, D = 137.6°

For an observer looking up at the sky, the angle between the red part of the rainbow and the sun is 180° – D = 42.4°.

Solving for blue light n_2 = 1.34 gives α = 59.0°, β = 39.8° D = 138.8°

For an observer looking up at the sky, the angle between the blue part of the rainbow and the sun is 180° – D = 41.2°.

So this is why each colour in the rainbow appears at a slightly different angle. The point to note is that all points that form this angle will appear, for example, red. It is not that there is no other light coming from this direction, but rather there is a peak in red intensity that dominates the other colours at this angle. All points that form this angle are forming a circular arc. How much you see, depends on how much the ground is getting in the way of.

Some things to notice.

  1. You will not see a rainbow if you are looking towards the sun, it needs to be behind you.
  2. To see a rainbow there needs to be an approximately 41° to 42° angle between where you are looking, the rainbow and the sun. If the geometry is such that you cannot form this angle then you will not see a rainbow. For example, if the sun is too low in the sky.
  3. The higher the sun is in the sky the further away the rainbow will appear (in order to make the appropriate angle).
  4.  The rainbow has no dependency on raindrop size.
  5. The rainbow is a consequence of the geometry between the observer, and the sun. Only you can observe a rainbow; someone stood next to you will observe a slightly different geometry and a slightly different rainbow.
  6. As you move, so the position of the rainbow moves; so there is no chance of ever finding the pot of gold at the end of the rainbow.

Inside a Rainbow is Brighter than Outside

The area inside the Rainbow arch will appear brighter than the rest of the sky.


In order to understand this lets look again at the graph of  angle of rotation, D versus angle of incidence, α.

Irrespective of α, D has a minimum of 137.6° to 138.8° depending on the colour of the light. Put another way, light hitting the raindrop where the angle is below the rainbow angle will not contribute to the rainbow itself, but will be reflected back towards the observer.  Light hitting the raindrop with an angle above the rainbow angle cannot return to the observer through single reflection within the raindrop.

So inside the rainbow, there is more light (of all wavelengths so it appears as white light) than outside so the inside appears brighter. You can see this effect in the photo below.


Secondary Rainbows

It is not unusual to see two rainbows: a primary, brighter one and a secondary, fainter one. The secondary rainbow arises when light reflects, not once, but twice inside the raindrop. At each reflection some light reflects and some exits the raindrop so the intensity of the secondary rainbow is less than the primary.

Its simple to set up a similar diagram to the primary rainbow but with 2 reflections.

Consider the angle through which the light is rotated through coming into contact with the raindrop. There are now four points to consider:

  1. On entering the raindrop, the rotation is: \alpha - \beta
  2. On the first reflection at the back of the raindrop: 180 - 2.\beta
  3. On the second reflection at the back of the raindrop: 180 - 2.\beta
  4. On leaving the raindrop: \alpha - \beta

So, the total rotation, D = \alpha - \beta + 2.(180 - 2.\beta) + \alpha - \beta

D = 360 + 2.\alpha - 6.\beta

Differentiating and equating to zero to get the minimum gives a similar equation to the primary rainbow. Working through it gives:

\cos\alpha = sqrt(\frac {n_2^2 - 1} {8})

So, solving for red light n_2 = 1.33 gives α = 71.9°, β = 45.6°, D = 230.2°

For an observer looking up at the sky, the angle between the red part of the rainbow and the sun is D – 180° = 50.2°.

Solving for blue light n_2 = 1.34 gives α = 71.6°, β = 45.1° D = 232.6°

For an observer looking up at the sky, the angle between the blue part of the rainbow and the sun is D – 180° = 52.6°.

Some things to notice.

  1. The secondary rainbow is the same shape as the primary but roughly 10° higher in the sky. Again, if this geometry does not work you will not see a secondary rainbow.
  2. The ordering of colours is reversed in the secondary as compared to the primary.
  3. The secondary will be fainter than the primary because two internal reflections are needed in the raindrop. At each reflection some light is not reflected and passes through, effectively being lost to this process.

Higher Order Rainbows

Third and fourth order rainbows are possible with 3 or 4 internal reflections. These are rarely seen as they are close to the primary and much fainter so not easy to spot.

Following the same approach above for a tertiary rainbow with three internal reflections within the raindrop gives an angle of 37° between the red part of the rainbow and the sun.

Supernumerary Rainbows

It is possible to see several narrow, faintly coloured bands bordering the blue edge of a rainbow; i.e., inside the primary bow or, much more rarely, outside the secondary. These bands are supernumerary rainbows. The supernumerary bows are slightly detached from the main bow, become successively fainter along with their distance from it, and have pastel colours (consisting mainly of pink, purple and green).

The effect appears when water droplets have a diameter of about 1 mm or less; the smaller the droplets are, the broader the supernumerary bands become, and the less saturated their colours. Due to their origin in small droplets, supernumerary bands tend to be particularly prominent in fogbows.

The alternating faint bands are caused by interference between rays of light following slightly different paths with slightly varying lengths within the raindrops.


At night it is possible to see a Moonbow where the moon takes the place of the sun as light source. The mathematics are identical to rainbows.

I have seen this once and the Moonbow appeared monochromatic, I suspect because of the low light intensity and the fact that I would have been using my night vision where rod cells are detecting light but not colour.

It is also possible to see rainbows in fog, so called Fogbows.