Definition
Spectroscopy is the analysis of electromagnetic radiation as a function of wavelength (or frequency, or photon energy). A spectrograph splits incoming light — using a prism or diffraction grating — into a spectrum, which is then recorded by a detector. Astronomical spectrographs are attached to telescopes to analyse light from stars, galaxies, nebulae, and planets. The resulting spectrum encodes: (1) Temperature — through the shape of the blackbody (thermal) continuum (Planck function), which peaks at a wavelength given by Wien\'s displacement law (λ_max = 2.898 × 10⁻³ / T metres). The Sun (T = 5,778 K) peaks at ~501 nm (green). A cool red giant (T = 3,500 K) peaks in the near-infrared. (2) Composition — through absorption/emission lines of specific elements and molecules. (3) Velocity — through Doppler shifts of spectral lines. (4) Magnetic fields — through Zeeman splitting of spectral lines (magnetic fields split individual lines into multiple components). (5) Gravity and pressure — through line widths (pressure broadening in dense atmospheres). For context, see our spectrum entry.
The history of spectroscopy is inseparable from the history of astronomy: Joseph von Fraunhofer mapped 574 dark lines in the Sun\'s spectrum in 1817 (now called Fraunhofer lines); Kirchhoff and Bunsen identified them with specific elements in 1859–1861; Williamina Fleming and Annie Jump Cannon classified hundreds of thousands of stellar spectra at Harvard in the late 19th century, developing the OBAFGKM temperature sequence still used today (see our stellar classification guide). Vesto Slipher used spectroscopy to measure galaxy recession velocities from 1912–1925, providing the observational foundation that Hubble used to discover the expanding universe. See our expanding universe guide and redshift entry.
Modern spectrographs and surveys
The largest modern spectroscopic surveys obtain spectra of millions of objects simultaneously using multi-object spectrographs — fibres placed at the positions of target objects in the telescope focal plane, routing light to a spectrograph. The Sloan Digital Sky Survey (SDSS) obtained spectra of over 4 million galaxies, quasars, and stars. The DESI (Dark Energy Spectroscopic Instrument) at Kitt Peak, operating since 2021, targets 35 million galaxies and quasars over 5 years to measure the Universe\'s expansion history via baryon acoustic oscillations. The 4MOST (at ESO\'s VISTA telescope) and WEAVE (at the William Herschel Telescope) are European counterparts. For exoplanet spectra, JWST\'s NIRSpec provides the most sensitive near-infrared spectroscopy ever deployed — see our JWST CO₂ exoplanet article.