Diffraction grating:

This is piece of transparent material such as glass or plastic on which thousands of parallel black lines have been drawn or etched. The gap between each line is exactly measured and is the same for all the grating. It is usually described as the number of lines per centimeter or millimeter.

Diffraction gratings are used for splitting light rays into component wavelengths as the angle of diffraction (change of direction) is dependent on the wavelength of the light.

Calculation of wavelength according to the angle of diffraction is carried out using a goniometer in which the angle is measured and the wavelength calculated using Bragg's equation: nλ = dsinΘ

Where n = an integer, λ = wavelength, d = width of the diffraction grating, Θ = the angle of diffration in radians.