In chemistry, divalent anions are atoms or radicals with 2 additional electrons when compared to their elemental state (that is, with 2 more electrons than protons); for instance, S-- is the sulfide anion. Conversely, a cation is missing some electrons as compared with the neutral atom. Example: iron(II) or Fe++ is the divalent cationic form of iron. The terminology arises because in solutions or arc discharges, cations are attracted to the cathode and anions to the anode.
Divalent cations are present in abundance in hard water; for example, Ca++ and Mg++. These ionic minerals in solution are what contribute to the properties of water which cause it to be hard, such as the formation of scale.