Magnesium atom loses two
electrons by transferring the electrons to fluorine atoms, one each, making
both stable. The loss of electron forms cation, Mg2+, as it loses 2
electrons, and the gain of electron forms anion, F-. The opposite
charges acquired by both ions attract to each other, forming a strong ionic
bond of MgF2.