system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: If all wavelengths of light travel at the same speed, what causes them to rainbow after exiting a glass prism?
gpt
A prism causes light to refract, which is described by the *refractive index* of the material. The refractive index is different for different waves of light, so that rays of different wave-lengths get refracted at different angles. White light, made up of many wave-lengths, is split up by the refraction and each colored ray will be cast in a slightly different place from the others. That's what produces the spectrum.