According to Snell's law, the ratio of the sine of the angle of incidence to the sine of the angle of refraction is constant for the light of a given color and for a given pair of media. This constant is known as the refractive index. Mathematically, , where is the angle of incidence, is the angle of refraction, andis the refractive index of medium 2 with respect to medium 1.
It is also defined in terms of the speed of light. The refractive index of a medium is defined as the ratio of the speed of light in air to the speed of light in the medium.
Mathematically, where is the speed of light in the first medium, and is the speed of light in the second medium.