Short answer

  • An ionic compound is a chemical compound made of ions, which are atoms or groups of atoms carrying an electric charge, held together by ionic bonds. An ionic bond is the electrostatic attraction between oppositely charged ions.
  • A cation is a positive ion, formed when an atom loses one or more electrons. An anion is a negative ion, formed when an atom gains one or more electrons.
  • Ionic compounds usually form when a metal reacts with a nonmetal. The metal loses electrons easily, the nonmetal gains them readily, and both move toward a full outer shell of electrons.
  • An ionic compound is electrically neutral overall. The total positive charge from its cations exactly balances the total negative charge from its anions, and its formula shows the simplest ratio of ions that achieves that balance.
  • An ionic compound is not a molecule. It is a large, ordered, three dimensional crystal lattice of ions, and its formula is a formula unit, not a molecular formula.
  • Ionic solids tend to be hard, brittle, and high melting, and they do not conduct electricity as solids. They conduct when molten or dissolved in water, because then their ions can move freely and carry charge.

Introduction

Table salt looks unremarkable. It is white, crystalline, and familiar from every kitchen. Yet the substance in the shaker is nothing like the elements it came from. Sodium metal reacts violently with water, and chlorine gas is corrosive and poisonous. Combined, they form sodium chloride, a stable solid that dissolves quietly in water and seasons food. The transformation is the whole subject of this article.

An ionic compound is what forms when atoms stop being neutral and start carrying charge. One atom gives up electrons and becomes positive. Another gains electrons and becomes negative. Opposite charges attract, and that attraction organizes huge numbers of ions into a regular, repeating solid. This article explains that process step by step: what an ion is, how electron transfer creates ions, why the result is a lattice rather than a molecule, how to read and write ionic formulas, how to name ionic compounds, and why ionic compounds behave the way they do, with high melting points, brittleness, and conductivity that appears only when the ions are free to move.

What an Ionic Compound Is

OpenStax states the definition plainly: compounds composed of ions are called ionic compounds, held together by ionic bonds, electrostatic forces of attraction between oppositely charged cations and anions. The University of Calgary chemistry textbook gives the same definition: a compound that contains ions and is held together by ionic bonds is called an ionic compound.

Three words do most of the work. First, ions: an atom, or a group of atoms, with unequal protons and electrons, carrying a net electric charge. Second, electrostatic attraction: the bond is not a shared pair of electrons or a physical hook, but the ordinary attraction between positive and negative charge, acting between every ion and its neighbors. Third, compound: the ions form a single chemical substance with properties different from its starting elements, as sodium chloride shows against sodium and chlorine.

Keep two terms separate. An ionic bond is the attraction itself. An ionic compound is the whole substance built from ions held together by that attraction. Chemists also often call ionic compounds salts, but salt in this technical sense does not mean only table salt: calcium carbonate, magnesium sulfate, and potassium nitrate are salts too.

How Ions Form: Losing and Gaining Electrons

A neutral atom has equal numbers of protons and electrons, so its charges cancel. An ion forms when that balance changes because electrons are gained or lost. Protons stay in the nucleus during ordinary chemical change; only electrons move.

A cation forms when a neutral atom loses electrons from its valence shell, its outermost shell, leaving more protons than electrons, so the net charge is positive. Remember that a cation is positive because the letter t in cation looks like a plus sign.

An anion forms when a neutral atom gains electrons in its valence shell, leaving more electrons than protons, so the net charge is negative. Anion begins with a, a reminder of addition.

Why would an atom lose or gain electrons at all? The short answer is stability. Atoms tend toward a full valence shell, most often the electron arrangement of a noble gas, with eight valence electrons in its outer shell (two electrons for helium). OpenStax describes this as atoms gaining or losing electrons to form ions with particularly stable electron configurations. Chlorine, one electron short of a full shell, can reach a full shell by gaining one electron. Sodium, with one electron in its outer shell, can reach the full shell underneath by losing that electron. The strong attraction between the resulting ions more than repays the cost of those steps in the finished solid.

Metals and nonmetals differ in how easily they make these changes, which is why ionic bonding is typical of metal plus nonmetal combinations. OpenStax notes that many metallic elements have relatively low ionization energies and lose electrons easily, lying to the left in a period or near the bottom of a group, while nonmetal atoms have relatively high electron affinities, readily gain electrons, and sit in the upper right of the periodic table.

Electron Transfer, Step by Step: Sodium Chloride

The classic example is sodium chloride, because every step is visible in the electron counts. Sodium has one electron in its outer shell; chlorine has seven and needs one more for a full shell of eight.

First, sodium loses its single outer electron, becoming Na+, with a charge of 1+, and an electron arrangement matching neon. Next, chlorine gains that electron, becoming Cl-, with a charge of 1-, and an arrangement matching argon. Finally, the oppositely charged ions attract each other, and that attraction is the ionic bond.

Two cautions keep this picture honest. First, real sodium chloride forms from bulk sodium metal and chlorine gas, or from solutions and reactions, where many atoms are involved at once. The one atom picture is a bookkeeping model showing where electrons go, not a photograph of a single event. Second, electron transfer alone does not explain stability. Stability comes from the whole lattice described below, not from one pair of ions: the single pair picture explains the charges, and the lattice explains the substance.

More Than One Electron: Magnesium Oxide, Calcium Chloride, and Aluminum Oxide

Sodium chloride is a one to one case, and it can give the false impression that ionic compounds always pair one cation with one anion. They do not. The ratio depends on the charges, and working through a few more examples shows the rule.

Magnesium, a group 2 metal with two valence electrons, loses both to form Mg2+. Oxygen, with six valence electrons, gains two to form O2-. One magnesium cation balances one oxide anion exactly, so magnesium oxide is MgO, with both ions reaching the electron arrangement of neon.

Calcium chloride shows a one to two ratio. Calcium loses two electrons to form Ca2+, while chlorine gains only one to form Cl-, so one calcium cation needs two chloride anions to balance it, giving CaCl2, exactly as the University of Calgary textbook presents it. The subscript 2 belongs to chlorine only, not to calcium.

Aluminum oxide shows a two to three ratio. Aluminum forms Al3+ and oxygen forms O2-, so two aluminum cations (six positive charges) and three oxide anions (six negative charges) balance, giving Al2O3. OpenStax works through the same arithmetic: two times 3+ plus three times 2- equals zero. To test any unfamiliar formula, multiply each charge by its subscript and confirm the total is zero.

Transition metals add one complication: many can form more than one cation. Iron, for example, can form Fe2+ and Fe3+, so the compound formed depends on which iron ion is present, and the name must say which one, as the naming section explains. Main group metals are more predictable: group 1 metals normally form 1+ ions, group 2 metals normally form 2+ ions, and aluminum normally forms a 3+ ion, because those charges correspond to losing all valence electrons and reaching the noble gas arrangement underneath.

The Crystal Lattice: Why There Is No Sodium Chloride Molecule

Here is the most important conceptual step in this article, and the one students most often miss. Sodium chloride is not made of NaCl molecules. No single pair of one sodium ion and one chloride ion belongs together as a unit inside the solid. Instead, the ions arrange themselves into a tightly bound, three dimensional lattice, a regular repeating pattern extending in all directions.

OpenStax explains why: attractive forces act equally in all directions, so each ion is equally attracted to all nearby ions of opposite charge. In sodium chloride, each ion is bonded to six surrounding ions of the opposite charge, as the OpenStax lattice diagram shows, and the pattern repeats until the crystal ends.

This arrangement maximizes attractions between oppositely charged ions, which are close together, and minimizes repulsions between ions of the same charge, which are kept farther apart. Breaking it apart takes a great deal of energy. OpenStax gives one measure: it requires 769 kilojoules of energy to dissociate one mole of solid sodium chloride into separate gaseous sodium and chloride ions. That figure is for complete separation into isolated gaseous ions, not for melting, but it conveys the scale of the forces holding the lattice together.

Because the solid is a continuous lattice, the formula NaCl cannot mean one molecule. Chemists call it a formula unit: the simplest ratio of ions needed to give equal positive and negative charges. NaCl means sodium and chloride ions in a one to one ratio; CaCl2 means calcium and chloride ions in a one to two ratio. A formula unit is a ratio, not a discrete particle that can be picked out of the crystal.

Writing Formulas: The Charge Balance Rule

Every ionic formula can be checked, and most can be built, with one rule: the total positive charge must equal the total negative charge. OpenStax states it as a requirement for all substances, and the University of Calgary textbook states it the same way: in every ionic compound, the total number of positive charges of the cations equals the total number of negative charges of the anions.

The method is straightforward. Write the cation and anion with their charges, find the smallest numbers of each that balance the charges, and use those numbers as subscripts, except that a subscript of one is never written: NaCl, not Na1Cl1. Finally, check by multiplying charges by subscripts and confirming the total is zero.

A worked example makes the method concrete. For sodium cations, Na+, and sulfide anions, S2-, one sodium ion is not enough, because one sulfide anion carries two negative charges. Two sodium ions give two positive charges, balancing one sulfide ion, so the formula is Na2S, the answer the University of Calgary textbook gives for this check.

The sapphire case from the same textbook reinforces the method. Sapphire is mostly aluminum oxide, containing Al3+ and O2- ions. Two aluminum ions give six positive charges, and three oxide ions give six negative charges, so the formula is Al2O3. The formula was derived from the charges, not guessed from the name.

One common error is to carry the charges into the formula as subscripts without swapping them correctly. The reliable shortcut is the crisscross method: the magnitude of the cation charge becomes the subscript of the anion, and the magnitude of the anion charge becomes the subscript of the cation, then reduce to the smallest whole numbers. Calcium, Ca2+, with oxygen, O2-, gives Ca2O2 by crisscross, which reduces to CaO. Skipping the reduction step gives a formula that is technically balanced but wrong as a formula unit, because a formula unit must show the simplest ratio.

Polyatomic Ions: Charged Groups That Behave as Units

Not every ion is a single atom. A polyatomic ion is a group of atoms bonded together that carries an overall electric charge and behaves as a single unit in ionic compounds. The name means many atoms, and the point is that the group stays together when the compound forms, dissolves, or reacts.

The University of Calgary textbook gives calcium phosphate as the central example. Calcium phosphate is one of the minerals in bones, and its formula is Ca3(PO4)2. The phosphate ion, PO4, carries a charge of 3- and consists of one phosphorus atom and four oxygen atoms. Three calcium ions, each Ca2+, give six positive charges. Two phosphate ions, each 3-, give six negative charges. The parentheses in the formula are essential: they show that the subscript 2 applies to the whole phosphate group, not just to oxygen. Without parentheses, Ca3PO42 would be ambiguous and wrong.

Other polyatomic ions appear constantly: ammonium, NH4+, a polyatomic cation with a charge of 1+; hydroxide, OH-, and nitrate, NO3-, each with a charge of 1-; and sulfate, SO4, and carbonate, CO3, each with a charge of 2-. Sodium bicarbonate, baking soda, is NaHCO3, and calcium carbonate, the main component of limestone and chalk, is CaCO3.

Formulas with polyatomic ions follow the same rule, with one extra step: treat each polyatomic ion as a single unit, and if more than one unit is needed, enclose the group in parentheses with the subscript outside. Baking powder contains calcium dihydrogen phosphate, Ca2+ with H2PO4-, so one calcium ion needs two dihydrogen phosphate ions, giving Ca(H2PO4)2.

Naming Ionic Compounds

Ionic names are built from the ions, cation first, then anion, and a name can usually be turned back into a formula. For a simple binary compound, a compound of just two elements, the metal keeps its element name and the nonmetal name is changed to end in ide: sodium chloride, calcium oxide, magnesium sulfide. The ide ending signals an anion formed from a single element.

When a metal can form more than one cation, the name must specify the charge, using Roman numerals in parentheses after the metal name. Iron(II) chloride is FeCl2, containing Fe2+, while iron(III) chloride is FeCl3, containing Fe3+. The Roman numeral is the charge on the cation, not the number of atoms and not the subscript. Older names such as ferrous and ferric chloride are still seen, but the Roman numeral system is the standard modern form.

Polyatomic ions keep their own names, and the ide rule does not apply to them: sodium hydroxide is NaOH, calcium nitrate is Ca(NO3)2, and ammonium chloride is NH4Cl. Charge balance still determines the subscripts, so calcium phosphate must be Ca3(PO4)2, as shown above.

One naming trap deserves attention. The prefixes mono, di, and tri, which appear in covalent names such as carbon dioxide, are not used for ordinary ionic compounds. Calcium chloride is CaCl2, not calcium dichloride, because its subscript follows from charge balance and needs no prefix.

Properties of Ionic Compounds, and the Reasons Behind Them

Ionic compounds share a recognizable set of properties, all following from the lattice picture. OpenStax summarizes them: ionic solids are crystalline, rigid, and brittle, with high melting and boiling points suggesting very strong ionic bonds; they are poor conductors as solids, and excellent conductors once dissolved or melted, because then the ions can move freely.

PropertyTypical behaviorReason, in lattice terms
Physical state at room temperatureSolid, crystallineStrong attractions hold ions in a fixed lattice
Melting and boiling pointsHighMuch energy is needed to overcome lattice attractions
HardnessHard and rigidIons are locked in place by strong attractions
BrittlenessBreaks or shatters rather than bendingA shift aligns like charges, which repel and crack the crystal
Electrical conductivity as a solidPoor, essentially noneIons are fixed in place and cannot carry charge
Electrical conductivity when molten or dissolvedGoodIons are free to move and carry charge
Solubility in waterMany dissolve readily, but not allPolar water molecules can surround and separate ions, when that interaction outweighs lattice strength

High melting and boiling points. Melting an ionic solid means giving its ions enough energy to escape their fixed positions in the lattice. Because the attractions are strong and act in all directions, that takes a great deal of heat, and sodium chloride remains solid far above the boiling point of water. Stronger attractions mean higher melting points. Higher charges attract more strongly, and smaller ions can approach each other more closely, which also strengthens attraction. A compound of 2+ and 2- ions therefore generally melts higher than a comparable compound of 1+ and 1- ions. Melting points vary widely, but they are high compared with most covalent substances because the forces being overcome are full attractions between charged particles, not weaker attractions between neutral molecules.

Hardness and brittleness. Ionic solids are hard because their ions are held firmly in place, so scratching or denting the surface requires moving ions against strong attractions. They are brittle for a subtler reason. If a blow shifts one layer of the lattice slightly, ions that sat next to oppositely charged neighbors suddenly sit next to ions of the same charge. Like charges repel, pushing the layers apart, so the crystal cracks rather than bending. A metal can bend because its bonding electrons are delocalized and its atoms can slide without creating aligned repulsions.

Electrical conductivity: the on and off switch. Electricity here is the flow of charged particles. In a solid ionic compound, the charged particles exist but cannot move, because they are locked in the lattice, so no current flows. Melt the compound, and the lattice collapses into a liquid of mobile ions. Dissolve it in water, and water molecules surround the ions and carry them apart. In either case, a voltage can drive positive ions one way and negative ions the other way, which is a current. This on and off behavior is diagnostic: a substance that conducts only when molten or dissolved, and not as a solid, is very likely ionic.

Solubility in water. Most ionic solids dissolve readily in water, as OpenStax notes, because water is a polar molecule, with a slightly positive end and a slightly negative end. The positive ends attract anions, the negative ends attract cations, and these attractions can pull ions out of the lattice one by one. Whether a compound dissolves well depends on a competition between lattice attractions holding ions together and ion to water attractions pulling them apart. When lattice attractions are unusually strong, the compound dissolves poorly. Calcium carbonate, for example, is only sparingly soluble, which is why limestone persists and seashells do not dissolve in the sea. Many ionic compounds are soluble, but not every one is, and solubility is a matter of degree.

Recognizing an Ionic Compound, and the Exceptions

The quickest recognition rule is the one the University of Calgary textbook offers: when a metal is combined with one or more nonmetals, the compound is usually ionic. Sodium chloride, calcium chloride, magnesium oxide, and potassium bromide all fit it, as do metal compounds with polyatomic groups, such as sodium nitrate and calcium carbonate, because they still consist of cations and anions.

The textbook immediately adds the necessary warning: the rule is not always true. Its example is aluminum chloride, AlCl3, which is not ionic despite combining a metal with a nonmetal. Aluminum chloride has substantial covalent character, and in some conditions it exists as discrete molecules rather than as a lattice of ions. The broader lesson is that ionic and covalent bonding are ends of a continuum, not two sealed boxes. When the electronegativity difference is very large, transfer describes the bonding well; when it is smaller, sharing describes it better, even if a metal is involved. Check properties, such as conductivity when molten and melting behavior, rather than trusting the formula alone.

Two further distinctions prevent errors. An ionic compound is not one isolated ionic bond: a single pair of ions has an attraction, but the compound is the whole lattice, and its properties come from the lattice. And dissolving is not the same as melting: dissolving separates ions with solvent molecules, melting separates them with heat alone, but both give mobile ions, which is why both the melt and the solution conduct while the solid does not.

Common Examples in Everyday Life

Ionic compounds are not confined to the laboratory. Sodium chloride is table salt, used in cooking and food preservation, and dissolved sodium and chloride ions are essential in body fluids. Calcium carbonate forms limestone, chalk, and marble, and it is the main mineral in seashells and eggshells. Calcium phosphate is a major mineral in bones and teeth, which is why the University of Calgary textbook uses it as its polyatomic example. Sodium bicarbonate, baking soda, is used in cooking and cleaning, magnesium sulfate is sold as Epsom salt, and calcium chloride is spread on roads in winter because it dissolves and lowers the freezing point of the resulting solution.

Common Mistakes to Avoid

Several mistakes recur often enough to name directly. First, do not call NaCl a molecule: a molecule is a discrete group of atoms with a definite number of atoms, while an ionic formula is a ratio, not a molecule count. Second, do not copy charges as subscripts without balancing them: Ca2+ and O2- give CaO, not Ca2O2, because the formula unit must show the simplest ratio. Third, do not assume every ionic compound dissolves well in water; calcium carbonate dissolves only slightly. Fourth, do not assume a solid ionic compound conducts because it contains ions; the ions must be able to move, and in a solid they cannot. Fifth, do not use covalent prefixes such as di and tri in ionic names.

Frequently Asked Questions

What is an ionic compound in simple terms?

An ionic compound is a solid made of positive and negative ions held together by opposite charge attraction. It forms when atoms transfer electrons, usually from a metal to a nonmetal, and the ions pack into a repeating crystal lattice. Table salt is the simplest example.

How is an ionic compound different from a molecule?

A molecule is a small, discrete group of atoms with a fixed number of atoms, such as two hydrogen atoms and one oxygen atom in water. An ionic compound has no discrete molecule: it is a continuous lattice, and its formula shows only the ratio of ions, repeated throughout the crystal.

Why do ionic compounds have high melting points?

Because melting requires breaking the strong electrostatic attractions holding the lattice together. Each ion is attracted to several neighbors of opposite charge, so much heat is needed before ions can leave their fixed positions and flow as a liquid. Higher charges or smaller ions generally mean still higher melting points.

Why do ionic compounds conduct electricity when dissolved but not as solids?

Electric current is the movement of charged particles. In a solid ionic compound, ions are locked in the lattice and cannot move, so no current flows. When the compound melts or dissolves, ions become free to move, and a voltage drives positive ions one way and negative ions the other, which is a current.

Are all ionic compounds soluble in water?

No. Many dissolve readily, because polar water molecules surround and separate their ions. Some dissolve only slightly: calcium carbonate is sparingly soluble, which is why limestone and seashells persist in water. Solubility depends on whether ion to water attractions can overcome attractions within the lattice.

Is table salt the only ionic compound called a salt?

No. In chemistry, salt is a general term for an ionic compound, not only for table salt. Calcium carbonate, magnesium sulfate, and sodium bicarbonate are all salts in this technical sense; table salt is one particular salt among many.

How do you work out the formula of an ionic compound?

Write the cation and anion with their charges, then find the smallest numbers of each that balance total positive against total negative charge. Those numbers are the subscripts, except that one is never written. Ca2+ with Cl- gives CaCl2; Al3+ with O2- gives Al2O3. Always check that the charges add to zero.

What is the difference between an ionic compound and a covalent compound?

In an ionic compound, electrons are transferred, ions form, and the substance is a lattice with high melting points and conductivity only when molten or dissolved. In a covalent compound, electrons are shared, the substance consists of neutral molecules, and it usually has lower melting points and does not conduct. The two types are ends of a continuum, but the lattice versus molecule distinction captures the main difference.

Sources & references

  • OpenStax, Chemistry (Atoms First), section 4.1, Ionic Bonding, via Chemistry LibreTexts: the definition of ionic compounds as compounds composed of ions held together by ionic bonds, cations formed by losing valence electrons and anions formed by gaining them, ionic solids as crystalline, rigid, and brittle with high melting and boiling points, poor conductivity as solids and excellent conductivity when dissolved or melted, the formula as the simplest ratio of ions giving equal positive and negative charges, the aluminum oxide example Al2O3, the statement that a sodium chloride formula does not represent a single molecule because attractions act in all directions into a three dimensional lattice, each ion in sodium chloride bonded to six surrounding ions of opposite charge, and the figure of 769 kilojoules to dissociate one mole of solid sodium chloride into separate gaseous ions.
  • University of Calgary Chemistry Textbook, Ionic Compounds: the definition of an ionic compound as a compound containing ions held together by ionic bonds, sodium chloride formed from sodium cations and chloride anions in a one to one ratio, calcium chloride as Ca2+ and Cl- in a one to two ratio, the metal plus nonmetal guideline with aluminum chloride, AlCl3, as the stated exception, the rule that total positive charge equals total negative charge in every ionic compound, polyatomic ions treated as discrete units with parentheses, calcium phosphate Ca3(PO4)2 as the worked example, calcium dihydrogen phosphate Ca(H2PO4)2 as the further example, and sodium sulfide Na2S as the check answer for Na+ and S2-.

Emma Hudson

Editor of Amberaisle — clear, thoughtful explainers for curious readers. More about the editor →