Diffraction Grating and the Grating Equation
Tilt a compact disc under a desk lamp and the white glare shatters into a fan of pure spectral colours, each hue thrown to its own precise angle. The disc's data spiral is a track of equally spaced pits — an accidental diffraction grating — and what you are watching is one of the most useful tricks in all of classical optics: a periodic array of many coherent apertures sorting light by wavelength. A ruled grating does the same thing on purpose, with tens of thousands of grooves scored a fraction of a micrometre apart, and it is the dispersing heart of nearly every spectrometer built. Why does a periodic screen fan out colour? Send a plane wave onto grooves spaced a distance apart. Far downstream, the wavelets from neighbouring grooves travel along essentially parallel rays, so each is retarded from the last by the same path difference . In the few directions where that step equals a whole number of wavelengths, every one of the wavelets arrives crest-on-crest and the light piles up into a brilliant, razor-sharp maximum — a diffraction order. Because the whole-wavelength condition depends on , each colour lands at its own angle, and the array acts as a prism made of pure interference. The condition that fixes those angles is the grating equation, — arguably the most quoted single line in instrumental optics. It says nothing about brightness; that is the job of the single-groove diffraction envelope, which multiplies the sharp orders and can even extinguish some of them. Together the two factors — periodicity setting where, groove shape setting how bright — turn a scratched piece of glass into a precision wavelength ruler, and their consequences run from astronomical spectrographs to the pulse compressors of the highest-power lasers on Earth.
- A diffraction grating is a periodic array of coherent apertures of spacing ; the interference of the diffracted wavelets concentrates light into sharp principal maxima called orders.
- Those orders sit at the angles fixed by the grating equation , with integer order . Because depends on , white light fans into a spectrum.
- Only a finite set of orders exists: forces , so at normal incidence the highest order is simply .
- Brightness is set separately by the single-groove diffraction envelope ; where an envelope zero lands on a principal maximum () that order goes missing.
- Key idea: the grating equation is the principal-maximum condition of the -slit array factor — adjacent grooves differ by a whole wavelength, — while the single-groove envelope decides how much light each allowed order carries.
A grating fans colour because the interference of equally spaced coherent grooves is bright only where every wavelet is in step — where the adjacent-groove path difference is an integer number of wavelengths. That single condition, , fixes the angle of every order and, since it contains , disperses each wavelength to its own direction. The equation sets the positions of the orders; the diffraction pattern of one groove sets their relative brightness.
Where this lives today
The grating is the dispersing element of almost every spectrometer in use. In astronomy, echelle spectrographs run coarse gratings at high order (–) and cross-disperse the overlapping orders onto a detector, reaching resolving powers of and revealing stellar radial velocities down to metres per second — the technique behind exoplanet detection. In the laboratory, monochromators and Raman and fluorescence spectrometers all turn on , and tunable external-cavity diode lasers (Littrow and Littman–Metcalf designs) feed one grating order back into the gain medium, so rotating the grating tunes the laser mode-hop-free across tens of nanometres — indispensable for laser cooling and precision atomic spectroscopy. Beyond spectroscopy, a pair of parallel gratings introduces a wavelength-dependent path length, stretching and then recompressing femtosecond pulses; this chirped-pulse amplification is what makes the highest-peak-power lasers on Earth possible. In telecommunications, bulk and arrayed-waveguide gratings demultiplex the closely spaced wavelength channels of fibre-optic networks, and the very same interference condition, generalised to three dimensions, is Bragg's law — the foundation of X-ray crystallography and of the structural biology that reads out proteins and DNA.
The physical picture
Line up tiny loudspeakers a distance apart, all driven in phase. In any direction where each successive speaker's path to a distant listener is longer by exactly one whole wavelength, every wave arrives crest-on-crest and the sound is loudest — a giant maximum. Tilt off that direction and the wavelets fan out of step; with sources the cancellation is swift, so the maximum is sharp. Light through grooves does exactly this, and the whole-wavelength condition, generalised to allow an incident tilt , is the grating equation.
Two knobs act independently. The period fixes where the orders sit, because it sets the path step between neighbours; the shape and width of a single groove fix how bright each order is, because one groove's own Fraunhofer pattern — a for a plain slit, recalled from Single-Slit Diffraction — forms a slowly varying envelope over the sharp orders. Sharpness itself is a counting effect: to kill an order you need only make the first and last groove drift half a wavelength out of step, and with many grooves that misalignment accumulates over a tiny angle, so the peak is roughly times narrower than a two-slit fringe. The next figure puts real angles on the orders of a common laboratory grating.
Notice that the orders are not evenly spaced in angle: because the equation contains rather than , successive orders crowd toward , and a grating fine enough to have shows no diffracted order at all beyond the straight-through beam. This nonlinearity, and the strict ceiling , are as much a part of grating design as the dispersion itself.
The core equations
Everything starts from one geometric statement: for two adjacent grooves the total path difference is the exit-side lead minus the entrance-side lead , and a principal maximum occurs when that difference is a whole number of wavelengths. Setting it equal to gives the grating equation, valid identically for transmission and (with the appropriate sign convention) reflection gratings.
where: — groove spacing (period), so is the line density; — diffraction angle of the -th order, measured from the grating normal; — angle of incidence from the normal; — integer diffraction order, with the undeviated beam; — wavelength in the incident medium. Read physically: each order is a direction in which every groove's wavelet lags its neighbour by exactly whole wavelengths, so all add in phase. At normal incidence () it reduces to the symmetric . Because a sine can never exceed one, only a finite number of orders can satisfy equation . Requiring turns into a hard bound on : the grating simply cannot diffract into angles past grazing, and the highest usable order is fixed by how many wavelengths fit into a period.
where: — the floor function (largest integer not exceeding its argument); the factor shows that oblique incidence buys extra orders on one side. At normal incidence this collapses to — for a l/mm grating at nm, , so and the third order is physically absent. Equation locates the orders but says nothing about their brightness. That comes from the full Fraunhofer intensity of slits of width and spacing : the diffraction pattern of a single groove (the form factor) multiplied by the interference pattern of the -point array (the array factor), owned in detail by N-Slit Interference.
where: — intensity a single groove sends forward; — half the phase spread across one groove of width ; — half the phase step between adjacent grooves, so the array factor peaks at , which is exactly equation ; — number of coherently illuminated grooves. The array factor sets the sharp orders and reaches height at each; the envelope tapers them and, at its zeros, can delete an order entirely.
The aim of this card is to show that the grating equation is not an extra postulate bolted onto interference but is literally the peak condition of the -groove array factor: sum the equal wavelets as a geometric series, take the modulus squared, and the whole-wavelength requirement drops out as the only way to make every groove add in phase. The same algebra hands over the peak height and the sharpness that makes a grating a precision instrument.
Step 1. Model the illuminated grating as identical grooves; the wavelet from groove carries the same single-groove amplitude but an extra phase relative to groove , where is the phase corresponding to the adjacent-groove path difference. Why: at far-field the rays from different grooves are parallel, so the only relative phase is the linear path lead multiplied by the wavenumber — a constant step from one groove to the next.
Step 2. Sum the phasors as a geometric series: . Using the modulus squared is , writing . Why: the common ratio makes the sum a closed geometric form, and the standard chord identity turns it into the compact array factor whose square is the observable intensity.
Step 3. Locate the principal maxima. Both numerator and denominator vanish when for integer ; l'Hôpital's rule gives the ratio , so the intensity there is — the tallest peaks in the pattern. Why: is precisely where every groove's phase is an integer multiple of , so all amplitudes align; the finite limit is , the coherent sum of equal unit phasors.
Step 4. Translate back through to get — the grating equation, now revealed as the condition that adjacent grooves differ by a whole wavelength. Between consecutive principals the array factor passes through zeros (at , ), which is why the peaks are times narrower than a single fringe. Why: the principal-maximum condition and the classical path-difference argument are the same statement seen from two sides — phase alignment of the array is whole-wavelength lead between neighbours. *Verified: geometric-series sum, peak height, and checked symbolically and numerically in verify_aq-optics-grating-equation.py.*
Go deeper · Derivation B · 2 minCounting the orders and finding the ones that vanish
This card answers two design questions with one pattern: how many orders a grating can produce, and why some allowed orders carry no light. The order count follows from the geometric ceiling , while the missing orders follow from the other factor — the single-groove envelope — placing a zero exactly on a principal maximum. Both are simple once equations and are read together.
Step 1. Impose on equation . With , the requirement rearranges to ; taking the floor gives the integer bound . Why: no real diffraction angle exists once the required sine exceeds unity, so orders beyond the ceiling are evanescent, not merely faint — they simply are not launched.
Step 2. At normal incidence this is : a l/mm grating ( nm) at nm has , so and orders exist only for — five diffracted beams. Why: the period holds only wavelengths of transverse lead, and you cannot demand three whole wavelengths of path difference from a step that short.
Step 3. Now find the missing orders. The envelope is zero when , i.e. ; a principal maximum sits where . Dividing the two, an order is extinguished when — the shared angle cancels. Why: total intensity is the product of envelope and array factor, so wherever the single-groove pattern is dark the bright interference order is multiplied by zero, regardless of how perfectly the grooves add in phase.
Step 4. Read off the rule: if is an integer , then orders vanish. A slit width equal to half the period () removes every even order; as the ratio and all orders fall on envelope zeros, correctly collapsing the grating to one wide slit that shows only its . Why: the envelope is the Fourier transform of one groove, so its zeros are a fixed geometric property of the groove width, independent of how many grooves are ruled. *Verified: at nm, the seven-order count, and the missing-order relation in verify_aq-optics-grating-equation.py.*
Limiting cases
The grating equation and its intensity contain every simpler interference result as a special case.
| Case | Result | Meaning |
|---|---|---|
| Two grooves, | (under the envelope) | Young's double-slit fringes; broad, equal maxima with no subsidiary structure |
| Normal incidence, | the classic symmetric spectrum spread about the beam | |
| Littrow / autocollimation | order retraces the incident ray (); the blaze condition of Blazed Gratings | |
| Fine grating, | only survives | no dispersed orders exist; used as a sub-wavelength "zero-order" grating |
| Coarse limit, | orders merge into the envelope | one wide slit; only the single-groove remains |
| Many grooves, | delta-like orders, large | ideal grating; resolving power limited only by illuminated width |
Worked examples
1 · Reading the orders of a laboratory grating (confidence builder)
A lines/mm transmission grating is illuminated at normal incidence by a helium–neon laser, nm. Find the angles of all diffracted orders.
Step 1. Convert the line density to a period: mm . This is the single length that fixes the whole pattern.
Step 2. Count the orders first, so you know how many angles to expect. At normal incidence , so only exist — five beams in all. The would-be third order needs and simply is not launched.
Step 3. Apply . First order: , so . Second order: , so .
Step 4. Note the crowding toward grazing: doubling the order from to more than doubled the angle (), because the equation works in , not . Orders at , , ; the third order is forbidden ().
2 · How the grating fans colour (exam level)
The same l/mm grating is used at normal incidence in first order. Where do blue light ( nm) and red light ( nm) emerge, and what is their angular separation?
Step 1. Blue in first order: , so . Blue, the shorter wavelength, bends least — the opposite of a glass prism, and a classic exam trap.
Step 2. Red in first order: , so . The longer wavelength is thrown wider.
Step 3. The angular spread across this slice of the visible is in first order alone. Because grows with , second order would fan the same colours nearly twice as far apart — the reason spectrographs work in the highest order the free spectral range allows. Blue at , red at , a first-order spectrum with blue nearest the axis.
Physics of the portrait
The portrait here is not a person but the device itself — the diffraction grating, a periodic array of coherent apertures that has outlived every individual who shaped it. It is best understood as an object whose entire behaviour is dictated by one number, its period .
Origins · 1 mindiffraction grating and how this was discovered
The diffraction grating is the purest interference instrument in optics: a screen whose transmission repeats every , so that its far field is the Fourier transform of one groove sampled onto a comb of orders. Everything about it flows from that periodicity. The order angles depend only on and through ; the sharpness and resolving power depend only on the number of illuminated periods (); the brightness of each order depends only on the shape of a single groove. Its lineage runs from David Rittenhouse, who in the 1780s strung a few dozen hairs across a pair of screws and saw the orders fan out, through Joseph von Fraunhofer, who ruled the first precision gratings and used them to measure the wavelengths of light and the dark solar lines that bear his name, to Henry Rowland, whose ruling engines and concave gratings turned spectroscopy into an exact science. The grating outgrew all of them: today it is written holographically, etched in silicon, blazed into echelles, and folded into the arrayed-waveguide chips that route the internet — but it remains, at heart, coherent sources adding in phase wherever the path steps by a whole wavelength.
Going further
Texts. Hecht, Optics, 5th ed., §10.2.7 (The Diffraction Grating) · Foot, Atomic Physics, §2 and the appendix on spectroscopic resolution · Saleh & Teich, Fundamentals of Photonics, 3rd ed., Ch. 4 (Fourier optics of periodic apertures) · Demtröder, Laser Spectroscopy, Ch. 4 (spectroscopic instrumentation) · Born & Wolf, Principles of Optics, 7th ed., §8.6 (diffraction gratings).
Provenance. Grating equation, -slit intensity, angular dispersion, , free spectral range and missing-order conditions are standard results in Hecht Optics §10.2.7 and Saleh & Teich ch. 4; the Littrow/blaze relation and spectroscopic use appear in Demtröder Laser Spectroscopy ch. 4 and Foot Atomic Physics. A verifier should reproduce: (1) the geometric-series sum giving ; (2) implicit differentiation yielding ; (3) via the Rayleigh criterion; (4) the numerical order count ( for l/mm at nm) and sodium-doublet grooves (). All numbers are standard textbook results; none fabricated.
Prerequisites. Fraunhofer Diffraction · Single-Slit Diffraction · Huygens–Fresnel Principle. Leads to. N-Slit Interference · Grating Resolving Power and Dispersion · Blazed Gratings · Free Spectral Range and Grating Orders.
Is the grating equation the same for transmission and reflection gratings?
Yes — it is one piece of physics with a sign convention. The condition is always that adjacent grooves differ in path by ; writing it as works for transmission, while for a reflection grating one measures both angles on the same side of the normal and it reads . The two forms differ only in how the angles are signed, because a reflected beam leaves on the incidence side. The dispersion, the order count and the resolving power are identical; only the geometry of "which way is positive" changes.
Why does blue light bend less than red at a grating, the reverse of a prism?
Because a grating disperses by interference, not refraction. Its order angle obeys , which grows with wavelength, so the long-wavelength red is thrown to the larger angle and short-wavelength blue stays nearest the axis. A prism instead disperses by the wavelength dependence of the refractive index, which is normally larger for blue, bending blue more. Same rainbow, opposite ordering — a favourite way to tell at a glance whether a spectrum came from a grating or a prism.
How many grooves do I actually need — does N appear in the grating equation?
Not in equation : the order angles depend only on , and the incidence angle, so even two grooves land their maxima at the same places as a million. What controls is sharpness and resolving power. Each principal maximum is about times narrower than a two-slit fringe, and the chromatic resolving power is , so separating close spectral lines is entirely a matter of illuminating many grooves. A ruling can be perfect, but if your beam lights up only a hundred lines you get only .
What sets the brightness of each order if the grating equation does not?
The diffraction pattern of a single groove — the envelope in equation , or a more elaborate profile for a shaped facet. The array factor decides where the orders are and makes them sharp; the envelope decides how much light each one gets, tapering off toward large angles and dropping to exactly zero at . This is precisely the knob a blazed grating exploits: tilting the groove facets slides the envelope's peak onto a chosen non-zero order, so most of the light goes there instead of into the useless beam.
Why can't I approximate sinθ ≈ θ in the grating equation?
Because gratings routinely work at large angles where the approximation fails badly. At the second order of a l/mm grating, , and while the radian value — a error that would misplace a spectral line by degrees. Small-angle approximations are safe only near the axis; for the whole range of a real spectrometer you must keep . It is also , not , that carries the strict ceiling which limits the number of orders.
What happens when two orders of different wavelengths land at the same angle?
They overlap, and the spectrum is ambiguous. Whenever the orders coincide — for instance nm in first order sits exactly where nm sits in third order. The clean, non-overlapping wavelength span in a given order is the free spectral range , developed in Free Spectral Range and Grating Orders. High orders give beautiful dispersion but a small free spectral range, which is why echelle spectrographs add a cross-disperser to peel the stacked orders apart onto a two-dimensional detector.