Here's why:
* Halogens are highly electronegative, meaning they have a strong attraction for electrons. They tend to gain one electron to achieve a stable octet configuration in their outermost shell.
* Metals are electropositive, meaning they have a tendency to lose electrons. They readily lose electrons to achieve a stable configuration, often by losing all electrons in their outermost shell.
When a metal loses an electron and a halogen gains an electron, both atoms become ions. The metal forms a cation (positively charged ion), while the halogen forms an anion (negatively charged ion). These oppositely charged ions then attract each other electrostatically, forming an ionic bond.
Example:
* Sodium (Na) is a metal in Group 1. It readily loses one electron to form a sodium ion (Na+).
* Chlorine (Cl) is a halogen in Group 17. It readily gains one electron to form a chloride ion (Cl-).
When sodium and chlorine react, they form sodium chloride (NaCl), a common ionic compound we know as table salt.
General Formula:
The general formula for ionic compounds formed between a metal and a halogen is MX, where:
* M represents the metal cation
* X represents the halogen anion
Other Examples:
* Potassium bromide (KBr)
* Magnesium chloride (MgCl2)
* Calcium iodide (CaI2)
* Lithium fluoride (LiF)