How to find the molar mass of an unknown metal carbonate through a gas evolution reaction? As part of a pre-lab exercise in Chemistry, we went through the necessary calculations to identify an unknown metal in a metal carbonate. The method was gas evolution by means of hydrochloric acid (see equation below). 

$$\ce{HCl + M2CO3 -&gt; MCl + CO2 + H2O}$$

The unknown metal was Alkali, and we had three possibilities: Lithium, Sodium and Potassium as $\ce{M}$.

Using data given to us, we first converted grams of released $\ce{CO2}$ to moles. Then here was the part I was confused on-

To find the molar mass of the metal carbonate, we took the mass of the sample used (the metal carbonate) and divided it by moles of $\ce{CO2}$ released, which was just calculated. The rest here on out was a little algebra. What is the reasoning behind dividing the mass of the sample by released $\ce{CO2}$? What makes it "legal"? Yes, in the balanced equation, the ratio of $\ce{M2CO3}$ to $\ce{CO2}$ was $1:1$.
$$\ce{HCl + M2CO3 -&gt; MCl + CO2 + H2O}$$


Since you already figured out, that there is a one-to-one ratio of carbonate to carbon dioxide, you can simply write
$$n(\ce{CO2}) = n(\ce{M2CO3}).$$

With the formula for the Molar mass,
$$M(\ce{M2CO3}) = \frac{m(\ce{M2CO3})}{n(\ce{M2CO3})},$$
you can simply substitute one for the other, hence
$$M(\ce{M2CO3}) = \frac{m(\ce{M2CO3})}{n(\ce{CO2})}.$$