Skip to main content
Chemistry LibreTexts

3.1: Ionic and Molecular Compounds

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Learning Objectives
    • Define ionic and molecular (covalent) compounds
    • Predict the type of compound formed from elements based on their location within the periodic table
    • Determine formulas for simple ionic compounds

    The nature of the attractive forces that hold atoms or ions together within a compound is the basis for classifying chemical bonding. When electrons are transferred and ions form, ionic bonds result. Ionic bonds are electrostatic forces of attraction, that is, the attractive forces experienced between objects of opposite electrical charge (in this case, cations and anions). When electrons are “shared” and molecules form, covalent bonds result. Covalent bonds are the attractive forces between the positively charged nuclei of the bonded atoms and one or more pairs of electrons that are located between the atoms. Compounds are classified as ionic or molecular (covalent) on the basis of the bonds present in them.

    Ionic compounds and Ionic Bond

    When an element composed of atoms that readily lose electrons (a metal) reacts with an element composed of atoms that readily gain electrons (a nonmetal), a transfer of electrons usually occurs, producing ions. The compound formed by this transfer is stabilized by the electrostatic attractions (ionic bonds) between the ions of opposite charge present in the compound. For example, when each sodium atom in a sample of sodium metal (group 1) gives up one electron to form a sodium cation, Na+, and each chlorine atom in a sample of chlorine gas (group 17) accepts one electron to form a chloride anion, Cl, the resulting compound, NaCl, is composed of sodium ions and chloride ions in the ratio of one Na+ ion for each Cl ion. Similarly, each calcium atom (group 2) can give up two electrons and transfer one to each of two chlorine atoms to form CaCl2, which is composed of Ca2+ and Cl ions in the ratio of one Ca2+ ion to two Cl ions.

    A compound that contains ions and is held together by ionic bonds is called an ionic compound. The periodic table can help us recognize many of the compounds that are ionic: When a metal is combined with one or more nonmetals, the compound is usually ionic. This guideline works well for predicting ionic compound formation for most of the compounds typically encountered in an introductory chemistry course. However, it is not always true (for example, aluminum chloride, AlCl3, is not ionic).

    You can often recognize ionic compounds because of their properties. Ionic compounds are solids that typically melt at high temperatures and boil at even higher temperatures. For example, sodium chloride melts at 801 °C and boils at 1413 °C. (As a comparison, the molecular compound water melts at 0 °C and boils at 100 °C.) In solid form, an ionic compound is not electrically conductive because its ions are unable to flow (“electricity” is the flow of charged particles). When molten, however, it can conduct electricity because its ions are able to move freely through the liquid (Figure \(\PageIndex{1}\)).

    This figure shows three photos connected by right-facing arrows. The first shows a light bulb as part of a complex lab equipment setup. The light bulb is not lit. The second photo shows a substances being heated or set on fire. The third shows the light bulb again which is lit.
    Figure \(\PageIndex{1}\): Sodium chloride melts at 801 °C and conducts electricity when molten. (credit: modification of work by Mark Blaser and Matt Evans)

    In every ionic compound, the total number of positive charges of the cations equals the total number of negative charges of the anions. Thus, ionic compounds are electrically neutral overall, even though they contain positive and negative ions. We can use this observation to help us write the formula of an ionic compound. The formula of an ionic compound must have a ratio of ions such that the numbers of positive and negative charges are equal.

    Example \(\PageIndex{1}\): Predicting the Formula of an Ionic Compound

    The gemstone sapphire (Figure \(\PageIndex{2}\)) is mostly a compound of aluminum and oxygen that contains aluminum cations, Al3+, and oxygen anions, O2−. What is the formula of this compound?

    This is a photograph of a ring with a sapphire set in it.
    Figure \(\PageIndex{2}\): Although pure aluminum oxide is colorless, trace amounts of iron and titanium give blue sapphire its characteristic color. (credit: modification of work by Stanislav Doronenko)

    Solution Because the ionic compound must be electrically neutral, it must have the same number of positive and negative charges. Two aluminum ions, each with a charge of 3+, would give us six positive charges, and three oxide ions, each with a charge of 2−, would give us six negative charges. The formula would be Al2O3.

    Exercise \(\PageIndex{1}\)

    Predict the formula of the ionic compound formed between the sodium cation, Na+, and the sulfide anion, S2−.



    Many ionic compounds contain polyatomic ions (will be covered in later section) as the cation, the anion, or both. As with simple ionic compounds, these compounds must also be electrically neutral, so their formulas can be predicted by treating the polyatomic ions as discrete units. We use parentheses in a formula to indicate a group of atoms that behave as a unit. For example, the formula for calcium phosphate, one of the minerals in our bones, is Ca3(PO4)2. This formula indicates that there are three calcium ions (Ca2+) for every two phosphate \(\left(\ce{PO4^{3-}}\right)\) groups. The \(\ce{PO4^{3-}}\) groups are discrete units, each consisting of one phosphorus atom and four oxygen atoms, and having an overall charge of 3−. The compound is electrically neutral, and its formula shows a total count of three Ca, two P, and eight O atoms.

    Example \(\PageIndex{2}\): Predicting the Formula of a Compound with a Polyatomic Anion

    Baking powder contains calcium dihydrogen phosphate, an ionic compound composed of the ions Ca2+ and \(\ce{H2PO4-}\). What is the formula of this compound?


    The positive and negative charges must balance, and this ionic compound must be electrically neutral. Thus, we must have two negative charges to balance the 2+ charge of the calcium ion. This requires a ratio of one Ca2+ ion to two \(\ce{H2PO4-}\) ions. We designate this by enclosing the formula for the dihydrogen phosphate ion in parentheses and adding a subscript 2. The formula is Ca(H2PO4)2.

    Exercise \(\PageIndex{2}\)

    Predict the formula of the ionic compound formed between the lithium ion and the peroxide ion, \(\ce{O2^2-}\) (Hint: Use the periodic table to predict the sign and the charge on the lithium ion.)



    Because an ionic compound is not made up of single, discrete molecules, it may not be properly symbolized using a molecular formula. Instead, ionic compounds must be symbolized by a formula indicating the relative numbers of its constituent ions. For compounds containing only monatomic ions (such as NaCl) and for many compounds containing polyatomic ions (such as CaSO4), these formulas are just the empirical formulas introduced earlier in this chapter. However, the formulas for some ionic compounds containing polyatomic ions are not empirical formulas. For example, the ionic compound sodium oxalate is comprised of Na+ and \(\ce{C2O4^2-}\) ions combined in a 2:1 ratio, and its formula is written as Na2C2O4. The subscripts in this formula are not the smallest-possible whole numbers, as each can be divided by 2 to yield the empirical formula, NaCO2. This is not the accepted formula for sodium oxalate, however, as it does not accurately represent the compound’s polyatomic anion, \(\ce{C2O4^2-}\)

    Molecular Compounds and Covalent Bond

    Many compounds do not contain ions but instead consist solely of discrete, neutral molecules. These molecular compounds (covalent compounds) result when atoms share, rather than transfer (gain or lose), electrons. Covalent bonding is an important and extensive concept in chemistry, and it will be treated in considerable detail in a later chapter of this text. We can often identify molecular compounds on the basis of their physical properties. Under normal conditions, molecular compounds often exist as gases, low-boiling liquids, and low-melting solids, although many important exceptions exist.

    Whereas ionic compounds are usually formed when a metal and a nonmetal combine, covalent compounds are usually formed by a combination of nonmetals. Thus, the periodic table can help us recognize many of the compounds that are covalent. While we can use the positions of a compound’s elements in the periodic table to predict whether it is ionic or covalent at this point in our study of chemistry, you should be aware that this is a very simplistic approach that does not account for a number of interesting exceptions. Shades of gray exist between ionic and molecular compounds, and you’ll learn more about those later.

    Example \(\PageIndex{1}\): Predicting the Type of Bonding in Compounds

    Predict whether the following compounds are ionic or molecular:

    1. KI, the compound used as a source of iodine in table salt
    2. H2O2, the bleach and disinfectant hydrogen peroxide
    3. CHCl3, the anesthetic chloroform
    4. Li2CO3, a source of lithium in antidepressants


    1. Potassium (group 1) is a metal, and iodine (group 17) is a nonmetal; KI is predicted to be ionic.
    2. Hydrogen (group 1) is a nonmetal, and oxygen (group 16) is a nonmetal; H2O2 is predicted to be molecular.
    3. Carbon (group 14) is a nonmetal, hydrogen (group 1) is a nonmetal, and chlorine (group 17) is a nonmetal; CHCl3 is predicted to be molecular.
    4. Lithium (group 1) is a metal, and carbonate is a polyatomic ion; Li2CO3 is predicted to be ionic.
    Exercise \(\PageIndex{1}\)

    Using the periodic table, predict whether the following compounds are ionic or covalent:

    1. SO2
    2. CaF2
    3. N2H4
    4. Al2(SO4)3
    Answer a


    Answer b


    Answer c


    Answer d



    Compounds that contain ions are called ionic compounds. Ionic compounds generally form from metals and nonmetals. Compounds that do not contain ions, but instead consist of atoms bonded tightly together in molecules (uncharged groups of atoms that behave as a single unit), are called covalent compounds. Covalent compounds usually form from two or more nonmetals.


    covalent bond
    attractive force between the nuclei of a molecule’s atoms and pairs of electrons between the atoms
    covalent compound
    (also, molecular compound) composed of molecules formed by atoms of two or more different elements
    ionic bond
    electrostatic forces of attraction between the oppositely charged ions of an ionic compound
    ionic compound
    compound composed of cations and anions combined in ratios, yielding an electrically neutral substance
    molecular compound
    (also, covalent compound) composed of molecules formed by atoms of two or more different elements
    Contributors and Attributions

    3.1: Ionic and Molecular Compounds is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?