N-slit interference

When the distance to screen $\gg$ slit separation $d$, we can assume outgoing light rays are parallel.

Angular position $\theta$ introduces a phase shift of $kd\sin\theta$.

Rayleigh criterion open_in_new

To resolve two lines in diffraction spectrum, the maximum of one line lies over the first minimum of the other.

For an $N$ slit grating to resolve $\lambda_1 < \lambda_2$ in the first-order spectrum, if angles are small, $$ \begin{align*} N = \frac{\lambda_1}{\lambda_2-\lambda_1}. \end{align*} $$ (Derivation)