You may know how a rainbow forms. Sunlight gets reflected in rain drops at an angle of about 42 degrees. So we see the reflected light if you are somewhere on the scone of reflected rays. But differently, we see the reflected light from those droplets that appear to be on an arc, which is centered around the point opposite to the sun. And we don't see reflected light from any droplets away from this arc. The angle of reflection is slightly different for different wavelengths of light, which we see as different colors. So instead of one circular arc of reflected sunlight, we see a rainbow. It's a nice explanation, and not entirely wrong, but a full truth is much more interesting. Let's look at what happens within a single rain drop. The sunlight coming in from the left-hand side is broken or refracted, as it enters the rain drop. Then it is reflected on the inside of the rain drop, and finally refracted again when leaving it. The breaking of light is related to the fact that it moves more slowly in water than it does in air. The angle of reflection can be expressed using a formula called Snellslow. If you know some trigonometry, it's actually a good exercise to calculate these angles. We won't need exact formulas for this explanation to make sense, but if you manage to do this exercise, you'll notice that the angle of the outbound ray depends on how far from the center the inbound ray hits the rain drop. The angle, which is called alpha here, depends on the distance d from the center. In hindsight, this shouldn't be surprising. The angle certainly can't always be 42 degrees, because if the ray hits a droplet perfectly in the center, it will reflect back exactly the way it came. It's true that the angles depend a little on the wavelength of the light, too, but the effect of changing color is much smaller than the effect of moving to or from the center. Let's focus again on a single color and draw a graph to visualize the dependence of the angle alpha on the distance d. We start at t equal to zero, which means that the ray hits at the center and the angle is zero, too. When d increases, at first the angle alpha increases, too. After a while the graph flattens out and the angle reaches a maximum. When the ray moves even further from the center, the angle actually becomes smaller again. We see that, depending on the value of d, reflection is possible at any angle up to about 42 degrees. This is a bit strange, because it seems to imply that the rainbow would be a filled disk in the sky, rather than a circular arc. The reason rainbow's look the way they do is that this graph reaches a maximum value and then goes down again. Whenever a smooth graph has such a maximum, a large portion of the input values will have output values very close to the maximum. Another way to visualize this is to look at a lot of equally spaced incoming rays hitting our droplets. We see that the disproportionate amount of them reflect at or near the maximum angle. On the graph these rays correspond to input values evenly distributed over the horizontal axis. After moving them to their output values, we see that the outputs are concentrated near the maximum value. This effect becomes more obvious the more input rays we consider. Up to now we've only used light of a single wavelength. When the input rays are a mixture of wavelengths, we start to see separation of colors in the reflected rays near the maximum angle. We can play out the same story in our graph. If we pick very many points on the horizontal axis, their output values will accumulate even more clearly near the maximum value. The graphs for different wavelengths look very similar, with notable difference that the maximum value is slightly different for each one. Hence the vertical bars representing our outputs will be of slightly different height, depending on the color. One light is a mixture of different colors, so what we really want to know is what these colored bars look like when they overlap. This will give us a visual indication of how much light of which color is reflected at each angle. Finally, the light does not only get reflected vertically, but in all directions. So to visualize how the reflections actually look, we need to rotate this colored bar around its lowest points, which corresponds to the angle zero and would be exactly opposite to where the sun is in the sky. And voila, here's our rainbow. We see bright arcs of different colored lights, with a faint mix of colors inside of it, which looks more or less white to us. So next time you see a shiny rainbow, see if you can tell that the inside of it is slightly brighter than the outside.