When the absolute magnitude for a group of stars is plotted against the spectral classification of the star, in a Hertzsprung–Russell diagram, evolutionary patterns are found that relate to the mass, age and composition of the star. In particular, during their hydrogen burning period, stars lie along a curve in the diagram called the main sequence. By measuring these properties from a star's spectrum, the position of a main sequence star on the H–R diagram can be determined, and thereby the star's absolute magnitude estimated. A comparison of this value with the apparent magnitude allows the approximate distance to be determined, after correcting for interstellar extinction of the luminosity because of gas and dust.