Sub topic 12
From two slits to many: diffraction gratings
This chapter assumes you know the double-slit maxima condition d sin(θ) = mλ, the single-slit diffraction envelope, and basic trigonometry. The code examples use Python and NumPy. They are optional.
What a grating is
A diffraction grating is a surface with a large number N of equally spaced, identical slits (or reflecting grooves). The spacing between neighbouring slits is d, called the grating pitch. Manufacturers usually quote the line density instead, such as 600 lines/mm. The two are related by d = 1 / (line density).
A grating is the double slit extended to N slits. The double-slit geometry still sets where the bright directions are. Having many slits changes how sharp and how bright those directions are.
The grating equation
Take light of wavelength λ hitting the grating at normal incidence. Two neighbouring slits differ in path length by d sin(θ), the same geometry as the double slit. If that difference is a whole number of wavelengths, the light from those two slits is in phase. Then every other pair of neighbours is also in phase, so all N contributions add together. The condition is
d sin(θ) = mλ, with m = 0, ±1, ±2, ...
The integer m is the order. The m = 0 order goes straight through, for every wavelength. The formula is identical to the double-slit one. The difference is that these directions are now the only places with appreciable light.
For light arriving at an angle θᵢ from the normal, the condition becomes d (sin θₘ + sin θᵢ) = mλ, with a sign convention that depends on which side the angles are measured from. Check your textbook's convention before using the oblique form.
Which orders exist
Because |sin θ| ≤ 1, an order exists only if |m|λ ≤ d. The highest order is therefore the largest integer not exceeding d/λ.
For a 600 lines/mm grating, d = 1/600 mm = 1.667 µm. With red helium-neon light (633 nm):
- First order: sin θ₁ = 0.633 / 1.667 = 0.380, so θ₁ ≈ 22.3°.
- Second order: sin θ₂ = 0.760, so θ₂ ≈ 49.5°.
- Third order: sin θ₃ = 1.14, which is greater than 1. This order does not exist.
import numpy as np
wavelength = 633e-9 # m, red helium-neon laser
lines_per_mm = 600
d = 1e-3 / lines_per_mm # m, grating pitch
m_max = int(np.floor(d / wavelength)) # highest order with sin(theta) <= 1
print(f"Pitch d = {d * 1e6:.3f} um, highest order = {m_max}")
for m in range(-m_max, m_max + 1):
theta = np.degrees(np.arcsin(m * wavelength / d))
print(f"m = {m:+d}: theta = {theta:+.2f} deg")If d/λ is exactly an integer, the highest order lies at 90° and travels along the grating plane. In practice you cannot observe it.
Why many slits make sharp peaks
With N slits, the light from slit j reaches a distant point with a phase of jα, where α = π d sin(θ) / λ is the same phase variable used for the double slit. Adding N equal phasors that step by 2α in phase gives a geometric series. The normalized intensity is
I / I_max = [ sin(Nα) / (N sin α) ]²
This formula has three features worth checking.
- Principal maxima. When α = mπ, both sin(Nα) and sin(α) vanish, and the ratio tends to ±N. The intensity ratio is 1. These maxima are exactly the grating-equation directions.
- Zeros. The numerator vanishes when Nα is a multiple of π, but the denominator does not, so there are zeros at α = kπ/N. Between two neighbouring principal maxima there are N − 1 zeros and N − 2 weak secondary maxima.
- Height. At a principal maximum the field amplitudes of N slits add, so the intensity scales as N². The total energy only grows as N, so the peak must get narrower as N grows.
For N = 2 the formula reduces to cos²(α), the double-slit result. There are no secondary maxima, because N − 2 = 0.
Width of a principal maximum
The first zero beside the principal maximum of order m is where Nα has moved by π from its peak value. That puts the half-width at
Δθ ≈ λ / (N d cos θₘ)
The width is inversely proportional to N d, the total width of the illuminated grating. A wider illuminated grating gives narrower lines. This is the same inverse relation between aperture size and angular spread that you saw for single-slit diffraction.
import numpy as np
# Height of the first secondary maximum, approximated at alpha = 3*pi/(2N)
for N in (3, 5, 10, 50):
alpha = 3 * np.pi / (2 * N)
ratio = (np.sin(N * alpha) / (N * np.sin(alpha))) ** 2
print(f"N = {N:3d}: first secondary maximum ~ {ratio:.3f} of the principal peak")
# Large-N limit is 4 / (9 * pi^2)
print(f"Large-N limit: {4 / (9 * np.pi ** 2):.3f}")For N of 10 or more the secondary maxima stay near 4.5% of the principal peak. The principal peaks narrow while the secondary ones stay faint, which gives a pattern of thin bright lines on a dark background.
Comparison with the double slit
| Property | Double slit (N = 2) | Grating (large N) |
|---|---|---|
| Maxima positions | d sin θ = mλ | d sin θ = mλ |
| Peak width | Comparable to the spacing between peaks | About λ / (N d), much narrower |
| Dark regions | Only at points where fringes cancel | Broad dark gaps between orders |
| Secondary maxima | None | N − 2 per gap, each about 5% or less |
| Main use | Demonstrating interference | Separating wavelengths |
Dispersion: spreading wavelengths apart
The grating equation depends on λ, so each wavelength has its own angle in every order except m = 0. White light spreads into a spectrum in each order. Differentiating d sin θ = mλ at fixed m gives the angular dispersion
D = dθ/dλ = m / (d cos θ)
Dispersion grows with the order and with finer pitch, and it grows with angle because of the cos θ factor. A prism's dispersion depends on the glass. A grating's depends only on geometry.
Overlapping orders
The second-order angle for 400 nm equals the first-order angle for 800 nm. In general, order m of wavelength λ lands where order m + 1 of wavelength λ·m/(m + 1) does. Spectrometers use filters or order-sorting optics to avoid this ambiguity. If the visible range spans 400 to 700 nm, the first order is free of overlap, because the second order starts at 800 nm worth of first-order angle, beyond the red end. The second and third orders overlap.
Resolving power
Dispersion tells you how far apart two wavelengths land. Whether you can tell them apart also depends on how wide each line is. The chromatic resolving power is
R = λ / Δλ = mN
Here Δλ is the smallest wavelength difference that gives two distinguishable lines. The criterion used is that the maximum of one line falls on the first zero of the other, the same Rayleigh-style rule you will meet for circular apertures in a later chapter.
The result says that the resolving power depends on the number of illuminated slits and the order, not on the pitch itself. Finer pitch helps only because it puts more lines under a beam of a given width.
Worked example: the sodium doublet has lines at 589.0 nm and 589.6 nm.
- Δλ = 0.6 nm, so the required R = 589.3 / 0.6 ≈ 982.
- In first order, you need N ≥ 982 illuminated lines.
- A 600 lines/mm grating needs a 1.64 mm wide illuminated area. In second order you need only 491 lines.
import math
wavelength = 589.3e-9 # m, mean sodium D wavelength
delta_lambda = 0.6e-9 # m, doublet separation
lines_per_mm = 600
required_R = wavelength / delta_lambda
for m in (1, 2):
N = math.ceil(required_R / m)
width_mm = N / lines_per_mm
print(f"Order {m}: need N >= {N} lines, i.e. >= {width_mm:.2f} mm illuminated")Missing orders and blaze
A real grating has slits of width a, so the single-slit envelope multiplies the grating pattern, as it does for the double slit. When d/a is a whole number, orders at multiples of that number fall on a zero of the envelope and are missing. For d/a = 3, orders ±3, ±6, and so on are missing.
The envelope also means that most of the light sits in the zeroth order, which carries no wavelength information. Many practical gratings are blazed. Their grooves are tilted, so the single-slit envelope peaks at a chosen non-zero order. This moves the brightest part of the envelope onto that order and concentrates the light there.
Common errors
- Using the double-slit small-angle formula. Grating angles are often large, such as 22° or 49° above. The relation y = mλL/d assumes sin θ ≈ tan θ ≈ θ, which fails here. Use θ = arcsin(mλ/d) and then y = L tan θ.
- Confusing d with a. The grating equation uses the pitch d, not the slit width a. The width a only controls the envelope.
- Counting lines per millimetre as a length. Convert to d = 1/(line density) before using the equation, and keep units in metres.
- Forgetting orders cannot exceed d/λ. An arcsin argument above 1 is a signal that the order does not exist, not a numerical glitch.
- Treating R as depending on pitch alone. R = mN depends on how many slits the beam covers.
Summary of the working model
- The pitch d fixes the directions of the principal maxima through d sin θ = mλ.
- The number of illuminated slits N fixes how sharp those maxima are, with width about λ / (N d cos θ).
- The wavelength dependence of those directions produces dispersion D = m / (d cos θ).
- Both effects combine in the resolving power R = mN.
- The slit width a shapes the envelope and decides which orders are missing.
Exercise
A grating has 500 lines/mm and is lit at normal incidence with light of wavelength 550 nm. What is the highest order that appears, and at what angle does the first order lie?
Show answer
The pitch is d = 1/500 mm = 2.00 µm. Then d/λ = 2000/550 = 3.64, so the highest order is m = 3. For the first order, sin θ = 550/2000 = 0.275, so θ ≈ 16.0°.
Exercise
What is the minimum number of illuminated lines needed in second order to resolve two lines at 500.0 nm and 500.2 nm?
Show answer
R = λ/Δλ = 500.1/0.2 ≈ 2500. Since R = mN and m = 2, N ≥ 1250 lines.