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 NN grooves spaced a distance dd 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 dsin⁡θd\sin\theta. In the few directions where that step equals a whole number of wavelengths, every one of the NN 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 λ\lambda, 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, d(sin⁡θm−sin⁡θi)=mλd(\sin\theta_m-\sin\theta_i)=m\lambda — 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.

Key takeaways
  • A diffraction grating is a periodic array of NN coherent apertures of spacing dd; the interference of the NN diffracted wavelets concentrates light into sharp principal maxima called orders.
  • Those orders sit at the angles fixed by the grating equation d(sin⁡θm−sin⁡θi)=mλd(\sin\theta_m-\sin\theta_i)=m\lambda, with integer order mm. Because θm\theta_m depends on λ\lambda, white light fans into a spectrum.
  • Only a finite set of orders exists: ∣sin⁡θm∣≤1|\sin\theta_m|\le1 forces ∣m∣≤⌊d(1+∣sin⁡θi∣)/λ⌋|m|\le\lfloor d(1+|\sin\theta_i|)/\lambda\rfloor, so at normal incidence the highest order is simply ⌊d/λ⌋\lfloor d/\lambda\rfloor.
  • Brightness is set separately by the single-groove diffraction envelope sinc2β\mathrm{sinc}^2\beta; where an envelope zero lands on a principal maximum (d/a=m/pd/a=m/p) that order goes missing.
  • Key idea: the grating equation is the principal-maximum condition γ=mπ\gamma=m\pi of the NN-slit array factor — adjacent grooves differ by a whole wavelength, d(sin⁡θm−sin⁡θi)=mλd(\sin\theta_m-\sin\theta_i)=m\lambda — while the single-groove envelope decides how much light each allowed order carries.
The core insight

A grating fans colour because the interference of NN equally spaced coherent grooves is bright only where every wavelet is in step — where the adjacent-groove path difference d(sin⁡θm−sin⁡θi)d(\sin\theta_m-\sin\theta_i) is an integer number of wavelengths. That single condition, d(sin⁡θm−sin⁡θi)=mλd(\sin\theta_m-\sin\theta_i)=m\lambda, fixes the angle of every order and, since it contains λ\lambda, 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 (m∼10m\sim10–100100) and cross-disperse the overlapping orders onto a detector, reaching resolving powers of 10510^5 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 dsin⁡θm=mλd\sin\theta_m=m\lambda, 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 NN tiny loudspeakers a distance dd 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 NN sources the cancellation is swift, so the maximum is sharp. Light through NN grooves does exactly this, and the whole-wavelength condition, generalised to allow an incident tilt θi\theta_i, is the grating equation.

Figure
N equally spaced grooves diffract an incoming plane wave into parallel rays at angle θ; adjacent grooves differ in path by d·sinθ, so an order is bright when d·sinθ = mλ
A grating is N coherent grooves: adjacent paths differ by d·sinθ, bright when d·sinθ = mλ plane wave in d θ parallel diffracted rays path-difference detail d d·sinθ a diffracted order is bright when the adjacent-groove path difference d·sinθ = mλ

Two knobs act independently. The period dd fixes where the orders sit, because it sets the path step between neighbours; the shape and width aa of a single groove fix how bright each order is, because one groove's own Fraunhofer pattern — a sinc2\mathrm{sinc}^2 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 NN times narrower than a two-slit fringe. The next figure puts real angles on the orders of a common laboratory grating.

Figure
Orders of a 600 l/mm grating (d = 1666.67 nm) at λ = 633 nm, normal incidence: m=0 straight through, m=±1 at 22.32°, m=±2 at 49.43°; m=3 would need sinθ = 1.14 > 1, so it does not exist — m_max = ⌊d/λ⌋ = 2
Where the orders land: 600 l/mm grating, λ = 633 nm, normal incidence grating (normal points straight up) m = 0 m = +1 22.32° m = −1 m = +2 49.43° m = −2 m = 3 forbidden sinθ = 3λ/d = 1.14 > 1 d/λ = 2.633 ⟹ m_max = ⌊d/λ⌋ = 2

Notice that the orders are not evenly spaced in angle: because the equation contains sin⁡θ\sin\theta rather than θ\theta, successive orders crowd toward 90∘90^\circ, and a grating fine enough to have d<λd<\lambda shows no diffracted order at all beyond the straight-through beam. This nonlinearity, and the strict ceiling ∣sin⁡θm∣≤1|\sin\theta_m|\le1, 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 dsin⁡θmd\sin\theta_m minus the entrance-side lead dsin⁡θid\sin\theta_i, and a principal maximum occurs when that difference is a whole number of wavelengths. Setting it equal to mλm\lambda gives the grating equation, valid identically for transmission and (with the appropriate sign convention) reflection gratings.

d(sin⁡θm−sin⁡θi)=mλ,m∈Z(1)d\left(\sin\theta_m-\sin\theta_i\right)=m\lambda,\qquad m\in\mathbb{Z} \qquad (1)

where: dd — groove spacing (period), so 1/d1/d is the line density; θm\theta_m — diffraction angle of the mm-th order, measured from the grating normal; θi\theta_i — angle of incidence from the normal; mm — integer diffraction order, with m=0m=0 the undeviated beam; λ\lambda — wavelength in the incident medium. Read physically: each order is a direction in which every groove's wavelet lags its neighbour by exactly mm whole wavelengths, so all NN add in phase. At normal incidence (θi=0\theta_i=0) it reduces to the symmetric dsin⁡θm=mλd\sin\theta_m=m\lambda. Because a sine can never exceed one, only a finite number of orders can satisfy equation (1)(1). Requiring ∣sin⁡θm∣≤1|\sin\theta_m|\le1 turns into a hard bound on ∣m∣|m|: the grating simply cannot diffract into angles past grazing, and the highest usable order is fixed by how many wavelengths fit into a period.

∣m∣  ≤  ⌊d(1+∣sin⁡θi∣)λ⌋(2)|m|\;\le\;\left\lfloor\frac{d\left(1+|\sin\theta_i|\right)}{\lambda}\right\rfloor \qquad (2)

where: ⌊⋅⌋\lfloor\cdot\rfloor — the floor function (largest integer not exceeding its argument); the factor 1+∣sin⁡θi∣1+|\sin\theta_i| shows that oblique incidence buys extra orders on one side. At normal incidence this collapses to mmax⁡=⌊d/λ⌋m_{\max}=\lfloor d/\lambda\rfloor — for a 600600 l/mm grating at λ=633\lambda=633 nm, d/λ=2.633d/\lambda=2.633, so mmax⁡=2m_{\max}=2 and the third order is physically absent. Equation (1)(1) locates the orders but says nothing about their brightness. That comes from the full Fraunhofer intensity of NN slits of width aa and spacing dd: the diffraction pattern of a single groove (the form factor) multiplied by the interference pattern of the NN-point array (the array factor), owned in detail by N-Slit Interference.

I(θ)=I0 (sin⁡ββ)2⏟single-groove envelope[sin⁡(Nγ)sin⁡γ]2⏟array factor,β=πaλsin⁡θ,  γ=πdλ(sin⁡θ−sin⁡θi)(3)I(\theta)=I_0\,\underbrace{\left(\frac{\sin\beta}{\beta}\right)^2}_{\text{single-groove envelope}}\underbrace{\left[\frac{\sin(N\gamma)}{\sin\gamma}\right]^2}_{\text{array factor}},\quad \beta=\frac{\pi a}{\lambda}\sin\theta,\ \ \gamma=\frac{\pi d}{\lambda}\left(\sin\theta-\sin\theta_i\right) \qquad (3)

where: I0I_0 — intensity a single groove sends forward; β\beta — half the phase spread across one groove of width aa; γ\gamma — half the phase step between adjacent grooves, so the array factor peaks at γ=mπ\gamma=m\pi, which is exactly equation (1)(1); NN — number of coherently illuminated grooves. The array factor sets the sharp orders and reaches height N2N^2 at each; the envelope sinc2β\mathrm{sinc}^2\beta tapers them and, at its zeros, can delete an order entirely.

Derivation AThe grating equation as the array-factor principal maximum

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 NN-groove array factor: sum the NN equal wavelets as a geometric series, take the modulus squared, and the whole-wavelength requirement γ=mπ\gamma=m\pi drops out as the only way to make every groove add in phase. The same algebra hands over the peak height N2N^2 and the sharpness that makes a grating a precision instrument.

Step 1. Model the illuminated grating as NN identical grooves; the wavelet from groove nn carries the same single-groove amplitude but an extra phase nδn\delta relative to groove 00, where δ=(2π/λ) d(sin⁡θ−sin⁡θi)=2γ\delta=(2\pi/\lambda)\,d(\sin\theta-\sin\theta_i)=2\gamma 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 d(sin⁡θ−sin⁡θi)d(\sin\theta-\sin\theta_i) multiplied by the wavenumber — a constant step from one groove to the next.

Step 2. Sum the phasors as a geometric series: A=A0∑n=0N−1einδ=A0 1−eiNδ1−eiδA=A_0\sum_{n=0}^{N-1}e^{in\delta}=A_0\,\dfrac{1-e^{iN\delta}}{1-e^{i\delta}}. Using ∣1−eix∣=2∣sin⁡(x/2)∣|1-e^{ix}|=2|\sin(x/2)| the modulus squared is ∣A∣2=A02[sin⁡(Nδ/2)/sin⁡(δ/2)]2=A02[sin⁡(Nγ)/sin⁡γ]2|A|^2=A_0^2\big[\sin(N\delta/2)/\sin(\delta/2)\big]^2=A_0^2\big[\sin(N\gamma)/\sin\gamma\big]^2, writing γ=δ/2\gamma=\delta/2. Why: the common ratio eiδe^{i\delta} 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 γ=mπ\gamma=m\pi for integer mm; l'Hôpital's rule gives the ratio →N\to N, so the intensity there is N2A02N^2A_0^2 — the tallest peaks in the pattern. Why: γ=mπ\gamma=m\pi is precisely where every groove's phase is an integer multiple of 2π2\pi, so all NN amplitudes align; the finite 0/00/0 limit is NN, the coherent sum of NN equal unit phasors.

Step 4. Translate γ=mπ\gamma=m\pi back through γ=(πd/λ)(sin⁡θ−sin⁡θi)\gamma=(\pi d/\lambda)(\sin\theta-\sin\theta_i) to get d(sin⁡θm−sin⁡θi)=mλd(\sin\theta_m-\sin\theta_i)=m\lambda — the grating equation, now revealed as the condition that adjacent grooves differ by a whole wavelength. Between consecutive principals the array factor passes through N−1N-1 zeros (at Nγ=pπN\gamma=p\pi, p≠mNp\ne mN), which is why the peaks are NN 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, N2N^2 peak height, and γ=mπ⇒dsin⁡θm=mλ\gamma=m\pi\Rightarrow d\sin\theta_m=m\lambda 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
Derivation BCounting 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 ∣sin⁡θm∣≤1|\sin\theta_m|\le1, 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 (1)(1) and (3)(3) are read together.

Step 1. Impose ∣sin⁡θm∣≤1|\sin\theta_m|\le1 on equation (1)(1). With sin⁡θm=sin⁡θi+mλ/d\sin\theta_m=\sin\theta_i+m\lambda/d, the requirement ∣sin⁡θi+mλ/d∣≤1|\sin\theta_i+m\lambda/d|\le1 rearranges to ∣m∣≤d(1+∣sin⁡θi∣)/λ|m|\le d(1+|\sin\theta_i|)/\lambda; taking the floor gives the integer bound (2)(2). 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 mmax⁡=⌊d/λ⌋m_{\max}=\lfloor d/\lambda\rfloor: a 600600 l/mm grating (d=1666.67d=1666.67 nm) at λ=633\lambda=633 nm has d/λ=2.633d/\lambda=2.633, so mmax⁡=2m_{\max}=2 and orders exist only for m=0,±1,±2m=0,\pm1,\pm2 — five diffracted beams. Why: the period holds only 2.6332.633 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 sinc2β\mathrm{sinc}^2\beta is zero when β=pπ\beta=p\pi, i.e. asin⁡θ=pλa\sin\theta=p\lambda; a principal maximum sits where dsin⁡θ=mλd\sin\theta=m\lambda. Dividing the two, an order is extinguished when m/p=d/am/p=d/a — 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 d/ad/a is an integer qq, then orders m=q,2q,3q,…m=q,2q,3q,\dots vanish. A slit width equal to half the period (d=2ad=2a) removes every even order; as a→da\to d the ratio d/a→1d/a\to1 and all m≠0m\ne0 orders fall on envelope zeros, correctly collapsing the grating to one wide slit that shows only its sinc2\mathrm{sinc}^2. 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: mmax⁡=⌊d/λ⌋=2m_{\max}=\lfloor d/\lambda\rfloor=2 at 633633 nm, the seven-order count, and the missing-order relation d/a=m/pd/a=m/p in verify_aq-optics-grating-equation.py.*

Limiting cases

The grating equation and its intensity contain every simpler interference result as a special case.

CaseResultMeaning
Two grooves, N=2N=2I∝cos⁡2γI\propto\cos^2\gamma (under the envelope)Young's double-slit fringes; broad, equal maxima with no subsidiary structure
Normal incidence, θi=0\theta_i=0dsin⁡θm=mλd\sin\theta_m=m\lambdathe classic symmetric spectrum spread about the m=0m=0 beam
Littrow / autocollimation2dsin⁡θB=mλ2d\sin\theta_B=m\lambdaorder retraces the incident ray (θm=θi\theta_m=\theta_i); the blaze condition of Blazed Gratings
Fine grating, d<λd<\lambdaonly m=0m=0 survivesno dispersed orders exist; used as a sub-wavelength "zero-order" grating
Coarse limit, d→ad\to aorders merge into the envelopeone wide slit; only the single-groove sinc2\mathrm{sinc}^2 remains
Many grooves, N→∞N\to\inftydelta-like orders, R=mN→R=mN\to largeideal grating; resolving power limited only by illuminated width

Worked examples

1 · Reading the orders of a laboratory grating (confidence builder)

A 600600 lines/mm transmission grating is illuminated at normal incidence by a helium–neon laser, λ=633\lambda=633 nm. Find the angles of all diffracted orders.

Step 1. Convert the line density to a period: d=1/(600 mm−1)=1.6667×10−3d=1/(600\ \text{mm}^{-1})=1.6667\times10^{-3} mm =1666.67 nm=\mathbf{1666.67\ \text{nm}}. 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 mmax⁡=⌊d/λ⌋=⌊1666.67/633⌋=⌊2.633⌋=2m_{\max}=\lfloor d/\lambda\rfloor=\lfloor1666.67/633\rfloor=\lfloor2.633\rfloor=\mathbf{2}, so only m=0,±1,±2m=0,\pm1,\pm2 exist — five beams in all. The would-be third order needs sin⁡θ3=3λ/d=1.14>1\sin\theta_3=3\lambda/d=1.14>1 and simply is not launched.

Step 3. Apply dsin⁡θm=mλd\sin\theta_m=m\lambda. First order: sin⁡θ1=λ/d=633/1666.67=0.3798\sin\theta_1=\lambda/d=633/1666.67=0.3798, so θ1=arcsin⁡(0.3798)=22.32∘\theta_1=\arcsin(0.3798)=\mathbf{22.32^\circ}. Second order: sin⁡θ2=2λ/d=0.7596\sin\theta_2=2\lambda/d=0.7596, so θ2=arcsin⁡(0.7596)=49.43∘\theta_2=\arcsin(0.7596)=\mathbf{49.43^\circ}.

Step 4. Note the crowding toward grazing: doubling the order from 11 to 22 more than doubled the angle (22.32∘→49.43∘22.32^\circ\to49.43^\circ), because the equation works in sin⁡θ\sin\theta, not θ\theta. Orders at 0∘0^\circ, ±22.32∘\pm22.32^\circ, ±49.43∘\pm49.43^\circ; the third order is forbidden (mmax⁡=2m_{\max}=2).

2 · How the grating fans colour (exam level)

The same 600600 l/mm grating is used at normal incidence in first order. Where do blue light (λ=450\lambda=450 nm) and red light (λ=650\lambda=650 nm) emerge, and what is their angular separation?

Step 1. Blue in first order: sin⁡θ=450/1666.67=0.2700\sin\theta=450/1666.67=0.2700, so θblue=arcsin⁡(0.2700)=15.66∘\theta_{\text{blue}}=\arcsin(0.2700)=\mathbf{15.66^\circ}. Blue, the shorter wavelength, bends least — the opposite of a glass prism, and a classic exam trap.

Step 2. Red in first order: sin⁡θ=650/1666.67=0.3900\sin\theta=650/1666.67=0.3900, so θred=arcsin⁡(0.3900)=22.95∘\theta_{\text{red}}=\arcsin(0.3900)=\mathbf{22.95^\circ}. The longer wavelength is thrown wider.

Step 3. The angular spread across this slice of the visible is Δθ=22.95∘−15.66∘=7.29∘\Delta\theta=22.95^\circ-15.66^\circ=\mathbf{7.29^\circ} in first order alone. Because θm\theta_m grows with mm, 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 15.66∘15.66^\circ, red at 22.95∘22.95^\circ, a 7.29∘7.29^\circ 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 dd.

Origins · 1 mindiffraction grating and how this was discovered
DG
diffraction grating
periodic array of N coherent apertures of spacing d · Fourier optics and spectroscopy

The diffraction grating is the purest interference instrument in optics: a screen whose transmission repeats every dd, 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 dd and λ\lambda through dsin⁡θm=mλd\sin\theta_m=m\lambda; the sharpness and resolving power depend only on the number NN of illuminated periods (R=mNR=mN); 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, NN coherent sources adding in phase wherever the path steps by a whole wavelength.

History
1786
— David Rittenhouse strings roughly fifty hairs across two finely threaded screws, builds the first diffraction grating, and reports the fanned orders
1821
— Joseph von Fraunhofer rules precision wire and glass gratings and works out the far-field theory of their patterns
1823
— Fraunhofer measures the wavelengths of light directly from grating diffraction angles, founding quantitative spectroscopy
1882
— Henry Rowland invents the concave diffraction grating and his precision ruling engine, transforming solar and laboratory spectroscopy
1913
— William and Lawrence Bragg read crystal structure by treating atomic planes as a diffraction grating for X-rays

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, NN-slit intensity, angular dispersion, R=mNR=mN, 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 sin⁡2(Nγ)/sin⁡2γ\sin^2(N\gamma)/\sin^2\gamma; (2) implicit differentiation yielding dθ/dλ=m/(dcos⁡θ)\mathrm{d}\theta/\mathrm{d}\lambda=m/(d\cos\theta); (3) R=mNR=mN via the Rayleigh criterion; (4) the numerical order count (∣m∣≤3|m|\le3 for 600600 l/mm at 500500 nm) and sodium-doublet grooves (N≈982N\approx982). 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 mλm\lambda; writing it as d(sin⁡θm−sin⁡θi)=mλd(\sin\theta_m-\sin\theta_i)=m\lambda works for transmission, while for a reflection grating one measures both angles on the same side of the normal and it reads d(sin⁡θi+sin⁡θm)=mλd(\sin\theta_i+\sin\theta_m)=m\lambda. 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 sin⁡θm=mλ/d\sin\theta_m=m\lambda/d, 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 (1)(1): the order angles depend only on dd, λ\lambda and the incidence angle, so even two grooves land their maxima at the same places as a million. What NN controls is sharpness and resolving power. Each principal maximum is about NN times narrower than a two-slit fringe, and the chromatic resolving power is R=mNR=mN, 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 R≈100mR\approx100m.

What sets the brightness of each order if the grating equation does not?

The diffraction pattern of a single groove — the envelope sinc2β\mathrm{sinc}^2\beta in equation (3)(3), 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 asin⁡θ=pλa\sin\theta=p\lambda. 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 m=0m=0 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 600600 l/mm grating, θ2=49.43∘\theta_2=49.43^\circ, and sin⁡(49.43∘)=0.760\sin(49.43^\circ)=0.760 while the radian value θ2=0.863\theta_2=0.863 — a 14%14\% 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 sin⁡θ\sin\theta. It is also sin⁡θ\sin\theta, not θ\theta, that carries the strict ceiling ∣sin⁡θm∣≤1|\sin\theta_m|\le1 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 mλ=m′λ′m\lambda=m'\lambda' the orders coincide — for instance 600600 nm in first order sits exactly where 400400 nm sits in third order. The clean, non-overlapping wavelength span in a given order is the free spectral range ΔλFSR=λ/m\Delta\lambda_{\text{FSR}}=\lambda/m, 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.

Before this

Where this leads