The use of the absorption, emission, or scattering of electromagnetic radiation by atoms or molecules to obtain compositional information about the material of interest and to study physical processes.