What is he on about?
[W]e . . . have to keep track of the stuff that isn’t hydrogen – helium and everything else in the periodic table, which astronomers often refer to collectively as “metals.” This makes for all sorts of partially-deserved jokes – oxygen isn’t a metal! but it is number 3 in cosmic abundance after hydrogen and helium. Like many anachronisms, the practice has good historical precedent. Early efforts to measure the abundances of the chemical elements in stars first gave results for iron. As other elements were probed, their abundances followed a pattern that scaled pretty well with the abundance of iron relative to hydrogen. So once again we have a proxy – this time, the iron abundance being a stand-in for that of everything else. Hence the persistence of the terminology – the metallicity of a star is a shorthand for the fraction of its mass that is not hydrogen and helium.
And that fraction is small. We usually write the mass fractions of hydrogen, helium, and everything else (metals) as
X + Y + Z = 1
where X is the fraction of mass in hydrogen, Y that in helium, and Z is everything else. For the sun, Lodders gives X = 0.7389, Y = 0.2463, and Z = 0.0148. Do I believe all those significant digits? No. Is there a good reason for them to be there? Yes. So without delving into those details, let’s just note that the universe is about 3 parts hydrogen, one part helium, with a sprinkling of everything else. Everything else being all the elements in the periodic table that aren’t hydrogen or helium – all the carbon and nitrogen and oxygen and silicon and magnesium and noble gases and actual metals – these all add up to about 1.5% of the mass of the sun, which is typical of nearby stars. So you can see why they’re all just metals to many astronomers.
For the mass of gas in galaxies, we need to correct what we measure in hydrogen for the presence of helium and metals. We measure the mass of atomic hydrogen using the 21 cm line, but that’s just the hydrogen. There is a corresponding amount of helium and metals that goes along with it. So we estimate the mass fraction in hydrogen, X, and use divide by that to get the total mass: M(gas) = M(HI)/X. We do the same for molecular gas, etc.
There are measurements of the metallicities of entire galaxies, but – you guessed it – this isn’t observationally cheap, and isn’t always available. So we need another proxy. Luckily for us, it turns out that once again there is a pretty good correlation of metallicity with stellar mass: galaxies with lots of stars have made lots of supernovae that have processed lots of material into metals. Most of it is still hydrogen, so this is a very subtle effect: 1/X = 1.34 for the tiniest dwarf, going up to about 1.4 for a galaxy like the Milky Way. Still, we know this happens, so we can account for it, at least in a statistical way.
From Triton Station.