Stars are self luminous objects that shine by radiation obtained from energy sources that are found within them. The sun is a typical star. Stars are classified based on their spectra which give information on their luminosity, temperature and chemical composition. These spectral classes are assigned letters O, B, A, F, G, K and M; and are arranged in order of decreasing temperature(i.e. from the hottest to the coolest stars). Stars of the spectral class O to M belong to the main sequence group while other stellar classes which include the C stars and the stars are regarded as the giants, super-giants or white dwarfs.
The surface temperatures and atmospheric pressures of stars that belong to the main sequence are different but they essentially have the same chemical composition. Furthermore, these stars show a color sequence from very hot(about 20000*C) bluish-white O and B stars to the moderately hot(about 6000*C) yellow G stars, to the cool stars(about 3000*C) red K and M stars.
Just like the sun, the stars in class O to M are mainly composed of hydrogen, helium and very small amounts of other elements found on earth. However, results from stellar spectra show that the particulate nature of elements found on these stars varies with the temperature of the stars.
In cool stars, neutral atoms of elements and simple molecules are very much abundant, while in hot stars, highly ionized atoms of elements are dominant. Therefore, spectral analysis of the cool stars of class M show the presence of very simple molecules such as titanium oxide and the neutral atoms of metals such as magnesium, iron and calcium.
Spectral analysis of the slightly hotter k stars show that the molecules such as titanium oxide are not present in them even though stable pieces of molecules like the hydroxyl radical are present. The spectra of G stars are characterized by what is known as emission lines that show the presence of ionized atoms of metals like calcium and iron.
The spectra of F stars show the presence of more ionized metal atoms than neutral atoms. Class A stars have spectra that show strong hydrogen emission lines which indicate unionized hydrogen atoms, while in the spectra of class B stars, these lines are very faint indicating that most of the hydrogen atoms are ionized.
The spectra of the very hot O stars indicate that even helium atoms are ionized, while oxygen, nitrogen and carbon are twice ionized.