An ionic compound is a chemical compound composed of ions held together by electrostatic forces. Ionic compounds are formed when a metal reacts with a non-metal. The metal loses electrons to the non-metal, resulting in the formation of positively charged ions (cations) and negatively charged ions (anions). The cations and anions are then attracted to each other by electrostatic forces, forming an ionic bond.
Of the molecules shown in the equations, only NaCl is an ionic compound. NaCl is composed of sodium ions (Na+) and chloride ions (Cl-). The sodium ions are formed when sodium atoms lose an electron, while the chloride ions are formed when chlorine atoms gain an electron. The sodium ions and chloride ions are then attracted to each other by electrostatic forces, forming an ionic bond.