Astronomers use a device called a spectrograph to disperse light into its constituent wavelengths in the same way that Newton's prism divided sunlight into its component colors. Spectrographs may have a prism or a diffraction grating (an optical element consisting of a ruled surface which disperses light due to diffraction) as their dispersive element. The resultant spectrum may be recorded on film, electronically in a computer, or simply viewed with the eye. Because each element has a unique spectral signature, scientists can determine which elements make up a distant object by examining the often complicated pattern of spectral lines seen in that object. By recalling Kirchhoff's laws, they can also determine the physics of the object being observed. For example, stars show an absorption spectrum, and they can be thought of as a hot object surrounded by a cooler gas.
Spectra can also be used to determine the relative abundances of the elements in a star, by noting the relative strength of the lines. Knowing the physics of the atoms involved allows a prediction of the relative strengths of different lines. In addition, because ions (atoms which have lost some of their electrons and become charged) have different characteristic wavelengths, and the ionization states are a measure of temperature, the temperature of a star can be determined from the measured spectra.
The minimum width of a spectral line is governed by the tenets of quantum mechanics, but physical processes can increase this width. Collisions between atoms, pressure, and temperature all can increase the observed width of a line. In addition, the width of the spectrograph entrance slit, or properties of the diffraction grating, provides a minimum width for the lines. The observed line widths can therefore be used to determine the processes occurring in the object being observed.
Spectrographs are characterized by their wavelength coverage and their resolution. A spectrograph normally consists of an entrance slit or aperture, a number of transmissive elements such as lenses, prisms, transmission gratings and windows, or reflective surfaces such as mirrors and reflection gratings. The configuration and types of materials used depend on the wavelength range being investigated, since different materials have different reflective and transmissive properties; typically, reflective systems are used in the ultraviolet region of the spectrum, where few materials transmit well. The resultant spectrum is an image of the entrance slit at different wavelengths.
The resolution of a spectrograph describes its ability to separate two nearby spectral lines. In a complex spectrum, there may be hundreds of spectral lines from many different elements, and it is important to be able to separate lines which may be adjacent.
Spectroscopy is also used in the laboratory. Applications include determining the composition of plasmas, and identifying chemical compounds.