An optical spectrometer consists of three main components – entrance slit, grating, and detector. Light from the source enters the entrance slit and the size of the slit determines the amount of light that can be measured by the instrument. The slit size also affects the optical resolution of the spectrometer, where the smaller the slit size, the better the resolution. The beam becomes divergent after passing through the slit and by reflecting the divergent beam on a collimating mirror, the beam becomes collimated. Collimated rays are then directed towards a diffraction grating. The grating acts as a dispersive element and splits the light into its constituent wavelengths. A monochromator uses a phenomenon of optical dispersion in a prism or diffraction from diffraction gratings to select a particular wavelength of light. In traditional spectrometers, prisms were used to disperse light. However, with the invention of the diffraction grating, it became the most used monochromator in modern spectrometers as it has more advantages over the prism.  Both devices are capable of splitting light into several colours, but a diffraction grating can be made to spread the colours over a bigger angle than a prism. Prisms also have a higher dispersion only in the UV region while diffraction gratings have a high and constant dispersion across the UV, VIS, and IR spectrum.  Once the light hits the diffraction grating, each wavelength is reflected at a different angle. Diffraction grating of different sizes is also used to determine different wavelength ranges. The beam becomes divergent again after being reflected from the grating, thus it hits a second mirror to focus and direct it towards the detector. The detector captures the light spectra and measures the intensity of light as a function of wavelength. These data are then digitized and plotted onto software as a graph.