3. Light, Spectra, and Linear Algebra
Space question
How do we know what a star is made of?
A spectrum records intensity as a function of wavelength. Atoms, ions, and molecules interact with light at characteristic energy differences, leaving patterns of emission or absorption. The inference is a pattern-matching problem grounded in quantum physics and implemented with linear algebra.
3.1 Light as energy and information
Photon energy and wavelength are related by
A hotter thermal emitter shifts its peak toward shorter wavelengths:
where . The continuum constrains temperature; narrower features constrain composition, motion, pressure, and magnetic fields.
3.2 A spectrum is a vector
After calibration and sampling at wavelengths, a spectrum is a vector:
Suppose each candidate feature has a known shape. Put the shapes into columns of a design matrix . The model is
where contains feature strengths and is noise plus model mismatch.
When there are more wavelength samples than parameters, the least-squares estimate minimizes
A stable numerical implementation uses numpy.linalg.lstsq rather than
explicitly computing .
3.3 Worked two-feature model
Let the continuum-normalized absorption be
where
Each sampled Gaussian becomes one column of , and the fitted coefficients estimate depths and .
But line depth is not identical to abundance. Temperature, ionization, pressure, turbulence, rotation, and instrument response affect a feature. A real abundance analysis uses a radiative-transfer atmosphere model.
3.4 Motion written into wavelength
For speeds much smaller than light speed:
A shifted pattern measures radial velocity. Repeating shifts can reveal a binary star or an orbiting planet. Line broadening can reveal rotation and thermal motion.
3.5 Identifiability
Two model columns that look almost the same are difficult to distinguish. Noise can then cause large changes in the fitted coefficients even when the combined model barely changes. This is an ill-conditioned problem.
The cure is not automatically “more computation.” It may require:
- higher spectral resolution;
- a wider wavelength range;
- stronger physical constraints;
- independent observations;
- honest uncertainty that displays the degeneracy.
Lab
Open 02_spectrum_lab.ipynb. It creates a synthetic stellar spectrum, fits absorption features, and shows why resolving power and signal-to-noise govern what can be inferred.
Used in space science
- stellar temperatures, compositions, and radial velocities;
- gas chemistry and motion in galaxies;
- expansion through cosmological redshift;
- exoplanet atmospheres through transmission spectroscopy;
- magnetic fields through polarization and line splitting.
Journey to the frontier
The frontier is moving from detecting broad atmospheric features to robustly retrieving temperature, composition, clouds, and chemistry from weak spectra. A possible biosignature is not one molecule in isolation: stellar activity, clouds, photochemistry, geological sources, detector systematics, and alternative atmospheric states all matter.
The core intellectual move remains the one in this chapter: encode physical components as a forward model, compare the model with calibrated light, and interrogate degeneracies.
Connections
- Quantum mechanics explains which transitions exist.
- Thermodynamics and radiative transfer set populations and line strength.
- Linear algebra makes the inverse problem computable.
- Probability in Chapter 4 turns a best fit into an uncertainty-aware claim.
Learning record
Mark complete when you can explain the central inference in your own words.