Module 3 · Electronic structure and the periodic table · Lesson 20 of 136

Ionic and molecular compounds

How atoms form ions, predicting ion charges, writing formulas of ionic compounds with polyatomic ions, and molecular compounds.

In this lesson · about 25 minutes

  • Predict the charge of a main-group ion from the periodic table
  • Write the formula of an ionic compound, including polyatomic ions
  • Tell ionic compounds from molecular compounds

Forming ions

Atoms of main-group elements tend to gain or lose electrons until they have the same number of electrons as the nearest noble gas, the most stable arrangement.

  • Metals lose electrons and become cations. Group 1 forms 1+ ions (Na⁺), group 2 forms 2+ ions (Mg²⁺), and aluminum forms Al³⁺.
  • Nonmetals gain electrons and become anions. Group 17 forms 1− ions (Cl⁻), group 16 forms 2− ions (O²⁻), and group 15 forms 3− ions (N³⁻).

Many transition metals can form more than one ion, so we show the charge with Roman numerals: iron(II) is Fe²⁺, iron(III) is Fe³⁺.

Ionic compounds

Cations and anions attract each other strongly and form ionic compounds, usually from a metal and a nonmetal. Ionic compounds are solids with high melting points; they conduct electricity when melted or dissolved, because the ions can then move.

An ionic compound has no overall charge. So its formula uses the smallest numbers of each ion that make the charges add up to zero. Al³⁺ and O²⁻: two Al³⁺ (+6) and three O²⁻ (−6) give Al₂O₃. The formula shows a ratio, called a formula unit, not a molecule.

Polyatomic ions

Some ions are groups of atoms that stay together with an overall charge. Learn these common ones:

NameFormulaNameFormula
ammoniumNH₄⁺hydroxideOH⁻
nitrateNO₃⁻sulfateSO₄²⁻
carbonateCO₃²⁻phosphatePO₄³⁻

When you need more than one polyatomic ion, put it in brackets: calcium hydroxide is Ca(OH)₂, not CaOH₂.

Molecular compounds

When nonmetals combine with each other, they don't transfer electrons; they share them in covalent bonds and form separate molecules, such as H₂O, CO₂ and NH₃. Molecular compounds are often gases, liquids or soft solids with low melting points.

Rule of thumb: metal + nonmetal (or any compound containing a polyatomic ion such as NH₄⁺) → ionic. Only nonmetals → molecular.

Whiteboard · watch and try

Writing ionic formulas

Press Play to learn the balancing method and the criss-cross shortcut.

5 steps
Press Play and the tutor will talk you through it while writing on the board. Pause any time to write on the board yourself.

Tip: press Pause, then use the pen to work along on the board. Space plays and pauses; Ctrl+Z undoes your last mark.

Try it · interactive

Build an ionic compound

Pick a cation and an anion. The tool adds just enough of each ion to make the charges cancel.

Cation (positive ion)

Anion (negative ion)

Ca2+Cl−Cl−

Charges: 1 × (+2) + 2 × (-1) = 0. The compound is neutral.

CaCl2 · calcium chloride

Shortcut: the size of each ion's charge becomes the other ion's subscript (the criss-cross), then reduce to the smallest whole numbers. Brackets keep a polyatomic ion together when you need more than one.

Loading practice…

Loading practice…

Loading practice…

Check your understanding0 of 5 correct

Question 1

1.What ion does selenium (group 16) usually form?

Question 2

2.What is the formula of magnesium nitride (Mg²⁺ and N³⁻)?

Question 3

3.Which formula is written correctly?

Question 4

4.Which compound is molecular?

Question 5

5.Why is NH₄Cl an ionic compound even though it has no metal?

Key terms

Say the meaning to yourself, then tap a card to check.

Quiz score: 0 of 5

Practice sets mastered: 0 of 3

Tip: answer every quiz question correctly first.

Based on Chemistry: Atoms First 2e by Paul Flowers, Edward J. Neth, William R. Robinson, Klaus Theopold and Richard Langley (OpenStax, Rice University), openstax.org/details/books/chemistry-atoms-first-2e, licensed under CC BY-NC-SA 4.0. Noviq Academy rewrote and reorganized the material in its own words and added its own examples, whiteboard lessons, tools and quizzes; this adapted course is free and shared under the same license. Not endorsed by OpenStax or Rice University. Element data are rounded for learning. Read-aloud and the whiteboard voice use your device's built-in voices, so the voice varies by device.