single-slit diffraction
Single-slit diffraction
A long slit of infinitesimal width which is illuminated by light diffracts the light into a series of circular waves and the wavefront which emerges from the slit is a cylindrical wave of uniform intensity, in accordance with the Huygens-Fresnel principle. Do note that light passing through a single slit is diffracted in all directions.

Here, the rays 1 and 2 travel equal distances and constructively interfere, resulting in the central bright fringe, while rays 3 and 4, which are slightly angled, have a path difference that is half the slit, leading to destructive interference.
Pattern of single-slit diffraction
.svg.png)
Path difference in single-slit diffraction
Since according to Huygens's principle, every part of the wave front in the slit emits wavelets. Now, these tiny wavelets realistically are out of phase with each other and each travelling in some random direction. However, if the screen is sufficiently far away relative to the length of the slit, we can assume the rays specifically heading to the same destination are essentially parallel.
Now, while we've assumed these wavelets to be parallel, they can have different angles relative to the original direction of the beam, which means they can arrive at the same destination both in and out of phase, which gives rise to the interference pattern we see above.

Note that since the wavelets are essentially infinite, each ray (wavelet) in (a), (b), (c) and (d) are different rays.
Now, remember that these wavelets are all coherent. When some of the wavelets travel straight ahead, they remain in phase and a central maximum (bright fringe) is obtained.
We start with explaining the bright fringes. Take (c) as an example. For us to see a bright fringe, there is bound to be some wavelets that are travelling at the same angle such that each ray starting from the top has a complimentary ray starting from the middle whose distance travelled is a multiple of the wavelength of the wavelets, call it \[m\lambda\]. Since each of these wavelets reach the fringes in phase, we will see a bright fringe where they constructively interfere. In simpler words, most rays travelling at this angle will have another ray to interfere with constructively. However, not all rays interfere constructively for this situation, so the maximum is not as intense as the central maximum.
Similarly, for every dark fringe on the screen, there are bound to be some these wavelets are travelling at the same angle, in this case, say the case (b), the distance travelled by the first wavelet from the top and the first wavelet from the middle differ by \[\frac{\lambda}{2}\], same goes with the second wavelet from the top and the second wavelet from the middle, so on and so forth. Since they differ by \[\frac{\lambda}{2}\], they destructively interfere and result in the dark fringes we see. In other words, a pair-wise cancellation of all rays results in a dark minimum in intensity at this angle.
Then, we can form an equation relating the difference in path length between the first wavelet and last wavelet, \[\Delta l\], to the angle (see image above). Since \[\sin\theta=\frac{\Delta l}{a}\], if it's destructive interference, \[\Delta l=\lambda,2\lambda,3\lambda,\dots\], or \[\Delta l=m\lambda\] where \[m=1,2,3,\dots\], we can rewrite the equation to become \[a\sin\theta=m\lambda\].