Home
Login

Color

Indigo
Red
Green
Teal
Blue
Purple
Rose

Mode

Light
বাং

How sodium and chlorine become table salt: watch an ionic bond form

An ionic bond forms when a metal atom transfers one or more valence electrons completely to a non-metal atom: the metal becomes a positive cation, the non-metal a negative anion, and the electrostatic attraction between these opposite charges — not a shared electron pair — is the bond itself, as when sodium gives chlorine an electron to form NaCl.

Tap the stage to send one electron from the metal to the non-metal

Metal's electronNon-metal's electronElectron in transferElectrostatic attraction
Speed

Controls

Choose a compound

Readings

Metal ion (cation)
Na⁺
Non-metal ion (anion)
Cl⁻
Metal shells (before → after)
2, 8, 1 → 2, 8, 1
Non-metal shells (before → after)
2, 8, 7 → 2, 8, 7
Formula (from charge balance)
NaCl
Net charge of the formula unit
0
Electrons transferred
0 / 1
Right now
An electron is moving across

How to use this simulation

  1. Start with the default pair, NaCl: a sodium atom on the left, a chlorine atom on the right. Notice how many electrons each has in its outermost shell.
  2. Press play or tap the stage directly: one electron flies from sodium to chlorine. Now both outer shells hold 8 electrons (an octet).
  3. Read the charges and the formula in the readings panel: Na⁺, Cl⁻ and NaCl are all computed from charge balance, never typed in.
  4. Pick CaCl₂ or Na₂O from "Choose a compound": now watch two separate electron transfers, one atom giving or receiving twice, or two atoms sharing the job.
  5. Tick "Build the crystal lattice": the same ions line up side by side, showing how every ion is pulled by the opposite-charge ions around it.

Table salt, quicklime, and the electricity inside your own body

The salt you shake onto your food is, chemically, sodium chloride (NaCl). Have you ever wondered how sodium and chlorine end up stuck together inside a single grain? Sodium on its own is a soft, silvery metal you can cut with a knife, and it explodes on contact with water. Chlorine on its own is a toxic, yellow-green gas. Yet put them together and you get the most ordinary ingredient in any kitchen. That transformation is the whole story of ionic bonding.

The quicklime used to whitewash walls, the calcium that keeps your bones strong, the sodium and chloride dissolved in an IV drip — all of it runs on the same principle. Every nerve cell in your body sends its signals by shuffling Na⁺ and K⁺ ions across a membrane. Without ions, no electrical signal would travel through your nervous system, and your heart would not beat.

The question is how a neutral atom turns into a charged ion in the first place, and how the ratio between two ions settles out (why NaCl has one chlorine for every sodium, but CaCl₂ needs two). This page and the simulation above will let you work the answer out for yourself.

Starting from zero: chemical bonds and the octet rule

A chemical bond is the attractive force that holds two or more atoms together. Atoms do not bond at random; they bond because bonding lowers their energy and makes them more stable — the same way a ball rolling downhill settles at the bottom and does not roll back up on its own.

The noble gases (helium, neon, argon…) are the most stable elements known, and every one of them has exactly 8 electrons in its outermost shell (helium is the one exception, with 2, simply because its first shell can only ever hold 2). That observation is the octet rule: atoms lose, gain or share electrons during bonding so that their outer shell ends up looking like a noble gas — 8 electrons, an octet.

There are two ways to reach an octet. One is for electrons to transfer completely from one atom to another — that gives an ionic bond. The other is for two atoms to share a pair of electrons between them — that gives a covalent bond. Which path is taken depends on the two atoms involved: a metal paired with a non-metal usually forms an ionic bond, while two non-metals form a covalent one.

A metal has very few electrons in its outer shell (1, 2 or 3), so giving them up is the easy route — the full shell underneath simply becomes the new outer shell. A non-metal has many outer electrons (5, 6 or 7), so picking up just a few to reach 8 is its easy route. When these two opposite "easy routes" line up, an ionic bond is the natural result.

Key terms in ionic bonding

Get the vocabulary straight before the rules; definition questions in exams come straight from this table.

TermWhat it meansExample
IonAn atom or group of atoms that has become charged by losing or gaining electronsNa⁺, Cl⁻
CationA positive ion, formed by losing electronsNa+1, Mg+2
AnionA negative ion, formed by gaining electronsCl−1, O−2
Ionic bondThe electrostatic attraction between oppositely charged ionsNaCl
Octet ruleAn atom is most stable with 8 electrons in its outer shellNa⁺'s 2, 8
Valence electronsAn atom's outermost electrons, the ones that take part in bondingNa's 1
ElectronegativityAn atom's pull on the electrons in a bondCl high, Na low
Net charge of a formula unitThe sum of all ionic charges in a compound, always zeroNaCl: 1(+1) + 1(−1) = 0

Why a metal–non-metal pair forms an ionic bond

The electronegativity gap between a metal and a non-metal is usually large. Electronegativity measures how hard an atom pulls the electrons in a bond towards itself. Chlorine pulls far harder than sodium does, so instead of being shared, the electron moves across completely. Whenever that gap is large enough — which is the normal case for a metal paired with a non-metal — the electron transfers outright rather than being shared.

The energetics work out in the metal's and non-metal's favour too. Pulling an electron off a metal costs a little energy (its ionisation energy); a non-metal accepting an electron releases a little energy (its electron affinity). These two steps alone do not always balance neatly, but once the oppositely charged ions come close together, the huge amount of electrostatic energy released — the lattice energy — is what makes the whole process worthwhile. At a more advanced level, this full energy account is tracked step by step with a Born–Haber cycle.

So an ionic bond is really the sum of three steps, not one: the metal loses an electron, the non-metal gains it, and then the oppositely charged ions are pulled together and locked in place. The simulation shows the first two steps as an electron flying across; the third step is what the crystal-lattice toggle is for.

Deriving the formula: charge balance (the criss-cross rule)

How many metal atoms and how many non-metal atoms a formula needs comes down to one condition: the compound's total charge must be zero. That is called charge balance. The shortcut for doing it quickly is the criss-cross rule — each ion's charge (ignoring its sign) becomes the other ion's subscript.

cation charge × cation count + anion charge × anion count = 0the charge-balance condition

cation count = |anion charge| ÷ gcd, anion count = |cation charge| ÷ gcdthe criss-cross rule, simplified by their gcd

Worked case 1 (gcd = 1): CaCl₂

The calcium ion is Ca+2, the chloride ion Cl−1. The gcd of 2 and 1 is 1, so calcium needs |Cl's charge| ÷ 1 = 1 atom, chlorine needs |Ca's charge| ÷ 1 = 2 atoms.

Check: 1 × (+2) + 2 × (−1) = 0. The formula is CaCl₂.

Worked case 2 (the gcd cancels): MgO

The magnesium ion is Mg+2, the oxide ion O−2. Both charges are the same size (2 and 2), so criss-crossing gives 2 and 2, which must then be divided by their gcd of 2 to reach 1 : 1. The formula is MgO, not MgO₂.

This cancelling step is exactly where most mistakes happen: writing down the crossed subscripts without simplifying them.

Try it yourself in the simulation

Predict each result before you press play, then check.

  • With NaCl open, tap the stage once: only one electron flies across, and both atoms complete their octet in a single step.
  • Switch to CaCl₂: watch one calcium atom send electrons to two separate chlorine atoms, one electron each.
  • Switch to Na₂O and notice the reverse: two separate sodium atoms each send an electron to the one oxygen atom.
  • After any compound finishes transferring, check "Net charge of the formula unit" in the readings panel — it is always zero.
  • Tick "Build the crystal lattice": the pair nearest the centre pulses, marking the attraction the dashed lines represent; in reality every ion is pulled by every opposite-charge neighbour around it.

Solved problems

Each solution first writes the shell configuration, then works out how many electrons move, then applies charge balance.

Problem 1: NaCl (the simulation's default pair)

Na (Z = 11) has shells 2, 8, 1, with 1 outer electron. Cl (Z = 17) has shells 2, 8, 7, with 7 outer electrons. Na gives away its one electron to become 2, 8 (Na+1); Cl accepts it to become 2, 8, 8 (Cl−1).

Charge balance: 1 × (+1) + 1 × (−1) = 0, so the formula is NaCl.

Problem 2: MgO

Mg's shells 2, 8, 2 become 2, 8 after giving up 2 electrons (Mg+2). O's shells 2, 6 become 2, 8 after gaining 2 electrons (O−2).

Both charges are the same size, so the ratio is 1:1 and the formula is MgO.

Problem 3: CaCl₂

Ca's shells 2, 8, 8, 2 become 2, 8, 8 after giving up 2 electrons (Ca+2). A single Ca atom's 2 electrons are needed to complete the octets of two separate Cl atoms, each of which only accepts 1.

So Ca : Cl = 1 : 2, giving CaCl₂. Check: 1(+2) + 2(−1) = 0.

Problem 4: MgCl₂

Mg+2 and Cl−1 — the arithmetic mirrors CaCl₂ exactly, only the metal has changed. Mg : Cl = 1 : 2, giving MgCl₂.

Calcium and magnesium both have 2 outer electrons, which is why both form the same 1 : 2 ratio with chlorine.

Problem 5: Na₂O

O−2 needs 2 electrons to complete its octet, but any one Na atom can only supply 1 (Na+1). Two separate Na atoms are therefore needed, one electron each, 2 in total.

Na : O = 2 : 1, giving Na₂O. Check: 2(+1) + 1(−2) = 0.

Problem 6: KBr

K's shells 2, 8, 8, 1 become 2, 8, 8 after giving up 1 electron (K+1). Br's shells 2, 8, 18, 7 become 2, 8, 18, 8 after gaining 1 electron (Br−1).

Both charges are size 1, so the ratio is 1:1 and the formula is KBr. Bromine's third shell (M) is full at 18 electrons, yet the octet rule only ever looks at the outermost shell.

Problem 7 (beyond the six presets): aluminium oxide, when a charge is bigger than 2

Aluminium has 3 outer electrons, so its ion is Al+3. Oxygen's ion is O−2. gcd(3, 2) = 1, so criss-crossing directly gives 2 aluminium atoms and 3 oxygen atoms.

The formula is Al₂O₃. Even with a 3+ charge involved, exactly the same rule applies — only the numbers grow.

Six ionic compounds, side by side

Lining up the arithmetic from the seven problems above shows a pattern: the bigger a metal’s charge, the more non-metal atoms it can take to balance it, and whenever both charges are the same size the ratio always settles at 1:1.

CompoundFormula (computed)Metal ionNon-metal ionRatio (metal : non-metal)
Sodium chlorideNaClNa⁺Cl⁻1 : 1
Magnesium oxideMgOMg²⁺O²⁻1 : 1
Calcium chlorideCaCl₂Ca²⁺Cl⁻1 : 2
Magnesium chlorideMgCl₂Mg²⁺Cl⁻1 : 2
Sodium oxideNa₂ONa⁺O²⁻2 : 1
Potassium bromideKBrK⁺Br⁻1 : 1

Physical properties of ionic compounds

The way ionic bonds form explains the familiar properties of ionic compounds. Every ion in the lattice is surrounded on every side by oppositely charged ions, and because that attraction pulls from every direction, the bonding is very strong.

PropertyWhy
Very high melting and boiling pointsBreaking every attraction throughout the lattice at once takes a lot of thermal energy (NaCl melts at about 801°C)
Do not conduct electricity as solidsIons are locked into fixed positions in the lattice and cannot move freely
Conduct electricity when molten or dissolved in waterThe ions are then free to move and can carry charge
Brittle — they shatter rather than bendA blow shifts one row of ions so that same-charge ions face each other; the repulsion splits the crystal
Many dissolve readily in polar solvents such as waterWater molecules behave like tiny ions themselves and pull the lattice apart, ion by ion

The crystal lattice: every ion pulled from every side

The story does not end with one Na⁺ and one Cl⁻. In a real grain of salt, enormous numbers of Na⁺ and Cl⁻ ions are packed in a repeating pattern, each Na⁺ surrounded by six Cl⁻ ions and each Cl⁻ by six Na⁺ ions — a three-dimensional repeating structure called a crystal lattice. The lattice view in the simulation is a simplified 2-D slice of that idea: opposite-charge ions side by side, pulling on each other.

In reality, NaCl's lattice is cubic (the rock-salt structure), while CaCl₂ or Na₂O pack into different shapes altogether, because the ions' sizes and ratios differ. The simulation's 2-D checkerboard is not meant to be an exact picture of any one compound's real geometry — it is showing the general rule every ionic compound follows: oppositely charged ions always attract each other from every side.

That all-round pull is exactly why ionic compounds are simultaneously hard and brittle: breaking the bonding takes a lot of energy (hence the high melting point), yet nudging one row of ions out of place brings same-charge ions face to face, and the repulsion shatters the whole crystal.

Common mistakes

Avoiding these keeps both the definitions and the formula-writing questions from losing marks.

  • Writing that ionic bonds "share" electrons. Sharing happens in covalent bonds; in an ionic bond the electron transfers completely, from one atom to another.
  • Forgetting to simplify a crossed formula. Mg²⁺ and O²⁻ criss-crossed directly give Mg₂O₂, which is wrong; dividing both by 2 gives the correct MgO.
  • Mixing up cation and anion. A memory trick: a caTion is posiTive (both have a 't'); an anion is negative.
  • Assuming every metal–non-metal pair is 1:1. The ratio depends on both charges, which is why CaCl₂ is 1:2 while NaCl is 1:1.
  • Forgetting that the octet rule has exceptions (hydrogen's full shell holds 2 electrons, not 8) — though none of these six compounds happens to hit that exception.
  • Calling an ionic compound a "molecule". NaCl is not a single molecule; it is an unbroken lattice of countless ions, so "formula unit" is the correct term.

Ionic compounds in everyday life

Ionic bonding is not only an exam topic — it sits behind plenty of ordinary things, from the kitchen to a construction site.

  • Table salt (NaCl): essential in cooking, and just as essential for carrying nerve signals in the body.
  • Quicklime and cement (CaO, Ca(OH)₂): used to whitewash walls, correct soil acidity, and in construction.
  • Magnesium oxide (MgO): its very high melting point makes it the standard lining material for industrial furnaces.
  • Magnesium chloride (MgCl₂): used to de-ice roads in cold climates, and in making tofu.
  • Potassium bromide (KBr): once used in medicine, and still used in the windows of infrared spectroscopy instruments.
  • Inside your body: dissolved Na⁺, K⁺, Ca²⁺ and Cl⁻ ions in blood and cells drive nerve signalling, muscle contraction and your heartbeat.

Exam tips

Ionic bonding shows up in nearly every general-chemistry course and standardised test. Definition questions want the exact phrase "complete transfer of electrons"; application questions want you to work from an electron configuration to a charge to a formula, in that order.

A worked exam-style question

Question: Element X has atomic number 12, element Y has atomic number 8. They react to form a white solid compound.

(a) Define an ionic bond. (b) State the octet rule. (c) Using electron configurations, show how X and Y become ions. (d) "The compound formed by X and Y has a higher melting point than NaCl" — justify this statement.

Answer to (c): X (Mg) goes from 2, 8, 2 to 2, 8 by losing 2 electrons (Mg+2); Y (O) goes from 2, 6 to 2, 8 by gaining 2 electrons (O−2); the formula is MgO. Answer to (d): both ions in MgO carry a charge of 2, so the attraction — and hence the melting point — is stronger than in NaCl, where both charges are only 1.

Revision: the one-screen summary

The night before an exam, this list plus the formula table above is all you need to revisit.

  • Ionic bond: a metal transfers its valence electrons completely to a non-metal, so both reach an octet of 8 outer electrons.
  • A metal loses electrons → cation (positive); a non-metal gains electrons → anion (negative).
  • Charge balance (criss-cross rule): a formula's ratio comes from the two ions' charges, simplified by their gcd.
  • Six worked formulas: NaCl, MgO, CaCl₂, MgCl₂, Na₂O, KBr.
  • Ionic compounds: high melting point, non-conducting as solids but conducting when molten or dissolved, brittle.
  • Countless ions pack into a three-dimensional crystal lattice, each ion pulled by every opposite-charge neighbour around it.

Frequently asked questions

What is an ionic bond?

An ionic bond is the electrostatic attraction between a positive ion (cation) and a negative ion (anion), formed when a metal atom transfers one or more valence electrons completely to a non-metal atom.

What's the difference between an ionic bond and a covalent bond?

In an ionic bond electrons transfer completely, usually from a metal to a non-metal; in a covalent bond two non-metal atoms share a pair of electrons instead. Ionic compounds are typically solids with high melting points, while covalent compounds are often liquids or gases with lower melting points.

How does sodium chloride (NaCl) form?

Sodium (Na) gives its one outer electron to chlorine (Cl). This produces Na+1 (shells 2, 8) and Cl−1 (shells 2, 8, 8), both now holding a full octet. The attraction between these opposite charges is what forms NaCl.

How do you know how many atoms a compound's formula needs?

By charge balance: each ion's charge (ignoring its sign) becomes the other ion's subscript, and any common factor between the two subscripts is then cancelled — for example MgO's crossed 2 and 2 simplify down to 1 and 1.

What is the octet rule?

Atoms lose, gain or share electrons during bonding so that their outermost shell ends up with 8 electrons, matching the stable arrangement found in noble gases. This drive towards a full octet is what powers both ionic and covalent bonding.

Why does CaCl₂ need two chlorine atoms for every calcium atom?

Calcium loses two electrons to become Ca+2, but each chlorine atom can only accept one electron (Cl−1). Taking calcium's two electrons therefore needs two separate chlorine atoms, giving the formula CaCl₂.

What's the difference between a cation and an anion?

A cation is a positive ion formed by losing electrons (such as Na⁺ or Mg²⁺), usually from a metal. An anion is a negative ion formed by gaining electrons (such as Cl⁻ or O²⁻), usually from a non-metal.

Why do ionic compounds not conduct electricity as solids?

In a solid, every ion is locked into a fixed position within the crystal lattice and cannot move. Conducting electricity requires charged particles to move freely, which is why an ionic compound only conducts once it is melted or dissolved in water.

Does forming an ionic bond always move just one electron?

No. The number of electrons that move depends on how many outer electrons the metal has. Sodium gives only 1, but magnesium and calcium each give 2 (Mg+2, Ca+2), and aluminium gives 3.

Keep studying this topic

The animation made the idea click; now turn it into marks. Syllabus, suggestions, textbooks and admission-test guides are below.

More chemistry animations

Grade 8–11

Structure of the atom

Structure of the atom explained with an interactive simulation: protons, neutrons, electrons, atomic and mass number, isotopes and electron configuration, with solved examples.

Grade 8–11

Acids, Bases and the pH Scale

What is pH and what does the pH scale show? Drip a base into an acid, watch the indicator change colour and trace a live titration curve, with worked pH problems.

Grade 9–11

Electron configuration

How to write electron configurations: Aufbau order, Pauli and Hund rules, the Cr and Cu exceptions, ions and noble-gas shorthand. Watch electrons fill, Z 1–36.

Grade 9–11

Gas laws: Boyle, Charles, Gay-Lussac, Avogadro and PV = nRT

Push a piston and heat a gas: Boyle's, Charles's, Gay-Lussac's and Avogadro's laws, the ideal gas law PV = nRT, graphs, R values and solved problems.

Grade 9–12

Electrolysis and Faraday’s Laws

What is electrolysis, what forms at the cathode and anode, and how does Faraday's law compute the mass deposited? Choose molten NaCl, CuSO2 or acidified water and watch, with worked examples.

Grade 9–12

Covalent Bond

What is a covalent bond? Build H₂O, NH₃, CH₄ and CO₂ atom by atom in a dot-and-cross simulation: single, double and triple bonds, lone pairs, the octet rule and bond polarity, with worked examples.

Grade 9–11

Periodic Trends

What are periodic trends? See how atomic radius, ionization energy, electronegativity and metallic character change across a period and down a group, on a heat map of the first 36 elements, with the real exceptions.

Animations in other subjects