Hard water
Water's hardness is determined by the concentration of multivalent cations in the water. Multivalent cations are positively charged metal complexes with a charge greater than 1+. Usually, the cations have the charge of 2+. Common cations found in hard water include Ca and Mg. These ions enter a water supply by leaching from minerals within an aquifer. Common calcium-containing minerals are calcite and gypsum. A common magnesium mineral is dolomite (which also contains calcium). Rainwater and distilled water are soft, because they contain few ions.
Hardness
In glasses, hardness seems to depend linearly on the number of topological constraints acting between the atoms of the network. Hence, the rigidity theory has allowed predicting hardness values with respect to composition.