# Is magnesium hydride ($Mg{H_2}$) an ionic compound?

In $Mg{H_2}$ , Mg being metal has 2 electrons in its outermost valence shell (E.C-2, 8, 2 ), Hydrogen being a gas, has only a single electron in its outermost shell (E.C- 1). So, two electrons are donated to Mg and it achieves its stable configuration i.e. octet rule is satisfied. Hydrogen on the other hand receives one electron each and thus attains the electronic configuration of Helium and becomes stable.
Hence, $Mg{H_2}$ is an ionic compound.
Note: Magnesium hydride($Mg{H_2}$)is a white crystalline solid. It reacts violently with water and may ignite upon contact with air and is used to make other chemicals. If a cation has high polarising power, it pulls the large electron clouds from the anion forming a bond that is at least partially covalent. as far as $Mg{H_2}$ is concerned Mg is a small relatively high charge ion and the H- ion is relatively large.