Call

Yes, the point is that the quantity of gas is fixed. Since you can convert between mass and $"mol"$s using the molar mass, it doesn't matter which one is held fixed; the other is held fixed by implication of the converted units.

The has three common formulations:

$PV = nRT$
$PVM_m = mRT$
$PM_m = DRT$

where:

  • $P$ is pressure in, say, $"atm"$ or $"bar"$.
  • $V$ is volume in $"L"$.
  • $n$ is the $"mol"$s of gas.
  • $M_m$ is the molar mass of the gas in $"g/mol"$.
  • $D$ is the in $"g/L"$.
  • $m$ is the mass in $"g"$.
  • $R$ is the universal gas constant. If it is units of $"L"cdot"atm/mol"cdot"K"$, then pressure is in $"atm"$. If it is in units of $"L"cdot"bar/mol"cdot"K"$, then pressure is in units of $"bar"$. And so on.
  • $T$ is the temperature in $"K"$.

You can interconvert between these.

$M_m * PV = M_m * nRT$

$=> color(blue)(PVM_m = mRT)$

$PVM_m * 1/V = m/VRT$

$=> color(blue)(PM_m = DRT)$

And furthermore, derives from the ideal gas law, so when the ideal gas law can use masses or $"mol"$s or density, Boyle's law holds true as long as if any of those are constant, in addition to the temperature.

$P_1V_1 = nRT$
$P_2V_2 = nRT$

$=> color(blue)(P_1V_1 = P_2V_2)$,
Boyle's Law