What are the origins of water hardness?

Origin of water "hardness":

Every household and every factory uses water. One class of impurity that is of special interest is "hardness". This refers to the presence of dissolved ions, mainly of calcium Ca2+ and magnesium Mg2+ which are acquired through contact with rocks and sediments in the environment.

The positive electrical charges of these ions are balanced by the presence of anions (negative ions), of which bicarbonate HCO3- and carbonate CO32- are most important. These ions have their origins in limestone sediments and also from carbon dioxide which is present in all waters exposed to the atmosphere and especially in groundwaters.

Carbon dioxide reacts with water to form:

(1) carbonic acid - which at ordinary environmental pH exists mostly as bicarbonate ion (2). Microscopic marine organisms take this up as carbonate (4) to form calcite skeletons which, over millions of years, have built up extensive limestone deposits. Groundwaters, made slightly acidic by CO2 (both that absorbed from the air and from the respiration of soil bacteria) dissolve the limestone (3), thereby acquiring calcium and bicarbonate ions and becoming "hard". If the HCO3- concentration is sufficiently great, the combination of processes (2) and (4) causes calcium carbonate ("lime scale") to precipitate out on surfaces such as the insides of pipes. (Calcium bicarbonate itself does not form a solid, but always precipitates as CaCO3.)