Thousands of slits, and a hard ceiling
Two slits give soft fringes. Thousands of them, ruled side by side on one piece of glass, give razor-thin beams at precise angles — a diffraction grating, the instrument that reads the chemistry of a star from its light. The condition is — read aloud m lambda equals d sine theta. is the order, a whole number counting how many wavelengths of path difference separate neighbouring slits (m = 1 is the first beam out from the centre, m = 2 the next, and so on — it carries no units). is the wavelength. is the line spacing, the distance from one ruled line to the next. is the angle of that order, measured from the straight-through direction.
Careful with : in Young's formula it was the gap between two slits, and here it is the gap between neighbouring grating lines. Same letter, same kind of quantity, different apparatus. And gratings are never sold by their spacing — they are sold by their line count, so many lines per millimetre. The entry conversion is therefore the same every single time: a grating of lines per millimetre has . Five hundred lines per millimetre means . Do that division first, before anything else.
Now the fact that makes gratings examinable. can reach 1 and not one hair further — that is a 90° beam, grazing along the grating's own face. So is capped at , and since orders are counted in whole numbers, the highest observable order is that ratio rounded down. A partial order is no order at all. When a question asks how many bright beams a grating produces, that ceiling is the entire answer.