A diffraction grating is typically made from a piece of glass or plastic upon which parallel grooves

are ruled very close together, many thousands per centimetre. This device reflects or refracts light

through an angle that depends on the wavelength. For example, if sunlight falls on a diffraction

grating (at the correct angle), then the sunlight will be broken up into its component colours to form

a rainbow. This phenomenon is similar to the dispersion of white light through a glass prism.

Gratings come in many different types and are used as building blocks in optical fibre devices.

Each type has its applications and advantages over the others. Instruments such as wave division

multiplexers (WDMs), light spectrum analysers, fibre amplifiers, etc. use diffraction gratings

as components.