General Chemistry I · Atoms, Molecules & Ions

Molecules, Ions, and Chemical Formulas

5 min read
Want it in plain words first? Jump to Eli explains — the same idea, no jargon.
On this page 7 sections
  1. In 30 seconds
  2. Why this matters
  3. The college version
  4. Eli explains
  5. Key takeaway
  6. Study tools
  7. Sources & references

In 30 seconds

Atoms combine in two fundamentally different ways. Molecular compounds form when nonmetal atoms share electrons, producing discrete units called molecules (e.g., H₂O, CO₂). Ionic compounds form when electrons are transferred from a metal to a nonmetal, creating charged particles — cations (positive, from electron loss) and anions (negative, from electron gain) — held together by electrostatic attraction. A chemical formula is the shorthand that reports which elements are present and in what ratio; it comes in two varieties: the empirical formula (simplest whole-number ratio) and the molecular formula (the actual number of each atom in one molecule).

Why this matters

Formulas are the language of chemistry — they encode composition, which is what stoichiometry, reactions, and synthesis all depend on. Knowing whether a substance is molecular or ionic tells you its bonding, its properties (ionic compounds are often brittle solids with high melting points; molecular compounds often have lower melting points), and how to name it. The empirical-vs-molecular distinction is essential in organic chemistry and biochemistry, where the same empirical formula (CH₂O) can describe formaldehyde, glucose, or a host of sugars.

The college version

Key Ideas

  • Molecule: two or more atoms held together by covalent (shared-electron) bonds; the smallest unit of a molecular compound that retains its identity.
  • Ion: an atom or group of atoms with a net electric charge.
  • Cation: positively charged ion (metal atoms lose electrons; e.g., Na⁺, Ca²⁺, Al³⁺).
  • Anion: negatively charged ion (nonmetals gain electrons; e.g., Cl⁻, O²⁻, S²⁻).
  • Polyatomic ion: a charged group of covalently bonded atoms acting as one unit (e.g., SO₄²⁻ sulfate, NO₃⁻ nitrate, NH₄⁺ ammonium, OH⁻ hydroxide, CO₃²⁻ carbonate, PO₄³⁻ phosphate).
  • Empirical formula: simplest whole-number ratio of atoms (H₂O₂ → HO; C₆H₁₂O₆ → CH₂O).
  • Molecular formula: actual count of atoms per molecule (H₂O₂, C₆H₁₂O₆).
  • Diatomic elements: H₂, N₂, O₂, F₂, Cl₂, Br₂, I₂ — these seven exist as two-atom molecules in their elemental state (memory aid: "H N O F Cl Br I" — the "super-seven").

Equations and Variables

Converting molecular formula ↔ empirical formula:

molecular formula = (empirical formula) × n, where n = (molar mass of molecule) / (molar mass of empirical formula unit)

Variables:

  • n = a small whole-number multiplier (dimensionless)
  • molar mass of molecule = mass of one mole of the actual molecule (g/mol)
  • molar mass of empirical formula unit = mass of one mole of the empirical formula (g/mol)

Ion charges obey charge balance: in a neutral ionic compound, total positive charge = total negative charge.

How It Works or Problem-Solving Method

Determining an empirical formula from mass-percent data:

  1. Assume a 100.0 g sample, so each % becomes grams.
  2. Convert grams of each element to moles (divide by atomic mass).
  3. Divide all mole values by the smallest mole value.
  4. If needed, multiply all ratios by a small integer to clear fractions (e.g., 1.5 → ×2 → 3).
  5. Write the formula with those subscripts.

Writing a correct ionic formula: swap the charges as subscripts (criss-cross), then reduce to the lowest ratio, keeping the formula electrically neutral — e.g., Al³⁺ and O²⁻ → Al₂O₃.

Worked Example

Problem 1: A compound is 40.0% carbon, 6.71% hydrogen, and 53.3% oxygen by mass. Find its empirical formula. Its molar mass is 180 g/mol; find the molecular formula.

Assume 100 g → 40.0 g C, 6.71 g H, 53.3 g O.

Moles: C = 40.0/12.01 = 3.33 mol; H = 6.71/1.008 = 6.66 mol; O = 53.3/16.00 = 3.33 mol.

Divide by smallest (3.33): C = 1, H = 2, O = 1 → empirical formula CH₂O.

Empirical-formula mass = 12.01 + 2(1.008) + 16.00 = 30.03 g/mol.

n = 180/30.03 = 6 → molecular formula = (CH₂O)₆ = C₆H₁₂O₆ (glucose).

Problem 2: Write the formula for the ionic compound formed from calcium and chlorine.

Ca is Group 2 → Ca²⁺; Cl is Group 17 → Cl⁻. Criss-cross charges: Ca²⁺ + 2 Cl⁻ → CaCl₂ (one Ca²⁺ balances two Cl⁻).

Problem 3: Name the cation and anion in ammonium sulfate, (NH₄)₂SO₄.

Cation: NH₄⁺ (ammonium, polyatomic). Anion: SO₄²⁻ (sulfate, polyatomic). Two NH₄⁺ ions balance one SO₄²⁻ charge.

Common Confusions

  • "The empirical and molecular formulas are always the same." Wrong — they match only when the molecule's atom ratio is already at its simplest (e.g., H₂O); H₂O₂ has molecular H₂O₂ but empirical HO.
  • "A polyatomic ion is a molecule." Wrong — a polyatomic ion (like SO₄²⁻) carries a net charge; a molecule is neutral.
  • "All elements exist as single atoms." Wrong — seven nonmetals exist as diatomic molecules (H₂, N₂, O₂, F₂, Cl₂, Br₂, I₂) in their standard state.
  • "To balance a chemical equation you change subscripts." Wrong — subscripts define the substance's identity; you balance equations by changing coefficients (the numbers in front), never subscripts.
Eli, the EliExplains learning guide

Eli explains

The same idea, in plain words

Explain it like I’m 10

A molecule is like two friends holding hands to stay together — they share, so no one ends up owning more. An ionic compound is more like one kid giving a candy to another: now one is happy-and-positive (cation) and the other is a bit negative (anion), and they stick together because opposites attract. The "empirical formula" is the recipe reduced to its simplest terms — "2 cups flour, 1 cup sugar" instead of "4 cups flour, 2 cups sugar" — same ratio, but the "molecular formula" tells you the real, full amount in one actual batch. Limit of the analogy: hand-holding and candy-sharing are reversible social choices, but chemical bonds involve real energy changes, and ions are attracted by electrostatic force, not by "wanting" anything.

Key takeaways

  • Molecules share electrons (covalent); ionic compounds transfer electrons.
  • Cation = positive (metal loses e⁻); anion = negative (nonmetal gains e⁻).
  • Common polyatomic ions: NH₄⁺, OH⁻, NO₃⁻, CO₃²⁻, SO₄²⁻, PO₄³⁻.
  • Empirical formula = simplest ratio; molecular formula = actual atom count.
  • molecular = empirical × n; n = (molar mass)/(empirical-formula mass).
  • Seven diatomic elements: H₂, N₂, O₂, F₂, Cl₂, Br₂, I₂.
  • Ionic formulas must be electrically neutral overall.
  • Molecular compound: nonmetals share electrons → molecules.
  • Ionic compound: metal transfers e⁻ to nonmetal → cations + anions.
  • Cation (+, lost e⁻); anion (−, gained e⁻).
  • Polyatomic ions: NH₄⁺, OH⁻, NO₃⁻, SO₄²⁻, CO₃²⁻, PO₄³⁻.
  • Empirical = simplest ratio; molecular = actual; molecular = empirical × n.
  • Diatomic elements: H₂, N₂, O₂, F₂, Cl₂, Br₂, I₂.
  • Balance equations with coefficients, never subscripts.

Keep learning

Ready to build on this? Continue to the next lesson.

Practice General Chemistry I

This lesson has no separate scored set. Practice draws from the subject’s question bank.

Study tools & related lessonsYou’ll learn to · Related

You’ll learn to

  • Distinguish molecules from ions and molecular compounds from ionic compounds.
  • Define cation and anion and predict their formation from electron gain/loss.
  • Recognize common polyatomic ions and write their formulas.
  • Distinguish empirical formulas from molecular formulas and convert between them.
  • List the seven elements that exist as diatomic molecules in nature.

Sources & references

  1. OpenStax, *Chemistry 2e*, Ch. 2.4, "Chemical Formulas."
  2. OpenStax, *Chemistry 2e*, Ch. 2.6, "Molecular and Ionic Compounds."

This lesson was adapted from the open educational references above; their licenses and attributions are preserved. See Copyright & Licensing.

Educational content only. It is not medical, legal or professional advice. Found an error? Tell us.