[![][1]][1]
w=fringe spacing, lambda = wavelength, D = horizontal distance between slits and screen, s = slit spacing.

[![][2]][2]
d = slit spacing, theta = angle between central maximum and the ray at the nth maximum, lamba = wavelength.

  [1]: https://i.sstatic.net/rFdG6.png
  [2]: https://i.sstatic.net/luf8e.png
Hi, I am an A Level physics student in the UK. The book I am referring to later on is the 'Advanced PHYSICS' 2nd edition by Steve Adams and Jonathan Allday. 

I am confused about where the above equations work? Any number of slits or only double slits or some combination? What about theta? does it have to be small or can it be large (greater than 10 degrees)? I know that in both cases the slit spacing should be a lot smaller than the horizontal distance, but I am confused because the bottom equation is used for diffraction gratings but the derivation was using the young's double slit experiment. However, the top equation was also derived using double slits in the book yet I have never seen it being used for diffraction gratings. I tried to look for similar answers but they were too detailed and a bit difficult to comprehend. So, I would appreciate a concise answer.