Spectroscopy is the study of light as a function of length of the wave that has been emitted, reflected or shone through a solid, liquid, or gas. Many times it is analyzed when the chemical is heated, because it makes a special color of flame. Most chemicals make a different color or spectrum than other chemicals. This can be used to see what chemicals are in a substance. Spectroscopy allows scientists to investigate and explore things that are too small to be seen through a microscope, such as molecules, and the even smaller subatomic particles like protons, neutrons and electrons.
There are special instruments to measure and analyse these light waves. IR spectroscopy measures light in the infrared electromagnetic spectrum. X-ray crystallography can look at the structure of a molecule. UV-Vis use visible and ultraviolet light to look at how much of a chemical is in a liquid. NMR, Nuclear Magnetic Resonance, can look at nuclei.