Atomic Structure and Spectral Lines
Atoms interact with light in very specific ways depending on their internal structure. Because each element has a unique set of energy levels, each one produces a unique pattern of spectral lines. This is what makes spectroscopy so powerful in astrophysics: by analyzing the light from a star or nebula, you can determine what it's made of, how hot it is, and how fast it's moving, all from billions of light-years away.
Principles of Atomic Structure
An atom consists of a nucleus (protons and neutrons) surrounded by electrons. In the Bohr model, electrons occupy discrete energy levels and can jump between them. This model explains why atoms produce spectral lines: an electron transitioning between levels either emits or absorbs a photon with a very specific energy.
Quantum mechanics refined this picture significantly. Electrons don't orbit in neat circles; instead, they occupy orbitals (labeled s, p, d, f) that describe the probability of finding the electron in a given region of space. Wave-particle duality and the uncertainty principle mean you can't pin down an electron's exact position and momentum simultaneously. But the key takeaway for spectroscopy stays the same: energy levels are quantized, and transitions between them produce spectral lines.

Energy Levels and Transitions
Each energy level in an atom is specified by a set of quantum numbers:
- Principal quantum number (): determines the overall energy and size of the orbital ()
- Angular momentum quantum number (): determines the shape of the orbital ( to )
- Magnetic quantum number (): determines the orbital's orientation in space ( to )
When an electron jumps between two energy levels, the energy of the emitted or absorbed photon is:
where is Planck's constant, is the photon's frequency, is the speed of light, and is its wavelength. A larger energy gap between levels means a shorter-wavelength (higher-energy) photon.
Not every transition is allowed. Selection rules arise from conservation of angular momentum during the interaction with a photon:
- The angular momentum quantum number must change by exactly one:
- The magnetic quantum number can change by at most one:
Transitions that violate these rules are called forbidden transitions. They can still occur, but at much lower rates. In low-density astrophysical environments like nebulae, forbidden lines actually become prominent because atoms have time to de-excite through these slow pathways before collisions interrupt them.
Molecular energy levels add extra complexity. Molecules have three types of internal energy, each on a different scale:
- Rotational transitions (lowest energy, microwave/far-infrared)
- Vibrational transitions (intermediate energy, infrared)
- Electronic transitions (highest energy, visible/UV)
These stack on top of each other, which is why molecular spectra look much more complex than atomic spectra.

Types of Atomic Spectra
There are three fundamental types of spectra, described by Kirchhoff's laws:
- Emission spectra: Bright lines on a dark background. Produced by hot, low-density gas where atoms are excited and then radiate at specific wavelengths. Examples include nebulae and neon discharge tubes.
- Absorption spectra: Dark lines superimposed on a continuous spectrum. Produced when light from a hot source passes through cooler, lower-density gas. The cool gas absorbs photons at the same characteristic wavelengths it would emit. Stellar atmospheres produce absorption spectra this way: the hot photosphere provides the continuum, and the cooler outer layers imprint dark lines.
- Continuous spectra: A smooth distribution of light across all wavelengths, produced by dense, hot matter (solids, liquids, or dense gases). Blackbody radiation from a stellar photosphere approximates this before atmospheric absorption lines are imprinted.
Molecular spectra deserve special attention because they look quite different from atomic spectra. Instead of isolated sharp lines, you see bands of closely spaced lines. Rotational transitions produce fine structure in the microwave and far-infrared, vibrational transitions create bands in the infrared, and electronic transitions appear in the visible and UV. The carbon monoxide (CO) molecule, for instance, has rotational lines that are among the most widely used tracers of molecular gas in the interstellar medium.
Spectroscopy in Astrophysics
Spectroscopy is arguably the single most important observational tool in astrophysics. Here's how it applies across different contexts:
- Stars: Spectral lines allow classification into types (O, B, A, F, G, K, M) based on surface temperature. Absorption line strengths reveal chemical composition, and Doppler shifts of lines give radial velocities. For example, the hydrogen Balmer series lines are strongest in A-type stars (around 10,000 K), not because A stars have the most hydrogen, but because that temperature best populates the level.
- Nebulae: Emission lines from ionized gases (like the line at 656.3 nm) reveal composition, temperature, and electron density. Forbidden lines of oxygen ([O III] at 495.9 and 500.7 nm) are especially useful diagnostics for conditions in planetary nebulae and H II regions.
- Galaxies: Redshifted spectral lines measure recessional velocities and distances (via Hubble's law). Emission line ratios help classify galaxies and estimate star formation rates.
- Interstellar medium: Absorption lines from cold gas along the line of sight reveal the composition and conditions of interstellar clouds. Molecular spectroscopy, particularly CO rotational lines, traces molecular hydrogen (), which is otherwise very difficult to observe directly.
- Exoplanets: During a transit, starlight filters through the planet's atmosphere. Transmission spectroscopy compares the spectrum during transit to the out-of-transit spectrum. Differences reveal atmospheric molecules like water vapor (), methane (), and carbon dioxide ().