When sodium carbonate is added to hard water, the calcium and magnesium ions react with the carbonate ions to form insoluble calcium carbonate (CaCO₃) and magnesium carbonate (MgCO₃). These precipitates settle down or can be filtered out, effectively reducing the concentration of hardening ions in the water. The overall reaction with calcium ions is: Ca²⁺(aq) + Na₂CO₃(aq) → CaCO₃(s) + 2Na⁺(aq). The resulting sodium ions (Na⁺) do not contribute to water hardness.