Opacities

Why does opacity depend on composition? Basically, because the chemical species present and their state of ionization can have a very large influence on the absorption and emission of photons by the stellar material. For example, we have seen that the presence of negative hydrogen ions in the surface of the Sun is the leading source of opacity there.

As another example, the presence of elements heavier than hydrogen and helium (metals, in astronomy terminology) increases opacity because they can be ionized easily. As a result, stars with higher concentrations of metals are slightly less luminous and have slightly lower surface temperatures than a star of the same mass with lower metal concentration.

Width of the Main Sequence

We have talked to this point as if the mass were the sole determining factor for the location of a star on the HR diagram when it initiates hydrogen fusion in its core and stabilizes on the main sequence. If this were the case, we would expect the main sequence to be a line. In fact, for realistic HR diagrams the main sequence is a narrow band, but not a line.

Zero Age Main Sequence
Stars drift up and to the left or right slightly on the HR diagram while they are on the main sequence burning hydrogen stably. This drift is in response to changes brought about in the interior by the core burning. Astronomers refer to the theoretical main sequence defined by the set of points where stars that have essentially the same composition first reach the main sequence as the Zero Age Main Sequence, which is commonly abbreviated as ZAMS.
Role of Composition
The primary reason for the width of the main sequence is that stars do not have exactly the same composition. If they did, the Zero Age Main Sequence described above would define a main sequence with almost no width. Instead, stars of a given mass but with different chemical compositions reach the main sequence with slightly different values of surface temperature and luminosity.
Opacities and Composition
The most important way in which different compositions influence the exact position of a star on the HR diagram is through modifying the opacities in the outer layers of the star (see the box). This influences the energy transport and alters both the surface temperature and the luminosity. The effect is small compared with the dominant role of mass, so it leads to only a small width for the main sequence.