* Both are metals: Sodium and magnesium are both metallic elements. Metallic elements tend to lose electrons and form positive ions (cations).
* No significant electronegativity difference: The electronegativity difference between sodium and magnesium is very small (0.5). A significant electronegativity difference is required for the formation of an ionic bond.
To form an ionic compound, you need:
* A metal and a nonmetal: The metal will donate electrons to the nonmetal.
* A large enough electronegativity difference: This ensures that one atom has a much stronger pull on the shared electrons, resulting in the formation of ions.
Example of an ionic compound:
Sodium chloride (NaCl) is an ionic compound formed from the reaction between sodium (a metal) and chlorine (a nonmetal). Sodium readily loses one electron to form a positive sodium ion (Na+), while chlorine gains one electron to form a negative chloride ion (Cl-). The opposite charges attract, forming the ionic bond in NaCl.