Electrostatic attraction between oppositely charged ions.
Predicting ionic charges from position in the periodic table.
Atoms of metals in groups 1-3:
Lose electrons, so they form positive ions with the noble configuration of the previous noble gas in the periodic table.
Atoms of non-metals in groups 5-7:
Gain electrons, so they form negative ions with the noble gas configuration…