Light travels at different speeds in different media. Each medium is characterized by an index of refraction defined as:
      
where c is the speed of light in free space, and v is the speed in that particular medium. When light reaches the interface between two media, its direction is changed according to Snell's Law:
      
Here, n1 and &theta1 refer to the index of refraction and the angle between the direction of light and the normal to the interface in the medium in front, and n2 and &theta2 to those in the medium behind the interface as shown on the diagram 1.
If the index of refraction of the first medium is known, the Snell's Law provides a way to determine the index of refraction of an unknown medium by simply measuring the two angles. Thus, the index of the second medium will be equal to:
      
|
 |
| Diagram 1 |
|