Final answer:
Astronomers can infer a galaxy's star formation history by analyzing the spectral lines of stars and gas. They can determine the chemical composition of dust, identify elements in invisible interstellar gas, and detect specific elements in emission nebulae. This analysis helps in understanding the composition, age, and star formation history of galaxies.
Step-by-step explanation:
To infer a galaxy's star formation history, astronomers can analyze the spectral lines of stars of different types and of gas. By studying the spectrum of starlight reflected by dust, they can identify the chemical composition of the dust and infer the presence of elements that are produced through stellar nucleosynthesis.
A star behind invisible interstellar gas can exhibit absorption lines in its spectrum, indicating the presence of specific elements or molecules in the gas. An emission nebula, on the other hand, produces its own light and displays emission lines that reveal the presence of specific elements in the nebula.
Overall, the analysis of spectral lines allows astronomers to determine the composition, age, and star formation history of galaxies.