In the context of diffraction and diffraction gratings, the formulas for the locations of maxima and minima are indeed opposite to each other. This can be explained by considering the constructive and destructive interference of waves.
In diffraction, when a wave encounters an obstacle or passes through a narrow opening, it spreads out and undergoes interference. The resulting pattern of constructive and destructive interference leads to the formation of maxima and minima.
When a single slit is used in the diffraction setup, such as in single-slit diffraction, the central maximum is the brightest, and it occurs at θ = 0 degrees (along the central axis). As you move away from the central axis, the intensity of the maxima decreases, and the first minimum occurs at a certain angle (θ). This minimum corresponds to the destructive interference of the diffracted waves.
In the case of a diffraction grating, which consists of multiple closely spaced slits, the interference patterns become more complex. The formula for locating the maxima in a diffraction grating is given by the grating equation:
nλ = d(sin θ)
where n is the order of the maximum, λ is the wavelength of light, d is the slit separation or grating spacing, and θ is the angle of diffraction.
In contrast, the formula for locating the minima in a diffraction grating is given by:
(n + 1/2)λ = d(sin θ)
where n is the order of the minimum.
The difference between the formulas for maxima and minima in a diffraction grating arises due to the phase differences between the waves coming from different slits. Constructive interference occurs when the waves from adjacent slits are in phase, leading to bright maxima. Destructive interference occurs when the waves from adjacent slits are out of phase by half a wavelength, resulting in dark minima.
So, while the formulas for locating maxima and minima in diffraction and diffraction gratings are opposite, they represent the different conditions of constructive and destructive interference that occur in the wave patterns.