A rainbow forms when sunlight enters falling raindrops, bends, reflects off the back of each drop, and bends again on the way out. Because each color bends by a slightly different amount, the white light fans out into a band of colors, with red on the outside and violet on the inside. You see it only when the sun is behind you and the rain is in front of you.
Why Rainbows Appear Where They Do
A rainbow is not an object hanging in the sky. It is a pattern of light that reaches your eye from a particular set of directions. That is why the geometry matters so much.
Sunlight has to strike the drops, and the light has to find a path back toward you. For that to happen, you need the sun behind you and the raindrops in front of you. Turn around, and the effect disappears. Stand between the sun and the rain, and the conditions are right.
There is another consequence. You always look in a fixed direction relative to the sun to see the bow. That direction is tied to the angle at which light leaves the drops, which we will get to shortly. Because of this, you cannot walk toward a rainbow and reach it. The angle stays the same, so the bow moves as you move. Each observer also sees their own rainbow, built from different drops.
How Light Bends Inside a Raindrop
Follow a single ray of sunlight into a single drop. The process has three stages, and each one changes the light’s direction.
Also read: Bird feeders: which one for which bird
Step one: refraction on entry
When light moves from air into water, it passes from one medium into another. That change of medium makes the ray bend at the front surface of the drop. This bending is called refraction.
Step two: reflection at the back
The bent ray crosses the drop and strikes the inside surface at the back. There, much of the light bounces back into the drop rather than escaping. This is the internal reflection.
Step three: refraction on exit
The reflected ray travels back across the drop and leaves through the front. As it passes from water back into air, it bends again.
The net result is two refractions and one reflection. Together they turn the light around and send it back toward the sky it came from. For the primary rainbow, the light leaves at an angle of 40 to 42 degrees from the antisolar direction, the point directly opposite the sun from your viewpoint. Billions of drops, each doing the same thing, add up to a visible arc.
The Physics: Why Red and Violet Take Different Paths
If all light behaved identically, a raindrop would send back a bright white patch rather than a band of colors. The colors appear because sunlight is a mix of many wavelengths, and water treats them differently.
Wavelength describes how the light’s electromagnetic field oscillates. Shorter wavelengths mean more vibrations per second. Visible light runs from about 400 nanometers for violet to about 650 nanometers for red, with the other colors in between.
The key fact is that the refractive index of water is not the same for every wavelength. Water is not a neutral medium for light. Each wavelength bends by a slightly different amount as it enters and leaves the drop. That is dispersion, and it is what separates the colors. It is not a simple geometric spreading of a single beam.
The effect on the angle is small but visible. Red light leaves at about 42 degrees, and violet light leaves at about 40 degrees. The whole spread of colors covers an arc of about 2 degrees, with the other colors falling in between.
Why Red Is Always on the Outside
The order of colors never changes in a primary rainbow. Red sits on the outer edge, and violet sits on the inner edge. The explanation follows directly from the physics above.
Red has the longer wavelength, and it is refracted less strongly than violet. After two refractions and one reflection, the red ray leaves the drop at the larger angle, about 42 degrees. Violet, bent more, leaves at about 40 degrees.
Your eye places each color according to the direction the light arrives from. Light leaving at the larger angle appears farther out on the arc. So red lands on the outside, and violet lands on the inside. This is not a mystery. The variation of water’s refractive index with wavelength accounts for it fully.
What You Might See Beyond the Primary Rainbow
Sometimes a second, fainter bow appears outside the first. It follows the same logic, extended by one step. Some of the light undergoes a second internal reflection inside the drop before it exits.
That extra reflection reverses the order of the colors. In the secondary arc, violet is on the outside and red is on the inside. A double rainbow shows up only when the light is intense enough for the fainter arc to be seen.
This is a natural extension of the primary bow, not a separate phenomenon, so it needs no new principles. The same refraction and dispersion are at work.
The Science of Color Separation: Dispersion Explained
In optics, dispersion is the separation of light into its component wavelengths because a material bends each wavelength by a different amount. Whenever a material’s refractive index depends on wavelength, white light entering it can spread into colors.
Rainbows are the most familiar natural example. Every raindrop acts as a tiny dispersing element, and the sky is full of them.
A glass prism offers a useful comparison. In a prism, white light is refracted as it enters and leaves, and the colors fan out into a spectrum. A raindrop does something similar, but its round shape and internal reflection send the light back toward the sun’s opposite side. The prism gives you a strip of colors on a surface. The drops give you an arc across the sky.
What This Explanation Leaves Out
The picture here uses an idealized, perfectly spherical drop. Real drops vary in size, and those differences affect the details of what you see. We have not tried to describe that here.
Several other questions are also outside this explanation. We do not give figures for how often rainbows occur in any region or season. We do not estimate how many drops make up a visible bow, since the exact order of magnitude is not settled. We do not cover the role of light polarization, or how fast refraction happens inside the water. Those topics call for more specialized treatment than the core mechanism needs.
What is established is the chain of cause and effect. Sunlight enters a drop, refracts, reflects off the back, and refracts again. Water bends each wavelength by a slightly different amount. The colors therefore leave at slightly different angles, red outermost and violet innermost, and you see them when the sun is at your back.


