Infrared (IR) spectroscopy exploits the quantum-theoretic fact that the stretching or bending of chemical bonds involves specific amounts of energy, which correspond to specific IR frequencies (lower, microwave, frequencies cause molecules as a whole to move; higher, UV, frequencies can actually break chemical bonds).
The technique of IR spectroscopy was pioneered by William Coblentz at Cornell University during 1903–1905 (using the apparatus shown above), and had become a standard technique of chemistry by the 1950s. Traditionally, a prism or diffraction grating splits infrared light into different frequencies, while a movable mirror bounces specific frequencies of infrared light through a sample, and a detector measures how much of that light is absorbed. Prisms for this purpose cannot be made of glass, which absorbs infrared light, but prisms made of sodium chloride and other salts have been used. Modern devices use Fourier transform techniques, which do not require a prism or diffraction grating.
The image below is the result of using modern IR spectroscopy equipment (like that above). The vertical axis in this plot measures how much infrared light gets through:
This IR spectrum (in the mid-IR range 2.5–17 μm) is for aniline, which has an NH2 group attached to a benzene ring (see molecular structure below). Some of the key absorbance peaks are marked; these correspond to stretching and bending of N–H, C–H, C–N, and C–C bonds. The set of visible peaks form a fingerprint, which immediately identifies the substance aniline. For unknown compounds, the IR spectrum provides valuable clues to any molecular detective trying to determine the structure. Thank you, William Coblentz!