Why are these two methods of converting from ppm to g/m3 equivalent? I've found two methods to convert from $ppm$ to $g/m^3$. They both appear to give equivalent results, but I don't understand why. Can anyone join the dots for me and explain why they are equivalent methods, or show a derivation for Method 1? I've found a derivation for Method 2.
Method 1 - Definition
$$C[g/m^3] = \frac{C[ppm] \cdot \rho}{1000}$$
Where $C[ppm]$ and $C[g/m^3]$ represent gas concentration in units of $ppm$ and $g/m^3$ respectively and $\rho$ represents gas density.
Method 2 - Definition (As derived here)
$$C[g/m^3] = \frac{C[ppm] \cdot M \cdot P}{R \cdot T \cdot 10^6}$$
Where $M$, $P$, $R$ and $T$ represent molar mass, pressure, ideal gas constant and temperature respectively.
Method 1 - Example - Carbon Monoxide (CO)
Assuming $C[ppm]$ as $100ppm$ and CO density as $1.15 kg/m^3$ at $20^{\circ}C$ and $100000Pa$
$$C[g/m^3] = \frac{C[ppm] \cdot \rho}{1000}$$
$$C[g/m^3] = \frac{100 \cdot 1.15}{1000}$$
$$C[g/m^3] = 0.115$$
Method 2 - Example - Carbon Monoxide (CO)
Assuming $C[ppm]$ as $100ppm$ at $20^{\circ}C$ and $100000Pa$.
$$C[g/m^3] = \frac{C[ppm] \cdot M \cdot P}{R \cdot T \cdot 10^6}$$
$$C[g/m^3] = \frac{100 \cdot 28 \cdot 100000}{8.3145 \cdot (20+273.15) \cdot 10^6}$$
$$C[g/m^3] = 0.115$$
Using the ideal gas law
$$
pV = nRT = \frac{m}{M}RT
$$
you can express the density $\rho = \frac m V$ in terms of molar mass, pressure, ideal gas constant, and temperature:
$$
\rho = \frac{pM}{RT}
$$
With the units you use in your second example, this yields a density in $\mathrm{g\,m^{-3}}$, whereas you insert a density in $\mathrm{kg\,m^{-3}}$ into your first equation. Thus, I will write your first equation as
$$
C[\mathrm{g\,m^{-3}}] = \frac{C[\mathrm{ppm}] \cdot \rho}{10^6}
$$
where the density is in $\mathrm{g\,m^{-3}}$.
Inserting the expression for $\rho$ derived above into this equation, we get
$$
C[\mathrm{g\,m^{-3}}] = \frac{C[\mathrm{ppm}] \cdot \rho}{10^6} = \frac{C[\mathrm{ppm}]}{10^6}\frac{pM}{RT}
$$
which is identical to your second equation.