The majority of stars sit along a well defined track of luminosity versus temperature in an HR diagram. Why is this ? The obvious quantity that could cause this is mass - maybe the main sequence is telling us about the mass of stars ?
But how can we possibly know anything about the masses of stars - they are SO far away! Well, how do we know the mass of the Sun ? We get that by knowing something about gravity (or see this more technical discussion of gravity ). The force due to gravity can be easily calculated when we know the mass of an object and its distance. But if there is something in orbit around the object then its this gravitational force which keeps it it orbit. So knowing the orbital period gives us another way to determine the gravitational force. But we can measure orbital periods, and we can measure distance, and we use these two bits of information plus our knowledge of gravity to determine the mass.
So if we can observe something orbiting a star, and we know the distance of the orbiting object from the star, and its orbital period then we can determine the mass of a star. But in practice, to observe something at the distance of a star it needs to be pretty bright i.e. be a star itself! And then the companion star gravity is important too - the discussion above assumed that the orbting object was negligible in mass compared to the star. So now we need to know an additional bit of information which is the ratio of the star masses, which is given by the distance of each star from the center of mass of the system - more on gravity and orbits. So we need to find binary stars - this IS NOT hard: about 50 per cent of stars are in multiple systems. But watching stars go around each other to map out the orbit is slow work - if the two stars are far enough apart to be able to see them both (visual binary) then the orbit is very very long. So it'd be much better to get a closer orbit which have shorter periods. But then how can we resolve the two stars ?
Well, we don't need to. We can watch the spectral lines move via the doppler shift. This gives us the speed at which the star is moving towards us or away from us. So we can watch the lines shift forward and back, to give us the orbital period, and we can get the maximum velocity of each star (and we can convert this to distance from the center of mass by understanding gravity) and the ratio of the velocities of the two stars so we know their mass ratio. So we then have everything we need to find the mass. See this links to how to measure the masses of stars, and play with the java animation on doppler shift for binary stars. Put in M1=M2=1 with a circular orbit (e=0) and play. Then put M1=10 and see the differences. The massive star moves much more slowly, so its velocity and doppler shifts are small. And another site on spectroscopic binaries.
When we do this for many different types of stars we can convert the HR diagram from luminosity-temperature to luminosity-mass. And sure enough, the main sequence is a sequence in mass. The reason is quite easy to see: an explanation of the Mass-Luminosity relation
Want to know more about that song ?
pages 112-117 in Kuhn