Foundations — Diffraction grating — condition for maxima
This page builds every symbol the parent note uses, starting from things a 12-year-old already knows: distances, angles, and waves. Nothing here assumes you have seen the grating equation before.
1. What is a wave, and what is a wavelength ?
The picture. Look at the drawing below: the wavy blue line is the wave, and is the gap between two neighbouring peaks.

Why the topic needs it. The whole grating idea is about waves lining up crest-to-crest. To say "the crests line up" we must measure distance in units of . If two waves are shifted by exactly one (or two, or three…), their crests sit on top of each other again. That is why is the ruler we measure everything against.
See Wavelength and the visible spectrum for why different colours have different .
2. In phase and out of phase — what "crests line up" means

The picture. Top pair: crests aligned → the sum (yellow) is tall and bright. Bottom pair: crest meets trough → the sum is flat and dark.
Why the topic needs it. "Bright maximum" literally means "the waves arrived in phase." "Dark" means "out of phase." The grating equation is nothing more than the precise condition for in phase. This is the same constructive/destructive idea from Interference and path difference and Young's double-slit experiment.
3. Path difference — the extra distance one wave travels
Why it decides everything. Two waves start together (in phase). Whether they arrive in phase depends only on the extra distance one gained on the way. Measure that extra distance in wavelengths:
- (a whole number of ) → arrive in phase → bright.
- (a half-odd number) → arrive out of phase → dark.
Why the topic needs it. The parent's headline equation is just "" with replaced by its geometric value. So we must (a) know what is and (b) be able to compute it from the geometry. That geometry needs angles and a right triangle — next.
4. Angle and the normal — "which direction is the light leaving?"
The picture (see §5 figure). means straight ahead (along the normal). Bigger means the light heads off more and more to the side.
Why the topic needs it. Each bright line comes out at its own special angle. Naming that direction lets us write one equation that predicts where each colour appears. And because is an angle, we need a tool that connects an angle to a length — that tool is the sine.
5. Grating spacing and the sine — building
Now the key geometric step from the parent note. Two neighbouring slits are a distance apart. Light leaves both at angle . To find the extra distance the lower ray travels, drop a perpendicular from the top slit onto the lower ray:

Rearranging gives:
Why the topic needs it. This single line is the bridge from geometry (slits, angles) to the wave rule (§3). Combine it with "bright when is a whole number of " and you get the whole grating equation. Note also: since can never exceed , can never exceed — that is why only finitely many orders exist.
6. The order number — counting whole wavelengths
Why can be negative. The sign is not decoration — it says the pattern is symmetric. Light can swing to the left of the normal ( negative) or the right ( positive) by the same amount, giving two bright lines for each nonzero . Forgetting the negative side is why people miscount the total number of maxima.
7. The floor — rounding down to a whole order
Why the topic needs it. Because , the largest allowed order is , which is usually not a whole number. Orders must be whole, and you cannot exceed the limit — so you round down. That is exactly .
8. How the pieces feed the topic
Equipment checklist
Test yourself: cover the right side and answer out loud.
What does measure, in one phrase?
What does "in phase" mean physically?
What is the path difference ?
When (in terms of ) does give a bright result?
From which line is the angle measured?
What is the grating spacing , and how do you get it from lines/mm?
Why does (not ) appear in ?
What does the order number count, and can it be negative?
What does do, e.g. ?
Why is there a largest possible order ?
Connections
- Interference and path difference — the bright/dark rule built in §3.
- Young's double-slit experiment — the two-slit case; a grating is the many-slit version.
- Single-slit diffraction — where the light from one slit spreads to reach these angles.
- Wavelength and the visible spectrum — why differs by colour.
- Resolving power and spectrometers — where sharp maxima become useful.
- Diffraction grating — condition for maxima — the parent topic these foundations feed.