Magnesium valence electrons in magnesium hydride
Neutral magnesium has 2 valence electrons. Its electron configuration is \( \mathrm{[Ne]3s^2} \), so the two electrons in the \( 3s \) subshell are the outermost electrons. In magnesium hydride, \( \mathrm{MgH_2} \), magnesium is best represented as \( \mathrm{Mg^{2+}} \), meaning magnesium has lost those two valence electrons.
The number associated with magnesium before bonding is 2 valence electrons. In the ionic model of magnesium hydride, those two electrons are transferred to two hydrogen atoms, forming one \( \mathrm{Mg^{2+}} \) ion and two \( \mathrm{H^-} \) hydride ions.
Electron configuration of magnesium
Magnesium has atomic number 12, so a neutral magnesium atom contains 12 electrons. The electron configuration is:
\[ \mathrm{Mg: 1s^2\,2s^2\,2p^6\,3s^2} \]In noble-gas notation, the same configuration is:
\[ \mathrm{Mg: [Ne]3s^2} \]The valence shell is the outermost occupied principal energy level, \( n = 3 \). Because the \( 3s \) subshell contains two electrons, magnesium has:
\[ 2\ \text{valence electrons} \]Formation of magnesium hydride
Magnesium hydride contains magnesium and hydrogen in a \( 1:2 \) ratio. Magnesium is a Group 2 metal, so it commonly loses two valence electrons and forms \( \mathrm{Mg^{2+}} \). Hydrogen can gain one electron to form the hydride ion, \( \mathrm{H^-} \). Two hydrogen atoms are needed because each hydrogen atom accepts one electron.
\[ \mathrm{Mg \longrightarrow Mg^{2+} + 2e^-} \] \[ \mathrm{2H + 2e^- \longrightarrow 2H^-} \]Combining these electron-transfer relationships gives the ionic formula:
\[ \mathrm{Mg^{2+} + 2H^- \longrightarrow MgH_2} \]Why the formula is \( \mathrm{MgH_2} \)
The formula follows from charge balance. Magnesium loses two electrons and becomes \( \mathrm{Mg^{2+}} \). Each hydride ion has a \( -1 \) charge. Two hydride ions are needed to balance the \( +2 \) charge of magnesium:
\[ (+2) + 2(-1) = 0 \]The neutral formula unit is therefore:
\[ \mathrm{MgH_2} \]Valence-electron count before and after bonding
The phrase “how many valence electrons does magnesium have in magnesium hydride” can refer to two related ideas. Neutral magnesium has two valence electrons before the compound forms. In the \( \mathrm{Mg^{2+}} \) ion inside the ionic model of magnesium hydride, those two original \( 3s \) valence electrons have been lost.
| Species | Electron configuration | Valence-electron interpretation | Role in \( \mathrm{MgH_2} \) |
|---|---|---|---|
| Neutral magnesium, \( \mathrm{Mg} \) | \( \mathrm{[Ne]3s^2} \) | 2 valence electrons | Electron donor before ionic hydride formation |
| Magnesium ion, \( \mathrm{Mg^{2+}} \) | \( \mathrm{[Ne]} \) | The original two \( 3s \) valence electrons have been lost | Cation in magnesium hydride |
| Neutral hydrogen, \( \mathrm{H} \) | \( \mathrm{1s^1} \) | 1 valence electron | Accepts one electron in hydride formation |
| Hydride ion, \( \mathrm{H^-} \) | \( \mathrm{1s^2} \) | 2 electrons in a filled duet | Anion paired with \( \mathrm{Mg^{2+}} \) |
Total valence electrons from neutral atoms
A Lewis-style valence count for one formula unit of magnesium hydride begins with neutral atoms. Magnesium contributes two valence electrons, and each hydrogen contributes one valence electron:
\[ 2 + 2 \cdot 1 = 4 \]The neutral-atom valence-electron total for \( \mathrm{MgH_2} \) is therefore:
\[ 4\ \text{valence electrons} \]In the ionic representation, those four electrons are distributed as two hydride duets. Magnesium is shown as \( \mathrm{Mg^{2+}} \), and each \( \mathrm{H^-} \) has two electrons in its \( 1s \) shell.
Lewis representation
Magnesium hydride is commonly represented with ions rather than ordinary covalent single bonds:
\[ \mathrm{Mg^{2+}\ [\,{:}H{:}\,]^-_2} \]This notation emphasizes the charge relationship. The magnesium ion has a \( +2 \) charge, and each hydride ion has a \( -1 \) charge with a filled duet.
Common pitfalls
A common error is giving magnesium eight valence electrons because \( \mathrm{Mg^{2+}} \) has the electron configuration \( \mathrm{[Ne]} \). The stable noble-gas configuration describes the ion after magnesium has lost its two outer electrons. The neutral magnesium atom still has 2 valence electrons.
Another common error is writing magnesium hydride as \( \mathrm{MgH} \). That formula does not balance charge. One \( \mathrm{Mg^{2+}} \) ion requires two \( \mathrm{H^-} \) ions, so the correct formula is \( \mathrm{MgH_2} \).
Final interpretation
Magnesium has 2 valence electrons as a neutral atom. In magnesium hydride, those two electrons are transferred to two hydrogen atoms, producing \( \mathrm{Mg^{2+}} \), two hydride ions, and the charge-balanced formula \( \mathrm{MgH_2} \).