Here's why:
* Electronegativity: Electronegativity is the measure of an atom's ability to attract electrons in a bond. Nonmetals generally have higher electronegativity than metals.
* Electron Transfer: When a metal interacts with a nonmetal, the higher electronegativity of the nonmetal causes it to "steal" one or more electrons from the metal atom. This results in the formation of ions: a positively charged metal ion (cation) and a negatively charged nonmetal ion (anion).
* Electrostatic Attraction: The oppositely charged ions are then attracted to each other through strong electrostatic forces, forming an ionic bond.
Example:
* Sodium (Na) and Chlorine (Cl): Sodium has a low electronegativity, while chlorine has a high electronegativity. When they react, sodium loses an electron to become a positively charged sodium ion (Na+), and chlorine gains an electron to become a negatively charged chloride ion (Cl-). These ions then form an ionic bond to create sodium chloride (NaCl), commonly known as table salt.