In short
An element's valence electrons decide how it bonds. Metals on the left of the table lose their few valence electrons to form cations (Na⁺, Mg²⁺, Al³⁺); nonmetals on the right gain electrons to form anions (Cl⁻, O²⁻, N³⁻), usually reaching a noble-gas configuration. Combining ions so the charges cancel gives the formula of an ionic compound, and elements in the same group form compounds with the same formula pattern.
What you need to know
- Determine the number of valence electrons from an element's position in the periodic table.
- Predict the typical charge of a main-group ion from its electron configuration.
- Write the formula of an ionic compound from the charges of its ions.
- Use the position of elements in the periodic table to predict analogous compounds.
Valence electrons and typical ion charges
For main-group elements, the number of valence electrons equals the number of s and p electrons in the outermost shell, which you can read from the group: group 1 has 1, group 2 has 2, group 13 has 3, and so on up to group 17 with 7. Chemical bonding happens through these electrons, because they are the ones least tightly held and the ones that interact with other atoms.
| Group | Valence electrons | Typical ion | Examples |
|---|---|---|---|
| 1 | 1 | 1+ | Li⁺, Na⁺, K⁺ |
| 2 | 2 | 2+ | Mg²⁺, Ca²⁺ |
| 13 | 3 | 3+ | Al³⁺ |
| 15 | 5 | 3− | N³⁻, P³⁻ |
| 16 | 6 | 2− | O²⁻, S²⁻ |
| 17 | 7 | 1− | F⁻, Cl⁻, Br⁻ |
These charges come straight from the ionization energies in topic 1.7. Removing magnesium's two 3s electrons costs a manageable amount of energy, but the third electron would come from the core, and that costs about five times as much. So magnesium forms Mg²⁺ and never Mg³⁺ in its compounds. Nonmetals have a high effective nuclear charge on their valence shell, so they gain electrons until the shell is full.
Writing formulas for ionic compounds
An ionic compound is electrically neutral, so the total positive charge must equal the total negative charge. Find the smallest whole-number ratio of ions that makes the charges cancel.
- Na⁺ and Cl⁻: one of each, NaCl.
- Mg²⁺ and Cl⁻: two chlorides for each magnesium, MgCl₂.
- Al³⁺ and O²⁻: lowest common multiple of 3 and 2 is 6, so two Al³⁺ (+6) and three O²⁻ (−6), Al₂O₃.
- Ca²⁺ and N³⁻: three Ca²⁺ (+6) and two N³⁻ (−6), Ca₃N₂.
Ionic compounds form from a metal and a nonmetal because the metal's low ionization energy and the nonmetal's strong attraction for electrons make electron transfer favourable. The ions then pack into a three-dimensional lattice, which you will study in Unit 2.
Elements in a group form similar compounds
Elements in the same group have the same number of valence electrons, so they form ions with the same charge and compounds with the same formula pattern. If you know that sodium forms Na₂O, you can predict K₂O and Li₂O. If calcium forms CaCl₂, then strontium forms SrCl₂ and barium forms BaBr₂.
Key terms
- Valence electrons
- Electrons in the outermost shell (the s and p electrons for main-group elements).
- Cation
- A positive ion, formed when an atom loses electrons; typical of metals.
- Anion
- A negative ion, formed when an atom gains electrons; typical of nonmetals.
- Ionic compound
- A compound of cations and anions held together by electrostatic attraction in a lattice.
- Analogous compounds
- Compounds with the same formula pattern formed by elements from the same groups, such as MgO and CaS.
Common mistakes
Aluminium oxide is AlO because each atom forms one ion.
The charges must cancel: two Al³⁺ (+6) and three O²⁻ (−6) give Al₂O₃.
Group 16 elements form 6+ ions because they have six valence electrons.
Nonmetals gain electrons; oxygen and sulfur gain two to form 2− ions.
Magnesium could form Mg³⁺ if enough energy were supplied in a reaction.
Removing a core electron needs far more energy than bonding returns, so Mg³⁺ does not form in compounds.
The formula of calcium nitride is CaN.
Ca²⁺ and N³⁻ combine as Ca₃N₂ so that +6 balances −6.
How this topic is tested
- When predicting a formula, write each ion's charge first and check the total charge is zero before you finish.
- If a question asks why an element forms a particular ion, refer to electron configuration and ionization energies, not just to the group number.
- Use analogous compounds as a shortcut: same group, same formula pattern.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 1 · Models and Representations
What is the formula of the ionic compound formed between strontium and bromine?
Question 2 · SP 4 · Model Analysis
Lithium forms the compound Li₂O. What is the formula of the compound formed between rubidium and sulfur?
Question 3 · SP 1 · Models and Representations
Which ion has the electron configuration 1s² 2s² 2p⁶ 3s² 3p⁶?
Question 4 · SP 6 · Argumentation
The first three ionization energies of an element X are 496, 4562 and 6910 kJ/mol. Which is the most likely formula of its chloride?
Question 5 · SP 5 · Mathematical Routines
What is the formula of aluminium nitride?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Short answer (4 points) · 4 points
Calcium reacts with chlorine to form calcium chloride, an ionic compound.
- (a) Write the electron configuration of the calcium ion in calcium chloride.
- (b) Write the formula of calcium chloride and justify it in terms of the ions' charges.
- (c) Explain, using ionization energies, why calcium forms Ca²⁺ rather than Ca³⁺ in its compounds.
Scoring guide: one point for each of the following
Part (a)
- Ca²⁺: 1s² 2s² 2p⁶ 3s² 3p⁶ (or [Ar]).
Part (b)
- CaCl₂: one Ca²⁺ (+2) is balanced by two Cl⁻ (−1 each), so the compound is neutral.
Part (c)
- After calcium loses its two 4s valence electrons, a third electron would have to come from the n = 3 core.
- That electron is much closer to the nucleus and less shielded, so the third ionization energy is far larger and Ca³⁺ is not formed.
Connected topics
Frequently asked questions
Do I need to memorise polyatomic ions for AP Chemistry?
Yes, the common ones (such as NO₃⁻, SO₄²⁻, CO₃²⁻, PO₄³⁻, OH⁻ and NH₄⁺) come up throughout the course, especially in Unit 4 reactions. Their formulas are not given on the exam.
Why do metals form cations and nonmetals form anions?
Metals have low ionization energies, so their few valence electrons are easy to remove. Nonmetals have a high effective nuclear charge on a nearly full shell, so they attract extra electrons.
Are ionic compounds made of molecules?
No. They are lattices of ions with no separate molecules, so their formulas show the simplest ratio of ions, called a formula unit.