A rainbow is caused by light hitting water droplets in the air..

A rainbow is an optical illusion—it does not actually exist in a specific spot in the sky. The appearance of a rainbow depends on where you're standing and where the sun (or other source of light) is shining.

The sun or other source of light is usually behind the person seeing the rainbow.

Rainbows are the result of the refraction and reflection of light.

Light entering a water droplet is refracted. It is then reflected by the back of the droplet. As this reflected light leaves the droplet, it is refracted again, at multiple angles.

The radius of a rainbow is determined by the water droplets' refractive index. A refractive index is the measure of how much a ray of light refracts (bends) as it passes from one medium to another—from air to water, for example. A droplet with a high refractive index will help produce a rainbow with a smaller radius. Saltwater has a higher refractive index than freshwater, for instance, so rainbows formed by sea spray will be smaller than rainbows formed by rain.

Rainbows are actually full circles. Viewers in aircraft can sometimes see these circular rainbows.

Viewers on the ground can only see the light reflected by raindrops above the horizon. Because each person's horizon is a little different, no one actually sees a full rainbow from the ground.