Optics

Diffraction Grating

Many slits at spacing d sharpen interference into λ-resolving spectra

A diffraction grating is a periodic array of N slits (or grooves) at spacing d that produces sharp principal maxima at angles satisfying d sin θ_m = mλ (m = 0, ±1, ±2, …). Going from 2 slits (Young) to many: the principal maxima sharpen as 1/N², while their position is unchanged. Resolving power R = λ/Δλ = mN — with m = 1 and N = 10⁵, R = 10⁵ — easily resolving sodium D lines (Δλ = 0.6 nm at 589 nm, R needed ≈ 1000). Two types: transmission (light passes through) and reflection (e.g., echelle gratings used in astronomical spectroscopy). Invented by David Rittenhouse (1785, US) and Joseph von Fraunhofer (1821). Used in: monochromators, spectrometers (UV/Vis/IR), DVD readers (groove spacing 0.74 µm), CCD spectrographs, structural color in beetles and butterflies.

  • Maximad sin θ_m = mλ
  • Peak width∝ 1/N
  • Resolving powerR = mN
  • InventorsRittenhouse 1785, Fraunhofer 1821
  • DVD pitch0.74 µm
  • EchelleHigh-order m (30-100)

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why diffraction gratings matter

  • Spectroscopy. Every UV-visible-IR spectrometer in chemistry labs, environmental sensors, and industrial QC uses a grating. Element identification, quantitative concentration, reaction monitoring, and dye purity all begin with a grating dispersing light onto a detector.
  • Astronomy. Echelle spectrographs detect exoplanet Doppler shifts (HARPS reaches 1 m/s, ESPRESSO claims 10 cm/s — the Earth's pull on the Sun). Stellar classification, redshift surveys, galactic rotation curves, and the cosmic microwave background's blackbody spectrum all rely on gratings or grating-equivalent techniques.
  • Biology motifs. Morpho butterfly wings, scarab beetle elytra, peacock feathers, opals, and even certain fish skin produce structural color from natural diffraction gratings — periodic nano-scale ridges. These are evolutionarily-tuned photonic structures that don't fade like pigments.
  • Optical communications. Wavelength-division multiplexing fits dozens of independent data channels into one fiber by spacing them 50 GHz apart in frequency. Arrayed waveguide gratings (an integrated-optic version of a transmission grating) demultiplex these channels at receivers — every long-haul fiber terminus has one.
  • Monochromators and lasers. Selecting a narrow wavelength from a broadband source uses a grating-plus-slit combination. Tunable dye lasers and external-cavity diode lasers use a grating in Littrow configuration as a wavelength-selective end mirror, sweeping the laser frequency by rotating the grating.
  • X-ray crystallography. Crystal lattices are 3D natural gratings. Bragg's law nλ = 2d sinθ is the diffraction-grating equation in a different notation. Determining DNA, hemoglobin, ribosomes, and most known protein structures came from inverting crystal-grating diffraction patterns.
  • Acousto-optic and electro-optic modulators. An ultrasonic wave in a crystal creates a moving phase grating; light passing through diffracts off it, with first-order intensity controllable by the RF drive. Used in pulse-pickers, frequency shifters, beam deflectors in laser printing, and confocal microscopy.

Common misconceptions

  • "More slits = brighter overall." Not exactly. Doubling N quadruples the principal-maximum height but halves its width — total energy in the peak only doubles (proportional to total open area). The benefit is sharper resolution, not raw brightness.
  • "Any spacing works." The grating equation requires d ≥ λ for any first-order diffraction at all (otherwise sin θ > 1, no real angle). For visible light, d must be ≲ 2 µm to access reasonable spread; for X-rays, atomic-scale d works (crystal Bragg diffraction).
  • "Transmission gratings dominate." Reflection gratings dominate professional spectroscopy. They're easier to manufacture in large sizes (from a master ruled with a diamond stylus or holographically), they avoid bulk material absorption, and they can be coated for any wavelength range from EUV to far-IR.
  • "Order zero contains the spectrum." No — m = 0 is the undiffracted beam, all colors superimposed at the same angle. Spectra appear in m = ±1, ±2, etc. Some grating designs deliberately suppress m = 0 (dark central) to put more energy into useful orders.
  • "Resolving power depends on grating size only." R = mN, so it depends on illuminated number of slits, not physical size. Underfilling a large grating wastes its potential resolution. Overfilling spills light and creates ghost peaks. Match beam diameter to grating ruled width.
  • "Gratings work the same at every wavelength." Efficiency varies strongly with λ and m. Blazed gratings have grooves shaped to peak efficiency at a chosen 'blaze wavelength' in a chosen order, often achieving >80% efficiency there but <10% in adjacent orders. Choose the blaze for your application.

Frequently asked questions

How does increasing N sharpen the peaks?

The amplitude from N coherent slits sums to a geometric series: A(θ) ∝ sin(N φ/2)/sin(φ/2), where φ = 2π d sinθ/λ is the phase between adjacent slits. The intensity I = |A|² has principal maxima of value N² when φ is a multiple of 2π (the grating equation), with first zeros at distance Δφ = 2π/N. So the peak full-width-at-half-max scales as 1/N — the more slits, the narrower. Subsidiary maxima between principal peaks have amplitude ~1/N² of the principals and become irrelevant for large N.

What is the order m physically?

Order m counts how many wavelengths of path-length difference exist between light from neighboring slits when you reach a principal maximum. m = 0: zero path difference, the undiffracted central beam containing all colors. m = ±1: first-order spectra on each side, brightest dispersive peaks. m = ±2: second-order, fainter and more spread out. Higher orders overlap (m=2 of 400 nm coincides with m=1 of 800 nm), forcing order-sorting filters in broadband spectrometers. Echelle gratings deliberately operate at high m (up to ~100) to maximize dispersion.

What is the resolving power formula?

Resolving power R = λ/Δλ_min = mN, where m is the order and N is the total number of illuminated slits/grooves. Two wavelengths are 'just resolved' when the principal maximum of one falls on the first zero of the other (Rayleigh criterion applied to the angular peak shape). A modest grating with 600 grooves/mm illuminated over 50 mm gives N = 30,000; in first order R = 30,000 — easily resolving the sodium D doublet (Δλ = 0.6 nm at 589 nm needs R ≈ 1000). Top research gratings reach R > 10⁶.

How are echelle gratings used in astronomy?

Echelle gratings have coarse spacing (10-300 grooves/mm) with steep blaze angles (~70°) and operate at high orders (m = 30-100). The result: very high dispersion and resolving power in a compact instrument, but multiple orders overlap. A second cross-disperser (prism or low-density grating) separates the orders perpendicular to the echelle's axis, producing a 2D 'staircase' of spectral orders on the detector. Modern exoplanet hunters (HARPS, ESPRESSO) use echelle spectrographs to detect Doppler shifts of 10 cm/s — the wobble Earth induces on the Sun.

Why do DVDs show rainbow colors?

A DVD's data tracks have spacing d = 0.74 µm — very close to the wavelength of visible light (0.4-0.7 µm). The polished disc surface acts as a reflection grating. Different wavelengths of white light reflect at different angles per d sin θ = mλ, dispersing into a rainbow as you tilt the disc. CD spacing (1.6 µm) gives a coarser dispersion, BluRay (0.32 µm) is even finer. Butterfly wings, beetle elytra, and peacock feathers create iridescent structural color the same way — natural diffraction gratings refined by evolution.

How does a CCD spectrograph use a grating?

Light from the entrance slit collimates onto a grating; the grating disperses it angularly per d sin θ = mλ; a focusing lens images different wavelengths to different positions on a CCD. Each pixel column corresponds to a specific λ, with width determined by both the slit and the diffraction limit. A 2048-pixel CCD with a 600 g/mm grating spanning 400-700 nm gets ~0.15 nm/pixel — adequate for stellar absorption-line surveys, environmental gas analysis, or LIBS plasma spectroscopy. Modern instruments add Echelle plus cross-disperser plus 4K×4K CCD for R > 10⁵ over the full spectrum simultaneously.