Steps in the formation of ionic compounds
1️⃣ Electrons are transferred from a metal to a non-metal.
2️⃣ The metal becomes a positively charged cation, and the non-metal becomes a negatively charged anion.
3️⃣ The oppositely charged ions attract each other to form an ionic compound.