Ionic compounds consist of two or more charged particles called ions. The ions are oppositely charged and are held together (in the solid phase) by electrostatic attraction. Positively charged ions are called cations and negatively charged ions are called anions. Ionic compounds are important for a variety of reasons. They conduct electricity when dissolved in water and serve as electrolytes for batteries. They may bind tightly to other charged particles, for example in environmental samples or in the human body. They are often colorful when burned, and so find applications to fireworks, flares, and lighting. The list goes on!
One nice way to gain familiarity and exposure to ionic compounds is to study the system of nomenclature used to assign unique names to them. Converting from a molecular formula to a name will help you learn how to communicate the identity of substances clearly in words—a very important problem as the diversity and complexity of known substances continues to increase! Doing the reverse, converting a name to a formula, will help you become familiar with the charges of commonly encountered ions. With practice, you'll be able to flawlessly convert from a name to a reasonable, descriptive molecular formula. That's our goal!
Binary ionic compounds contain two different types of ions (although the actual number of particles in the compound may be greater than two). These compounds are named by placing the name of the cation first, followed by the name of the anion. The cation's name commonly ends in -ium; note that many of the metallic elements, on the left-hand side of the periodic table, have names that end in -ium. Many metals can assume more than one formal charge in compounds; for these metals, we must specify the oxidation state of the metal center (a fancy way of saying the metal's formal charge) using a roman numeral after the name of the metal.
Consider, for example, SnCl2. The symbol "Sn" corresponds to the element tin, which may have either a +2 or +4 charge in ionic compounds (for a list of oxidation states available to the elements, consult a periodic table or see here). Tin is the metal in this compound and so serves as its cation; hence, we start the name off with "tin." The cation is usually listed first in the formula too, to keep things simple. The symbol "Cl" corresponds to the element chlorine, which serves as the anion in SnCl2. The name "chlorine" refers to a neutral Cl atom, so how do we denote the anion? Anions are often, but not always, indicated with the suffix -ide. A Cl ion with a charge of –1 has the name "chloride." Tacking that on to the end leaves us with "tin chloride"; however, we aren't done yet! For the compound to be neutral overall, as it must be, tin must assume a charge of +2. We need to indicate that in the name, since tin could assume a charge of +4 (SnCl4 is another compound entirely). So, the full name of SnCl2 is "tin(II) chloride," where the "(II)" indicates a formal charge of +2 on the tin atom.
To work in reverse, consider the compound ammonium sulfate. "Ammonium" is a polyatomic ion with the formula NH4+. "Sulfate" is a polyatomic anion with the formula SO42–. To combine these species into a neutral ionic compound, we need two ammonium ions for every sulfate ion. The proper formula here, then, is (NH4)2(SO4). The parentheses around SO4 are optional, but I like to use them to show that the sulfur and oxygen atoms are bound covalently to one another but not to the atoms of the ammonium cation.