
The angles are always measured relative to the normal to the surface.
The law of reflection is also consistent with the particle picture of light.
Refraction
Refraction is the bending of light as it passes between materials of different density.
The index of refraction of a material is the ratio of the speed of light in vacuum to the speed of light in that material:
where v is the speed of light in the material.n =c/v
The more dense the material, the slower the speed of light in that material. Thus n > 1 for all materials, and increases with increasing density. n = 1 in vacuum.
The frequency of light does not change when it passes from one medium to another. According to the formula v = l f , the wavelength must change. The index of refraction can therefore be written in terms of wavelengths as:
where l0 is the wavelength of the light in the vacuum and l is the wavelength of the light in the medium.n =l0/l
sin q1 l1 n1 v1 = = = sin q2 l2 n2 v2Where v1 and l1 are the speed and wavelength in medium 1, etc.

This relationship between the angles is called Snell's Law.Total Internal Reflection
The relation between the two angles is the same whether the ray is moving from medium 1 to 2 (so that q1 is the angle of incidence and q2 is the angle of refraction) or whether the ray moves from medium 2 to medium 1, so that q2 is the angle of incidence and q1 is the angle of refraction.
where n1 is the index of refraction of the less dense material, and n2 is the index of refraction of the more dense material.
sin qc = n1/n2 sin 90°= n1/n2
The formula for the critical angle shows that n2 must be greater than n1 for there to be total internal reflection. That is, medium 2 must be denser than medium 1. Otherwise sin qc > 1, which is not possible.
Dispersion
The velocity of light in a material, and hence its index of refraction, depends on the wavelength of the light. In general, n varies inversely with wavelength: it is greater for shorter wavelengths. This causes light inside materials to be refracted by different amounts according to the wavelength (or colour). This gives rise to the colours seen through a prism. Rainbows are caused by a combination of dispersion inside the raindrop and total internal reflection of light from the back of raindrops. The following is a chart giving the index of refraction for various wavelengths of light in glass.
| Color | Wavelength | Index of Refraction |
| blue | 434 nm | 1.528 |
| yellow | 550 nm | 1.517 |
| red | 700 nm | 1.510 |

For sizeable diffraction effects to occur the width of the opening must be of the same order or less than the wavelength of the light used.
Diffraction limits the resolving power of microscopes and other magnifying devices. If the object being viewed is smaller than the wavelength of light used, then the light diffracts around the object, and severely distorts the image. Thus microscopes using visible light have a resolving power of only about 600 nm » 10- 6m, but X-rays, whose wavelength is about 0.1 nm ( 10- 10 m) have a resolving power four orders of magnitude smaller.