### Why you use log to measure metallicity in galaxies?

• For example, I saw the next expression for matallicity in a paper: $\log(O/H) + 12$.

I understand O/H is the O(Oxygen) to H(Hydrogen) ratio but why is there the number 12? And why the logarithm?

• The distribution of metallicities appear to be more evenly spread out in logspace than in linear space. The reason for this can be ascribed to there being no preferred scale for the abundance of a given element; rather they span several orders of magnitude. The same can be said for instance about the distribution of dust grain sizes, the distribution of the mass of dark matter halos, and the distribution of the area of lakes on Earth.

So, if you measure the number of oxygen atoms (or ions) in ten stars, and divide by the number of hydrogen atoms, you may get values like
$$\mathrm{O}/\mathrm{H} = \{0.03,3.5,25,0.003,0.9,0.4,0.09,0.01,8,0.02\}\times10^{-4}.$$
Plotting this in a linear and a logarithmic plot, you see that on a log scale, the values are easier to tell apart:

(Another reason, as zibadawa timmy writes in his/her answer, is that taking the log you don't need to write all those $10^x$ factors).

Now why add 12? This factor corresponds to measuring the number of a given atom per $10^{12}$ hydrogen atoms. I've been asking colleagues from students to professor level, and the best answer we can come up with, is that the least abundant elements in the Sun (uranium, rhenium, thorium, …) have abundances of the order of one per $10^{12}$ hydrogen atoms, so adding 12 to $\log(X/\mathrm{H})$ makes all values positive. This angst of negative values, I don't understand, though. Usually, we're okay with minuses. And measuring metallicities in stars or gas of sub-solar metallicity yield negative values anyway. Moreover, the scale was in use even when we had only lower thresholds for uranium and bismuth of $\log(\mathrm{U}/\mathrm{H})+12<0.8$ and $\log(\mathrm{Bi}/\mathrm{H})+12<0.6$, respectively (Grevesse 1969) and didn't know if they were actually smaller.

I have been unable to unearth the reason for the 12 either. Your explanation is plausible. Perhaps like the pH scale.

Fordømt! You were my best shot at someone who would know this, @RobJeffries.

• The logarithm is there because the ratio $O/H$ is really tiny. The log converts essentially points out the order of magnitude. If we have $O/H= 10^{-14}$, then $\log(O/H)=-14$. Taking logarithms is a standard practice in science and mathematics when the numbers range over several orders of magnitude (especially so when they are either very large or very small).

As for the +12, that is most likely because they want their preferred example to have value 0. It is then easy to tell at a glance if other stars/galaxy have more ($>0$) or less ($<0$) oxygen-to-hydrogen metallicity than the preferred example. In most cases this will be our own Sun, but without knowing where you saw this it's impossible to say for certain. We have far more information about our own sun than any other star, so it is the most reliable measuring stick we have for comparison.

Indeed, the value tells you approximately how many of orders of magnitude more or less metallicity it has. For, supposing $\log(O_\mbox{sun}/H_\mbox{sun}))=-12$, then $$\log(O/H)+12 = \log(O/H)-\log(O_\mbox{sun}/H_\mbox{sun})) = \log\left(\frac{O/H}{O_\mbox{sun}/H_\mbox{sun}}\right).$$
So if the value of this is 1, then you know the star in question has an $O/H$ ratio $10^1=$ten times that of our sun. Similarly, if it were $-3$, then the star in question would have an $O/H$ ratio that is $10^{-3}=1/1000$-th that of our sun's (or, equivalently, that our sun's ratio is $1000$ times larger). A value of $0$ means the ratios are the same.

In this notation, the Sun has a metallicity of 8.7. A metallicity of –12 means 12 orders of magnitude less than the Sun, i.e. less than even the most metal-poor (and hypothesized) Pop III stars.

Okay, re-reading my comment I see it was poorly written, but log(O/H)+12 is ~8.7 for the Sun, and "log(O/H) = –12" would mean 8.7 dex lower than the Sun, less than Pop III stars.

@pela Good to know. Without the OP specifying where he read the 12, it's hard to know where that came from. He did seem to suggest galaxy, which should be more metal poor than its stars on the whole due to the diffuse clouds of hydrogen and helium. Though if it's even poorer than the Pop III stars...that'd be weird.

The factor 12 is standard. Everybody uses it. But actually, the last couple of hours, I've been asking colleagues from student to professor level, where the factor comes from, and nobody knows. We just use it. The factor means that we measure the amount of atoms of a given element with respect to $10^{12}$ hydrogen atoms, but why exactly $10^{12}$? I'll get back if I find the answer.