Answer:
This type of study is called spectroscopy. The science of spectroscopy is quite sophisticated. From spectral lines astronomers can determine not only the element, but the temperature and density of that element in the star. The spectral line also can tell us about any magnetic field of the star.
Step-by-step explanation: