Prisms and the Rainbow
Refraction
Before we get to prisms we should begin with the physics concept, refraction. Refraction describes the change in direction of a light ray when it passes into a different material.
While all wavelengths of light move at c = 2.998*108 m/s in a vacuum where there is no air, they do not move at the same speed in matter (including the gasses that form air). This is because each atom will absorb the light energy, and then reemit the light energy to the next atom in the light's path. Although a near instant process, it does slightly delay the speed of light. Dispersion of Light by Prisms
Each material will affect the speed of light slightly differently, and this is dependant on the amount of energy required to put the atom or molecule at a higher energy state than its resting state Dispersion of Light by Prisms, this is a very precise unit of energy, unique to the atom or molecule. In order to put an atom or molecule into a higher energy state, the energy it recieves must be exactly equal to the difference between an excited state and its ground state (or lower excited state), portions of energy cannot be added up to equal this. Quantum Energy Levels in Atoms - LibreText Chemistry
The reason the light rays change direction when they hit a surface at an angle, is because light travels in waves. The speed of the wave changes and different peaks/valleys of the light ray hit the surface at the same time, so the light has to bend in order for the wave peaks and valleys to stay intact. See the gif above for illustration. The "slower" or "faster" the material is compared to the original, the greater the change.
The following diagrams represent light as bands rather than curvy waves. These bands represent the same peaks and valleys light travels in, where the colored line represents a peak, and the space between represents a valley. They are really the same width, but the line is drawn thinner for clarity. Note that the distance between the lines is not representative of the wavelength, which does not change. Rather it represents the position of a wave at a fixed time interval. Less frequent waves means they are faster (they get farther during the each time span), and more frequent indicates slowness (they don't get as far during the span).
It is important to note that if the light ray hits the surface at a 90 degree angle, while it will change speed, it will not change direction. This is because only one peak or valley will hit the surface at a time, thus they will not be broken up by a change in speed. The above diagram shows that, a wave hitting a surface so that only one peak or valley passes through it at a time.
Suppose the light hits the surface at a different angle, so that different peaks and valleys of the wave hit the surface at the same time. If the wave were to continue in the same direction through the change in material, its peaks and valleys would be broken up due to wave changing speed in the new material. However, it is not possible for a wave to be broken up like this.
Instead, the direction of the light bends in order for the waves to stay intact.
The index of refraction is a constant unique to a specific material, used to calculate the angle of refraction, how much the light is bent when passing from one material to another. The index of refaction for a material is related to the amount of energy required to excite the material to a higher energy state. The closer the energy of a specific wavelength of light is to that required to exite the material, the slower the light will move through said material.Dispersion of Light by Prisms (Recall that different colors of light have different wavelengths and amounts of energy: The Visible Spectrum)
Prisms and Dispersion
This illustration is from this wikipedia page
Prisms can split white light into the different wavelengths that make up white light (dispersion). Since the prism is a different material than air (such as glass or quartz), the photons travel at a slightly slower speed in said material. Even in the same material, different wavlengths of light will move at different rates through the material. This causes them to also go in different directions from each other. Different wavelenths of light have different frequencies (inversely proportional to wavelength), which determines the rate at which the waves move through a material. Violet light has the highest frequency and red light has the lowest frequency. Since violet wavlengths have more frequent waves, it is more affected when it hits an angled surface. The slightly different direction these wavelegths go in separates them, allowing the individual colors to be seen rather than just white light.
Consider this again: The closer the energy of a specific wavelength of light is to that required to exite the material, the slower the light will move through said material.Dispersion of Light by Prisms Also consider that violet light, with the highest frequency, also has the highest energy (red with the lowest frequency has the lowest energy). With higher energy, violet light will be slowed down the most by materials compared to other colors of light. This is true for materials that have excitation energies higher than wavelengths in the visible spectrum. On rare occasion there are materials that have excitation energies lower than the energy of wavelengths in the visible spectrum. Since red has the lowest energy, it will be closest to the material's and be slowed down the most, resulting in abnormal dispersion, where red is bent the most and violet is bent the least by a change in material. Radiation: Fundamental processes involved in the interaction of radiation with matter: Dispersion - Britannica
Being the slowest wavelength, the red light path is the least changed by refraction, leading it to be "on top". Violet is the most affected, thus it is on bottom.
The shape of prisms
diagram slightly edited from BarsMonster on StackExchangeMost glass windows do not throw rainbows when direct sunlight passes through them, however many leaded glass windows will (at the right time of day). Likewise a cube (or any rectangular prism) of glass/crystal will not separate white light into colors, but a pyramid or triangular prism will. This is because a normal window or cube has parallel surfaces that the light enters and exits. When the light exits the parallel glass surface, the lights refraction as it passes back into air is the reverse of that as it entered the glass, stopping the divergence, meaning the colors have only seperated for as long as they were in the relatively thin glass. Because a pyramid or beveled edge does not have parallel surfaces, the light upon exiting the glass will be additionally refracted, separating the colors further.
In the diagram above, the parallel rainbows (through a parallel faced material) will overlap, creating white again, except at the very edges where a red-yellow edge may be observed on one side and a blue-violet edge on the other side. Conversely, the converging surfaces separate the colors enough that each color forms their own band, only overlapping near the surface of the prism.
Why doesn’t a normal window produce an apparent rainbow?Here you can see a prism dispersing light into a rainbow, where the colors overlap closer to the prism.
Rainbows
So what do prisms have to do with the rainbows we see in the sky?
Basically, water droplets in the air act as prisms, splitting the white light from the sun into a spectrum of colors. Notice that the light is reflected by the inside of the water droplets. So the light enters the droplet, is reflected by the inside surface of the droplet, and then exits the droplet. Note that most of the light that enters the water drop passes right through it rather than reflecting, but this light does not form a rainbow, only those that are reflected within the drop do. This will be explained in an upcoming page.