Magnesium chloride is an ionic compound. It forms when a magnesium atom transfers electrons to chlorine atoms.
Why do atoms of elements form bonds?
Atoms form bonds to reach a stable noble gas configuration. If an atom has only one shell, it needs 2 electrons. This is a duplet. If it has more than one shell, it needs 8 electrons in the outer shell. This is an octet. Only the outer electrons are involved in bonding.
Electrons in each atom
We can determine the number of electrons each atom has from the periodic table. In the periodic table, the number at the top tells us the number of proton an atom has. Since number of protons and electrons are the same in an atom, this number also tells us how many electrons each atom has. The number at the bottom tells us the number of protons and neutrons each atom has.
Magnesium has proton number 12, so it has 12 electrons.
- First shell: 2
- Second shell: 8
- Third shell: 2
Magnesium needs to lose 2 electrons to reach an octet.
Chlorine has proton number 17, so it has 17 electrons.
- First shell: 2
- Second shell: 8
- Third shell: 7
Each chlorine atom needs only 1 more electron to reach an octet.
How the ions form
Magnesium has 2 electrons to donate, but each chlorine atom can accept only 1. Two chlorine atoms are needed.
Magnesium donates 1 electron to each chlorine atom. Magnesium atom becomes a magnesium ion, Mg²⁺.
Each chlorine atom accepts 1 electron and becomes a chloride ion, Cl⁻.
The oppositely charged ions are held together by strong electrostatic forces of attraction. This is the ionic bond.
Charges of the ions
A magnesium atom has 12 protons (+12) and 12 electrons (−12), so its charge is 0. After it loses 2 electrons, it still has 12 protons (+12) but only 10 electrons (−10). The charge is +2.
Each chlorine atom has 17 protons (+17) and 17 electrons (−17), so its charge is 0. After it gains 1 electron, it still has 17 protons (+17) but now has 18 electrons (−18). The charge is −1.
Drawing Magnesium chloride
Now, magnesium has to give away 2 electrons but chlorine can only take in 1 electron to form a chloride ion. Hence, we will need to have one more chlorine to take in both electrons from magnesium.
Dot and cross diagram
- Show the magnesium atom with 2 outer electrons, using dots.
- Show two chlorine atoms, each with 7 outer electrons, using crosses.
- Move one magnesium electron into the outer shell of each chlorine atom.
- Draw square brackets around each ion.
- Write the charge outside the bracket: 2+ for magnesium and − for each chloride.
There are 2 chlorides in this compound. You can choose not to draw both chloride ions. You may draw one chloride ion and put a 2 in front of it.
Note for exams: If the question asks you to draw only the outermost electrons, you can omit the inner shells. Only show the valence electrons involved in bonding.
What to remember
- Magnesium loses 2 electrons and forms Mg²⁺.
- Each chlorine gains 1 electron and forms Cl⁻.
- Two chloride ions are needed, so the formula is MgCl₂.
- The ions are held by electrostatic attraction, not by shared electrons.
Learn more…
Previous lesson: Dot and Cross Diagram of Sodium Chloride
Next lesson: Dot and Cross Diagram of Sodium Oxide
All topics: Chemistry Resources



