Ionic compounds form when electrons from an electropositive metal are transferred to an electronegative nonmetal to complete the outer shells of both atoms, forming positive and negative ions that are electrostatically attracted to one another. The attraction between the two ions results in an ionic bond.
Compounds that result from this process are called ionic compounds. The reaction of sodium with chlorine to give sodium chloride, magnesium and oxygen to give magnesium oxide and calcium and fluorine to give calcium fluoride are all examples of ionic compound formation through this mechanism. The name of the metal in the compound remains the same, but the name of the nonmetal is suffixed with –ide. Fluorine becomes fluoride, chlorine becomes chloride, iodine becomes iodide and oxygen becomes oxide.
The electrons that are ejected from the metal to the nonmetal empty the outermost shell of the metal, resulting in a positive ion having the electronic configuration of the nearest noble gas. These electrons complete the outermost shell of the nonmetal, resulting in a negative ion having the electronic configuration of its respective noble gas neighbor. Ionic compounds can assume periodic arrangements to form ionic crystals. The high melting and boiling points of ionic crystals can be attributed to the strong electrostatic interaction between each ion and the neighboring ions of opposite charge.