Obtaining spectra requires the light from a star to be passed through a prism and split into a spectrum, rather like water droplets in the atmosphere splitting sunlight into a rainbow.
When the spectrum is magnified, straight black lines can be seen superimposed on the colours. These spectral lines correspond to the wavelengths of light that have been absorbed by chemicals on the surface of the star from which the light originated.
Every element and molecule generates its own chemical fingerprint through unique spectral lines at different wavelengths. These provide an indication of the amount of that element present in the object and under what temperature and pressure conditions they exist.
Since stars continually process chemicals found in space, enriching the galaxy in progressively heavier chemical elements, Gaia’s analysis of stellar properties has enabled astronomers to discriminate between generations of stars and build up a history of star formation in our galaxy.