A diffraction grating is an optical component that splits white light into its constituent colours by interference rather than refraction. Where a prism bends different colours by different amounts, a diffraction grating produces a rainbow by constructive interference from thousands of evenly spaced lines or grooves. The result is a cleaner, more evenly spaced spectrum than a prism can provide. Here is how diffraction gratings work, the types available, and why they are essential in everything from chemistry labs to laser physics.
Think of a diffraction grating like a finely combed picket fence for light. Each gap between the pickets acts as a fresh source of waves. When the waves from every gap arrive at your eye in step, you see a bright spot. The angle of that bright spot depends on the colour — red is bent more than blue. Thousands of gaps working together produce a sharp, vivid rainbow.

How a diffraction grating works
Light is a wave. When it hits a diffraction grating, each groove or slit acts as a point source of secondary wavelets (the Huygens-Fresnel principle). These wavelets spread out and overlap. Where the wave from one groove is exactly in phase with the wave from the adjacent groove, they reinforce — that is constructive interference. Where they are out of phase, they cancel — destructive interference.
The condition for constructive interference is the grating equation:
d sin θ = nλ
- d = distance between adjacent grooves (grating spacing)
- θ = angle of the diffracted beam relative to the straight-through direction
- n = order number (0, 1, 2, ...)
- λ = wavelength of light
For a given grating, d is fixed. As λ changes (different colours), θ changes. The longer the wavelength, the larger the angle. Red light (≈700 nm) diffracts more than blue light (≈450 nm). This is how the grating spreads white light into a spectrum.
The grating spacing d is the inverse of the groove density. If a grating has 600 lines per millimetre, d = 1/600 mm = 1667 nm. The typical range is 300 to 2400 lines per millimetre — that is up to 60,000 lines per inch.
Transmission vs reflection gratings
| Feature | Transmission grating | Reflection grating |
|---|---|---|
| How light interacts | Passes through transparent grooves | Bounces off reflective grooves |
| Where spectrum appears | Far side of the grating | Same side as the source |
| Typical material | Glass or plastic with etched grooves | Metal-coated glass or polymer |
| Efficiency | Moderate | Higher (coating can be optimised) |
| Common use | Classroom spectroscopes, CD/DVD | Laboratory spectrometers, monochromators |
| Cost | Lower | Higher |
Transmission gratings are simpler and cheaper. You can make one with a CD or a piece of diffraction grating film. Reflection gratings are more efficient because the reflective coating can be designed to maximise brightness for a specific wavelength range. Most high-end spectrometers use reflection gratings.
Blazed diffraction gratings
A standard grating splits light into multiple orders (n = 0, 1, 2, ...). The zero order is just the un-diffracted straight-through beam. The first order is the brightest spectrum. Higher orders are progressively fainter. This is wasteful — the light is spread across several orders rather than concentrated where you want it.
A blazed grating solves this. The grooves are cut at a precise angle (the blaze angle) so that most of the light goes into a specific order. A 500 nm blazed grating might concentrate 80% of incident light into the first order. This dramatically improves the signal in a spectrometer, especially for faint sources like distant stars or low-concentration chemical samples.
Blazed gratings are the industry standard for most spectroscopic applications. The choice of blaze angle depends on the target wavelength range — ultraviolet, visible, or infrared.

Natural diffraction gratings
Diffraction gratings are not just man-made. Nature got there first.
Butterfly wings (Morpho genus) have microscopic scale structures that act as a diffraction grating, producing the brilliant blue colour that shifts with viewing angle. Peacock feathers use similar structures for their iridescent eye patterns. Opals contain regularly packed silica spheres that diffract light into shifting colours. Bird feathers, beetle shells, and even some plant petals use grating-like structures to produce structural colour.
Unlike pigment-based colour (which absorbs certain wavelengths), structural colour from diffraction gratings does not fade. The colours on a Morpho butterfly wing will last as long as the wing structure survives — centuries, in fossilised specimens.
Diffraction grating vs prism
Both split white light into a spectrum, but they do it differently:
| Feature | Diffraction grating | Prism |
|---|---|---|
| Mechanism | Interference (d sin θ = nλ) | Refraction (Snell's law) |
| Spectrum spacing | Even across colours | Compressed at red end, stretched at blue |
| Order overlap | Multiple orders (0, 1, 2...) | Single spectrum |
| Efficiency | Higher (especially blazed) | Lower (some light reflected/absorbed) |
| Material | Glass, metal, plastic | Glass or crystal |
| Durability | Robust (coating can scratch) | Prone to clouding, hygroscopic |
| Cost | £10–£5000 depending on quality | £5–£500 |
For most serious spectroscopy, gratings win. They give cleaner, more predictable spectra and can be optimised for specific wavelength ranges.
Applications of diffraction gratings
- Spectrometers: Identify chemical elements by their emission or absorption lines. Every chemistry lab has one.
- Monochromators: Select a single wavelength for experiments, lasers, or medical devices.
- CD and DVD readers: The laser reads data bits by detecting changes in the diffracted signal from the spiral track.
- Optical fibre telecommunications: Fibre Bragg gratings reflect specific wavelengths, used for signal filtering and dispersion compensation.
- Laser pulse compression: Diffraction gratings stretch and compress ultrafast laser pulses in chirped-pulse amplification.
- Holographic security: Embossed gratings on banknotes, passports, and credit cards produce the shifting colours that are hard to counterfeit.
- Astronomy: Spectrographs at observatories use large reflection gratings to analyse starlight and determine the chemical composition of distant stars and galaxies.
DIY experiment: CD diffraction grating
You can see a diffraction grating working with nothing more than a CD and a torch.
- Hold the CD under a desk lamp or in sunlight.
- Tilt it until you see rainbow colours reflecting off the surface.
- Shine a laser pointer at the CD surface at a shallow angle. You will see the laser spot split into several bright dots spreading out in a line.
The CD has a spiral data track with a spacing of about 1600 nm (roughly 625 lines per mm). This is a real reflection diffraction grating. The multiple dots correspond to different diffraction orders. You have just built a spectrometer.
For a full introduction to the topic, start with our pillar guide on what is diffraction. For everyday examples including CDs and butterfly wings, see examples of diffraction in everyday life. To understand how water and sound waves diffract around obstacles, read about the diffraction of a wave.
The Wikipedia diffraction grating page covers the history, theory, and fabrication methods in detail. The Shimadzu guide to diffraction gratings provides excellent technical diagrams and explanations from a major spectrometer manufacturer. For the physics of grating resolution and order overlap, the Edmund Optics grating application note is a reliable reference.
Frequently Asked Questions
What is a diffraction grating simple definition?
A diffraction grating is an optical component with a regular pattern of closely spaced lines or slits that splits white light into its component colours. The light spreads out at different angles depending on wavelength, creating a rainbow spectrum. Simple homemade diffraction gratings include CDs, DVDs, and even bird feathers.
What is the diffraction grating equation?
The diffraction grating equation is d sin θ = nλ, where d is the distance between adjacent grating lines (the grating spacing), θ is the angle of the diffracted beam measured from the straight-through direction, n is the order number (0, 1, 2, ...), and λ is the wavelength of light. For first-order blue light (450 nm) on a standard 600 lines/mm grating, θ works out to about 15.7°.
What is the difference between a transmission and reflection diffraction grating?
A transmission grating has transparent lines or slits that let light pass through, producing a spectrum on the far side. A reflection grating has reflective grooves that bounce light off the surface, creating the spectrum on the same side as the source. Reflection gratings are more efficient because the reflective coating can be optimised for specific wavelengths. Both use the grating equation d sin θ = nλ, but the geometry is mirrored.
What is a blazed diffraction grating?
A blazed diffraction grating has grooves cut at a specific angle (the blaze angle) to concentrate most of the diffracted light into a particular order. This increases efficiency for a chosen wavelength range. For example, a 500 nm blazed grating might put 80% of light into the first order instead of spreading it across many orders. Blazed gratings are the standard choice in most modern spectrometers.
What are some everyday examples of diffraction gratings?
CDs and DVDs are the most familiar example — the spiral data track acts as a reflection grating. Security holograms on credit cards and passports are embossed gratings. Butterfly wings and peacock feathers use natural grating structures to create iridescent colours. Even the shimmer on a smartphone screen protector can come from microscopic grating-like patterns.
Who invented the diffraction grating?
The American astronomer David Rittenhouse built the first diffraction grating in 1785 using human hair wound between threaded screws. The German optician Joseph von Fraunhofer independently reinvented the grating in 1821 using fine wire and later ruled glass plates. Fraunhofer used his gratings to discover the dark absorption lines in the solar spectrum, now called Fraunhofer lines.
