How ionic compounds are formed (using MgO as an example)
1. Reaction of a metal with a non-metal
2. Electron transfer occurs - metal gives away its outer shell electrons to non-metal
3. Mg is in Group II, so has 2 available outer shell electrons
4. O is in Group VI, so can accept 2 electrons to get a full outer shell configuration
5. Mg becomes Mg2+ and O becomes O2− (oxide)