When a metal and a non-metal react together, the metal atom loses electrons to form a positively charged ion and the non-metal gains these electrons to form a negatively charged ion. These oppositely charged ions are strongly attracted to one another by electrostatic forces. This atraction is called an ionic bond