In optics, a diffraction grating is an array of fine, parallel, equally spaced grooves ("rulings") on a reflecting or transparent substrate, which result in diffractive and mutual interference effects that concentrate reflected or transmitted electromagnetic energy in discrete directions, called "orders," or "spectral orders."
The groove dimensions and spacings are on the order of the wavelength in question. In the optical regime, in which the use of diffraction gratings is most common, there are many hundreds, or thousands, of grooves per millimeter.
Order zero corresponds to direct transmission or specular reflection. Higher orders result in deviation of the incident beam from the direction predicted by geometric (ray) optics. With a normal angle of incidence, the angle θ, the deviation of the diffracted ray from the direction predicted by geometric optics, is given by the following equation, where m is the spectral order, λ is the wavelength, and d is the spacing between corresponding parts of adjacent grooves:
Because the angle of deviation of the diffracted beam is wavelength-dependent, a diffraction grating is dispersive , i.e., it separates the incident beam spatially into its constituent wavelength components, producing a spectrum.
The spectral orders produced by diffraction gratings may overlap, depending on the spectral content of the incident beam and the number of grooves per unit distance on the grating. The higher the spectral order, the greater the overlap into the next-lower order.
By controlling the cross-sectional shape of the grooves, it is possible to concentrate most of the diffracted energy in the order of interest. This technique is called "blazing."
Originally high resolution diffraction gratings were ruled. The construction of high quality ruling engines was a large undertaking. A later photolithographic technique allows gratings to be created from a holographic interference pattern. Holographic gratings have sinusoidal grooves and so are not as bright, but are preferred in monochromators because they lead to a much lower stray light level than blazed gratings. A copying technique allows high quality replicas to be made from master gratings, this helps to lower costs of gratings.
Diffraction gratings are often used in monochromators and other optical instruments.
Ordinary pressed CD and DVD media are every-day examples of diffraction gratings and can be used to demonstrate the effect by shining an ordinary laser pointer onto the surface. This is a side effect of their manufacture, as they have a thin layer of aluminium with regular grooves pressed into it in a spiral pattern.
Source: adapted from a public domain entry in Federal Standard 1037C