In chemistry, a divalent (or more correctly bivalent) ion or molecule has a valence of two and thus can form two bonds with other ions or molecules. Divalent anions are atoms or radicals with two additional electrons when compared to their elemental state (that is, with 2 more electrons than protons). For instance, S2– is the sulfide anion.
A divalent cation is missing two electrons as compared with the neutral atom. For instance, iron(II) or Fe2+ is the divalent cationic form of iron. Divalent cations are present in abundance in hard water, for example, calcium (Ca2+) and magnesium (Mg2+). These ionic minerals in solution are what contribute to the properties of water which cause it to be hard, such as the formation of limescale.