What is the formula of #"magnesium nitride"#, #Mg_3N_2#?
Consider the typical valencies of magnesium metal and dinitrogen in their compounds.
Magnesium is a Group 2 metal with 2 valence electrons that can be oxidized:
Dinitrogen is a gaseous non-metal that can be reduced to
Since typically non-metals can oxidize metals, or metals reduce non-metals, we cross multiply to give the stoichiometric equation:
Such a reaction is called a nitriding reaction. It would require conditions of high temperature.