Stars given a designation consisting of a letter and a number according to the nature of their spectral lines which corresponds roughly to surface temperature. The classes are: O, B, A, F, G, K, and M; O stars are the hottest; M the coolest. The numbers are simply subdivisions of the major classes. The classes are oddly sequenced because they were assigned long ago before we understood their relationship to temperature. O and B stars are rare but very bright; M stars are numerous but dim. The Sun is designated G2.