system
Given the following post, respond as if you're commenting on Reddit:
human
Why does blue light travel slower in glass than red light?

I understand that blue light slows by more and therefore refracts by more, but I'm not entirely sure why blue light travels slower in, say glass, than red.
gpt
The two parameters that govern the speed of light are the electric permittivity (epsilon) and magnetic permeability (mu) of the medium the light is traveling through.  You can loosely think of these two parameters as describing how much the medium resists changes in the EM field.  The vacuum permittivity and vacuum permeability are not dependent on wavelength, and so the speed of light *in vacuum* is also not dependent on wavelength.

**However**, when light travels through a material, the speed of light *does* depend on wavelength (though we should really be thinking in terms of frequency, with the understanding that wavelength and frequency describe loosely the same attribute of the optical wave).  Materials are made up of charged particles which can interact with the optical wave that is traveling through the medium.  Remember, electrically charged particles have their own electric field and will be pushed around by the electric field of the optical wave, this impacts the electric permittivity and magnetic permeability of the material, so the speed of light in a material will be different than the speed of light in vacuum (since there are charges that the EM wave can push around as it travels through the material).  You can think of each electron as being attached to springs - the incoming EM field can then interact with the electrons, pushing them back and forth.  Continuing with this analogy, the speed of the EM wave depends on how 'stiff' the 'springs' are.  In reality, the 'stiffness' is simply the electric permittivity and permeably of the material.  These two parameters depend on the material, as well as the frequency of light - that is, a low frequency wave will drive the electrons back and slowly while a high frequency wave will try to drive the electrons back and forth faster (sometimes so fast the electron's don't follow the EM field very well).

The index of refraction of a material is related to the permittivity and permeability of that particular material.  More commonly, we use the index of refraction to describe how fast light travels in a material.  The phenomenon you describe in your question is called *dispersion*, which is essentially wavelength dependent index of refraction.  All materials have a dispersion curve which shows the index of refraction as a function of wavelength for a particular material.