Putting mass-luminosity relation and Hertzsprung-Russel diagrams together leads us to a mass-age relation; so how do stars lose their mass over time?

I think that the title is completely clear, but here's an expansion:

I was just reading about Mass-luminosity relation that says massive stars are more luminous than tiny ones. Well, let's talk about main-sequence stars for now. This relation becomes interesting when it's mixed with the Hertzsprung-Russel diagram that says young stars are more luminous than older ones (Originally says that hotter stars are more luminous and we know that hotter stars are younger).

So mixing these two relations produces some kind of Mass-age relation which says young stars are more massive, that is a star loses its mass over time, right? (Please tell me if I'm going wrong)

If this Mass-age relation is right, how do stars lose this extra mass during their evolution? And where does this stray matter go?

-
Where do you get from the HR diagram that "hotter stars are younger"? All stars in the MS have the same age. What varies is their mass and radius, see ia.terc.edu/images/mod_05/H-R%20Diagram.jpg (@RobJeffries I believe he meant a 'HR' diagram, ie: a Hertzsprung-Russel diagram) – Gabriel May 26 '15 at 17:39
@Gabriel On average hotter stars on the main sequence are younger. All stars on the MS certainly do not have the same age. – Rob Jeffries May 26 '15 at 19:29
@RobJeffries would you mind explaining what you mean? References would be great. A star is called a MS star when it begins to fuse H into He, are you talking about the time spent as pre-MS stars? – Gabriel May 26 '15 at 19:36
@Gabriel, Gerald's answer explains. For a uniform star formation rate then a bunch of main sequence B stars would have an average age of about 100 million years. A random bunch of main sequence G stars would have an average age of about 5 billion years. – Rob Jeffries May 26 '15 at 20:26
Better to say that more massive main sequence stars cannot be very old, so their average age is younger. – Rob Jeffries May 26 '15 at 20:30

There is an alternative interpretation: Massive stars burn their fuel much faster than tiny ones. Hence massive stars are short-lived in comparison to tiny stars.

The lifetime of a star is proportional to about the inverse of the cube of its mass. The Sun's lifetime is about $10^{10}$ years, hence for stars with 10 solar masses the lifetime is about $10^7$ years, and for stars with 0.1 solar masses it's about $10^{13}$ years.

But stars also loose mass, e.g. by stellar wind and coronal mass ejections. Heavy stars may loose mass (parts of their envelope) e.g. by pulsation or radiation pressure during their red giant or their Wolf-Rayet phases, before they explode as a supernova.

-

There are several causes for mass loss.

One is transformation of mass into energy by means of nuclear fusion, and the energy is radiated away.

But the big one is stellar winds: particles ejected from the star surface.

-
Thanks for the answer. I think that transformation of mass into energy does not play a big role, as you said. I tried to estimate: Regarding to HS-diagram and mass-luminosity, the sun must lose 8.66 e29 kg of it's mass during upcoming 9 e10 years, but if the sun keeps radiating energy with current rate (in fact this rate will decrease by time, but we ignored that) the sun will lose only 1.22 e28 kg during this time (E=mc^2). This is less than 1.5% of all lost mass. Therefore, stellar winds are the main cause of mass loss. However I'm still looking for more answers and ideas. – Mostafa Farzán Apr 23 '14 at 13:20
Hi again. I'm sorry but I'm not satisfied. The sun must lose 8.66 e29 kg during upcoming 9 e10 years (see my last comment). But in the Solar Wind page of Wikipedia, I've found this: "the total mass loss each year is about (2–3)×10 e−14 solar masses" which means only 5.35 e27 kg during this time (considering 3 e-14 solar masses each year). This amount of mass is less than 0.7% of total mass loss. What's wrong? My estimation? Or the Wikipedia data? Or maybe these are right, and there's some else mass ejection way for stars? – Mostafa Farzán Apr 23 '14 at 14:34