What causes the arc of the rainbow?

We all know that rainbows are formed by the sun seen through water droplets. But what's the exact mechanism, why is the rainbow an arc, and what's the magic angle that you have to be standing at to see it?

As a child, I often found rainbows confusing. I knew that they were the result of the sun bouncing off raindrops, but if this was the case, why didn't I see a smear of color all over the sky? Or nothing at all? Surely the light blue bouncing off one raindrop would hit the green light bouncing off another and the red coming off another, and they'd all combine into regular light again. It made no sense to me that a massive rainstorm would combine with a heavenly object radiating massive amounts of light to make a neat little rainbow that fit in my eyeballs.

And, of course, they didn't. My eyeballs just happened to be in the right place, taking in the only light they could. When the sun hits a rainstorm, some of the light hits the raindrops, reflects off the back of them at an angle between 40 and 42 degrees. This light can go any direction, depending on the exact angle it comes in at, and it does. But your eyes are only in one place, and only capable of seeing the light that bounces back from that precise angle.

A more prosaic way to picture light would be to think of a wide stream of water. The water hits a wall, and bounces back. If you stand in front of the wall, you get hit with a bunch of water. Dummy.

Now pretend you can't feel water on your face and body. You can only feel it in the pupil of your eye. When you open your eyes you see water coming directly at you from where it hits directly in front of your iris. Water is also coming at you from the wall slightly to the side of the iris, but the only water to hit the iris would be if it happened to be a drop that bounced back at just the right angle. To your eyes, it looks like all the water is hitting the wall and coming back at the precise angle to hit your eye. It isn't. It's just that the only water the iris can see, and the only water you can sense, is the drops that come back in the right direction.

The light in a rainbow is a little like that, only because of the refraction of the raindrops, it can only bounce back at an angle of 40-42 degrees. This means that any light that hits the 'wall' directly in front of the pupil be refracted away. Only the ring of 'water' that hits at a 40-42 degree angle to your pupil will make it to your eye. Because different wavelength bend to different angles as they pass through material, the red longer wavelengths are closer to 42 degrees, and the blue shorter wavelengths are closer to forty. This is why rainbows are always curved, organized bands of color, and why they're always curved to the same degree. You only see the light coming at you from a certain angle, and so a mish-mash of colored light looks orderly.

Via The Straight Dope and The University of Illinois.