Most stars are grouped into a small number of spectral classes. The Henry Draper Catalogue lists spectral classes from the hottest to the coolest stars. These types are designated, in order of decreasing temperature, by the letters O, B, A, F, G, K, and M. This group is supplemented by R- and N-type stars (today often referred to as carbon, or C-type, stars) and S-type stars. The R-, N-, and S-type stars differ from the others in chemical composition; also, they are invariably giant or supergiant stars.
The spectral sequence O-M represents stars of essentially the same chemical composition but of different temperatures and atmospheric pressures. This simple interpretation, put forward in the 1920s by the Indian astrophysicist Meghnad N. Saha, has provided the physical basis for all subsequent interpretations of stellar spectra. The spectral sequence is also a colour sequence: the O- and B-type stars are intrinsically the bluest and hottest; the M-, R-, N-, and S-type stars are the reddest and coolest.
In the case of cool stars of type M, the spectra indicate the presence of familiar metals, including iron, calcium, magnesium, and also titanium oxide molecules (TiO), particularly in the red and green parts of the spectrum. In the somewhat hotter K-type stars, the TiO features disappear, and the spectrum exhibits a wealth of metallic lines. A few especially stable fragments of molecules such as cyanogen (CN) and the hydroxyl radical (OH) persist in these stars and even in G-type stars such as the Sun. The spectra of G-type stars are dominated by the characteristic lines of metals, particularly those of iron, calcium, sodium, magnesium, and titanium.
The behaviour of calcium illustrates the phenomenon of thermal ionization. At low temperatures a calcium atom retains all of its electrons and radiates a spectrum characteristic of the neutral, or normal, atom; at higher temperatures collisions between atoms and electrons and the absorption of radiation both tend to detach electrons and to produce singly ionized calcium atoms. At the same time, these ions can recombine with electrons to produce neutral calcium atoms. At high temperatures or low electron pressures, or both, most of the atoms are ionized. At low temperatures and high densities the equilibrium favours the neutral state. The concentrations of ions and neutral atoms can be computed from the temperature, the density, and the ionization potential (namely, the energy required to detach an electron from the atom).
The absorption line of neutral calcium at 4227 Angstroms is thus strong in cool M-type dwarf stars, in which the pressure is high and the temperature is low. In the hotter G-type stars, however, the lines of ionized calcium at 3968 and 3933 Angstroms (the "H" and "K" lines) become much stronger than any other feature in the spectrum.
In stars of spectral type F, the lines of neutral atoms are weak relative to those of ionized atoms. The hydrogen lines are stronger, attaining their maximum intensities in A-type stars, in which the surface temperature is about 9,000 K. Thereafter, these absorption lines gradually fade as the hydrogen becomes ionized.
The hot B-type stars, such as Epsilon Orionis, are characterized by lines of helium and of singly ionized oxygen, nitrogen, and neon. In very hot O-type stars, lines of ionized helium appear. Other prominent features include lines of doubly ionized nitrogen, oxygen, and carbon and of trebly ionized silicon, all of which require more energy to produce.
In the more modern system of spectral classification, called the MK system (after the American astronomers William W. Morgan and Philip C. Keenan who introduced it), luminosity class is assigned to the star along with the Draper spectral class. For example, Alpha Persei is classed as F5 Ia, which means that it falls about halfway between the beginning of type F (i.e., F0) and of type G (i.e., G0). The Ia suffix means that it is a particularly luminous supergiant. The star Pi Cephei, classed as G2 III, is a giant falling between G0 and K0 but much closer to G0. The Sun, a dwarf star of type G2, is classified as G2 V. A star of luminosity class II falls between giants and supergiants; one of class IV is called a subgiant.
For more on the classification of stellar spectra goto here
Excerpt from the Encyclopedia Britannica without permission.