How do you derive the diffraction grating formula?
Consider first order maximum, path difference between two adjacent rays of light is one wavelength
The angle between the normal to the grating and the light ray is theta
Right angle triangle is formed with sides d and lambda
Using trig, sin theta = lamda / d
Other maxima occur when the path difference is n(lambda)
Hence the diffraction grating equation