Why does a rainbow always
appear opposite the sun?
Whenever you see a rainbow, the sun is always behind you. No exceptions. And a rainbow isn't floating at some fixed spot in the sky — it appears only in a place made just for you. The rainbow the person standing next to you sees is not the same rainbow you're looking at.
It's evening, right after a shower. You turn around and there's a rainbow in the sky. You try to walk up to it for a photo, but it never gets any closer. Same distance, same shape, always there.
Maybe you've even tried to reach the foot of a rainbow. Of course, you never arrive. That's because a rainbow has no "foot," no fixed location at all.
And whenever you're looking at a rainbow, the sun is always behind you. As you walk toward it, your shadow stretches out straight toward the rainbow.
All of this can be explained by a single number: 42 degrees.
Light that enters a raindrop bounces off the inner wall and heads back the way it came. That's why rainbow light arrives from the opposite side of the sun — and why you can only see one with your back to the sun.
Rather than scattering in every direction, the returning light concentrates at one particular angle — about 42 degrees. So only the spots at exactly that angle glow bright, forming an arc.
In short, a rainbow is light you see only when your eye, the sun, and a raindrop line up at exactly 42 degrees. Let's take it step by step.
Why you need the sun at your back
A raindrop is a bit like a glass ball. When light enters, it bends slightly at the boundary between water and air (the same reason a straw looks bent in a glass of water).
Light travelling through the drop hits the far wall. Some of it escapes, but some bounces back like a mirror. Then it bends again on the way out.
The overall result: the light heads back roughly the way it came. This single fact defines everything about a rainbow's behaviour. A raindrop isn't a window that lets light through — it's a device that sends light back.
That's why rainbow light reaches your eyes from the direction opposite the sun. Unless the sun is behind you, that light can't reach you at all.
Why an "arc"? — the meaning of 42 degrees
Here's the most interesting part. Light returning from a raindrop doesn't spread out evenly in all directions. It piles up tightly around one angle: about 42 degrees.
The exact return angle depends on where the light strikes the drop. But if you work through the numbers, the angle hits a "dead end" around 42 degrees and never goes any higher. Near that dead end, lots of light rays end up bunched at the same angle. That's why only the 42-degree direction shines dramatically bright.
So where in the sky is "42 degrees"? The reference point is the direction your shadow points. That's the spot directly opposite the sun. Trace every direction 42 degrees away from it, all the way around, and you get a circle.
Since the ground blocks the lower half of that circle, we only ever see a half-circle arc. From an aeroplane or a high mountain, you can sometimes see a full circular rainbow.
Where a rainbow appears depends only on where your eye is and where the sun is. Move just one metre, and an entirely different set of raindrops now satisfies the 42-degree condition. A rainbow is constantly being rebuilt out of "different raindrops."
The rainbow the person next to you sees was made by different raindrops. Two people can never, even in principle, see the exact same rainbow. And the reason you can't walk up to it isn't distance — a rainbow isn't a thing, it's an "angle condition." As you walk, the place that satisfies that condition moves right along with you.
Colour order, and double rainbows
Colours separate because the amount of bending differs slightly by colour. It's the same thing that happens in a prism, splitting white light into rainbow colours — just happening inside a raindrop.
The return angle is about 42 degrees for red and about 40 degrees for violet. The larger angle, red, ends up on the outside; the smaller, violet, on the inside. So a rainbow is red on the outside, violet on the inside.
Look closely and you may spot a second, fainter rainbow outside the first. This is called the secondary rainbow. In it, light bounces twice inside each raindrop before coming out. That extra bounce shifts the angle to about 51 degrees, and reverses the colour order (violet outside, red inside).
Between the bright primary rainbow and the secondary one, the sky is noticeably darker than its surroundings. No light from either rainbow returns in that band. Next time you spot a rainbow, look for this dark strip between the two arcs as well.
It's a 42-degree relationship between you, the sun, and raindrops.
So why "seven colours"?
Notice that the number seven hasn't come up once so far. It couldn't have. Colour changes continuously — there's no actual boundary anywhere.
Counting seven colours is a matter of culture, not physics. Newton is generally credited with dividing the rainbow into seven. One well-known account says he was drawing a parallel with the seven notes of a musical scale.
In fact, the count varies by country and era. Some regions describe a rainbow as having six colours, and other cultures are reported to have used five, three, or even two. Older Japanese texts, too, show counts different from today's.
In other words, "how many colours is a rainbow?" has no correct physical answer. The light reaching your eye is identical either way — only the number of divisions people choose to draw differs. Drawing lines across something continuous is always a human job.
Something you can check in your garden or on a balcony
- On a sunny day, stand with your back to the sun. Early morning or evening, when the sun is low, works best
- Pinch the end of a hose, or use a spray bottle, to mist fine water toward your own shadow
- A rainbow appears, centred roughly around your shadow's head
- Move your body side to side and the rainbow follows you. This shows a rainbow isn't a fixed "place"
- Try the same thing facing the sun, and no rainbow appears — the angle condition isn't met
Try changing the direction you spray and see where the rainbow shows up. You can physically confirm the 42 degrees from your shadow's head rule. Always keep your back to the sun and never look directly at it.
Summary
A rainbow only appears opposite the sun because a raindrop is a device that sends light back the way it came. It looks like an arc because the returning light bunches up at 42 degrees, and the places that satisfy that condition trace out a circle. And the idea of "seven colours" belongs to people, not to light.
You can't walk up to a rainbow — not because it's far away.
It's because it isn't a place. It's a relationship.
The phenomenon of light splitting by wavelength is also behind why the ocean looks blue. Find out more in this article.
Want to know more? — terms, formulas, and textbook connectionsFrom middle-school science to topics still being researched, each level is labelled clearly.
- JHSCovered in lower-secondary (middle school) science
- HSCovered in upper-secondary "Physics Basics"/"Physics"
- HS+Upper-secondary "Physics," or advanced/column content in textbooks
- Univ.Not taught at high school — university-level optics/electromagnetism
- ResearchNot even settled "textbook fact" at university — an active research question
JHSTerms: the vocabulary of rainbows
- Refraction: light changing direction at the boundary between two substances. It's why a straw looks bent in water.
- Dispersion: white light splitting into colours because each colour refracts by a slightly different amount.
- Primary rainbow: the ordinary bright rainbow, from light bounced once inside a raindrop. Red on the outside.
- Secondary rainbow: the fainter rainbow outside the primary. Light bounced twice, at about 51 degrees, with reversed colour order.
- Antisolar point: the direction exactly opposite the sun — where your shadow's head points, and the centre of a rainbow's circle.
- Alexander's dark band: the darker strip between the primary and secondary rainbows. Said to be named for a record dating back to the 2nd century.
HSWorking it out with maths: how many full moons wide is a rainbow's band?
Plenty about rainbows can be calculated directly — the width of the band, the colour order, and even a prediction of "no rainbow today."
sin i = n × sin r
| i angle entering the water drop | in degrees |
| r angle after bending | in degrees |
| n refractive index of water | about 1.33 |
The key point is that n differs slightly by colour: about 1.331 for red, about 1.344 for violet. That 0.013 difference is the source of everything about a rainbow.
Working through the maths for light entering, bouncing once, and exiting gives return angles of about 42.4 degrees for red and about 40.6 degrees for violet. Everything from here follows from just those two numbers.
| Return angle for red | about 42.4° |
| Return angle for violet | about 40.6° |
| Width of rainbow band | 42.4 − 40.6 = 1.8° |
| Apparent size of full moon | about 0.5° |
| How many full moons wide | 1.8 ÷ 0.5 ≒ 3.6 moons |
A rainbow looks huge stretched across the sky, but its band is only about 3 to 4 full moons wide. Hold your arm out and stick up your little finger — it covers roughly 1 degree. A rainbow's band is about two little fingers wide, held at arm's length. Try checking next time you see one.
A rainbow appears as a ring centred on the point directly opposite the sun. So the higher the sun climbs, the deeper that centre sinks below the ground.
| Radius of rainbow ring | about 42° |
| When sun's altitude is 20° | 42 − 20 = 22° (height of rainbow's top) |
| When sun's altitude is 35° | 42 − 35 = 7° (a low, small rainbow) |
| When sun's altitude is 42° | 42 − 42 = 0° (sinks below the horizon) |
Once the sun climbs above 42°, the rainbow sinks below the horizon and can't be seen. This is said to be why people rarely recall seeing rainbows after midday showers in summer. Rainbows being more common at dawn and dusk isn't a coincidence — it falls straight out of the formula.
※ From high ground or an aeroplane, you can see below the horizon too, so near-full-circle rainbows sometimes appear.
Sometimes a second, fainter rainbow appears outside the primary. This comes from light bounced twice inside a raindrop, and running the same calculation once more gives about 51 degrees.
| Angle of primary rainbow | about 42° |
| Angle of secondary rainbow | about 51° |
| Gap between the two | 51 − 42 = 9° |
Adding one more bounce flips the light's path around partway through. That's why the secondary rainbow has violet outside and red inside — the reverse of the primary's colour order.
And that 9-degree gap between the two arcs is a range that no light returns from at all, from either rainbow. Look closely, and the sky between the primary and secondary arcs appears darker than the sky outside them. If you ever spot a rainbow, look for this dark band rather than the colours. It's a way to confirm the maths with your own eyes.
HS+The occasional "bonus rainbow"
Sometimes you'll see several faint fringes of green or violet layered just inside the primary rainbow. These are called supernumerary bows.
Here's the thing: they can't be explained at all if you treat light as travelling in straight "rays." If 42 degrees is a hard upper limit, there's no reason for light and dark bands to appear inside it.
What explains it is the wave nature of light. Light leaving a drop at the same angle can have travelled two different paths through it, and those two waves interfere, reinforcing or cancelling each other. That's what creates the stripes.
It also matters historically. This effect simply cannot be explained if light is treated as particles, so it became one of the pieces of evidence supporting the wave theory of light. Look up at the sky, and you're looking at proof that light is a wave.
Univ.The "complete" theory of the rainbow is surprisingly recent
The theory of the rainbow came together in stages: Descartes's geometrical-optics explanation (1637), Newton's explanation of colour dispersion (around 1666), and Airy theory, which explains supernumerary bows (1838).
But Airy theory is also an approximation, and for a long time nobody knew exactly how accurate it was. A rigorous treatment requires solving the problem of electromagnetic waves striking a sphere directly from Maxwell's equations — this is Mie theory (1908).
The trouble is that Mie theory's series converges slowly, making it hard to get a clear picture of behaviour near the rainbow angle. In the 1970s, analysis using complex angular momentum theory (CAM theory) finally tied together geometrical optics, Airy theory, and the exact solution. Despite being such a familiar everyday phenomenon, the theory wasn't fully settled until the late 20th century.
Note that when water droplets are extremely small (as in fog), the colours blend into a white fogbow (white rainbow). This too is explained by how diffraction behaves differently depending on droplet size.
ResearchStill under debate
- "How many colours is a rainbow?" is a genuine topic in colour-cognition research. It has long been known that languages divide colour into different numbers of categories, in different places, and the rainbow is a classic example. There's ongoing debate over whether colour vocabularies follow a universal order across cultures, or are shaped instead by environment and language use. The number of rainbow colours is a question of cognition and language, not physics.
- Researchers are exploring using supernumerary bows to measure droplet size. Since the stripe spacing depends on a droplet's diameter, you can work backward from a photograph to estimate drop size. There are attempts to apply this to rainfall observation and spray evaluation, but the fact that droplets aren't perfectly spherical (larger ones flatten) remains a barrier to accuracy.
- Accurately reproducing a rainbow's exact "colour" by calculation is still difficult. The actual appearance depends on the distribution of droplet sizes, the sun's apparent size, the brightness of the background sky, and even how the human eye adapts. Producing a "convincingly real" rainbow colour, whether in a photo or a simulation, still isn't simple.
- Reports of rare rainbows keep growing. Supernumerary bows, fogbows, moonbows made by moonlight, and third- and fourth-order rainbows (extremely faint in nature — the first reported photographs date to around 2011). It's fascinating that a phenomenon people have looked up at for centuries can still yield new discoveries.
Connections to the curriculum (by level)
| Level | Subject/Unit | Where it appears here |
|---|---|---|
| JHS | Science: reflection and refraction of light / prisms and colour | Light bending and bouncing inside a raindrop |
| HS | Physics: waves / the law of refraction (Snell's law) | Deriving 42°, refractive index and colour dispersion |
| HS | Maths: trigonometric functions / maxima of functions | The idea that the return angle reaches a maximum value |
| HS+ | Physics: interference of light (advanced topic in many textbooks) | Supernumerary bows, evidence for the wave theory of light |
| Univ. | Optics / electromagnetism | Airy theory, Mie theory, complex angular momentum theory |
| Research | Colour cognition/linguistics / atmospheric optics (unresolved) | Number of rainbow colours, droplet-size estimation from supernumerary bows, colour reproduction |
- Nussenzveig, H. M., The Theory of the Rainbow, Scientific American 236(4), 116–127, 1977 (history of rainbow theory and an explanation of complex angular momentum theory).
- Adam, J. A., The mathematical physics of rainbows and glories, Physics Reports 356(4–5), 229–365, 2002.
- Lee, R. L. & Fraser, A. B., The Rainbow Bridge: Rainbows in Art, Myth, and Science (the science and cultural history of rainbows).
- Berlin, B. & Kay, P., Basic Color Terms: Their Universality and Evolution, 1969, and other research on colour vocabulary (conclusions remain debated).
- Japan Meteorological Agency (気象庁), explanatory material on atmospheric optical phenomena.
※ Angle and refractive-index figures vary with wavelength and conditions. This article gives the commonly used approximate values.
※This article is a general-audience science explainer. The figures given are approximations meant to aid understanding and vary with conditions. When observing, never look directly at the sun — doing so can damage your eyes.