What is the product of magnesium reacting with carbon?


> 
> $$\ce{Mg + C -> X}$$
>  $$\ce{X + H2O -> Y}$$
>  Determine unknowns X and Y. 
> 
> 
> 


Now the problem is I think the answer should be $\ce{X=MgC2}$ and $ \ce{Y=C2H2 + Mg(OH)2}$. But the given answer was $ \ce{X}= \ce{Mg2C3}$ and $\ce{Y}=\ce{C3H4} + \ce{Mg(OH)2}$ 


I tried to google the answer but where some website say $\ce{C3H4}$ is correct some say $\ce{C2H2}$ is. Funny thing is in the exam just after that one we got the same question and this time the $\ce{C2H2}$ was the answer (and I wrote $\ce{C3H4}$) 




This asnswer is intended to extend my comment. Most of the information is taken from [this site](http://magnesium.atomistry.com/magnesium_carbide.html).




---


Both types of magnesium carbide($\ce{MgC2, Mg2C3}$) is formed when acetylene gas is passed over magnesium. At different temperatures, one type of carbide predominates over the other. At 570°C-610° C, $\ce{MgC2}$ converts to $\ce{Mg2C3}$:


$$\ce{2MgC2 -> Mg2C3 + C }$$


Above 610° C, $\ce{Mg2C3}$ decomposes:


$$\ce{Mg2C3 -> 2Mg + C}$$ 


Both types of magnesium carbide can be hydrolysed:


$$\ce{MgC2 + 2H2O -> Mg(OH)2 + C2H2}$$ 
$$\ce{Mg2C3 + 4H2O -> 2Mg(OH)2 + C3H4}$$




---


For more information on the structure of magnesium carbide, see [this old paper from 1943](https://pubs.acs.org/doi/pdf/10.1021/ja01248a015). Also, how magnesium carbide behaves at high pressure is discussed in [this new paper(2015)](https://pubs.acs.org/doi/pdf/10.1021/acs.jpcc.5b07862). Another type of magnesium carbide, $\ce{Mg2C}$ exist at high pressure and it along with $\ce{MgC2}$ behaves as semiconductor while $\ce{Mg2C3}$ behave as insulator-metal transition. (OP is requested to see both papers if interested)


 4