# Why are sodium and potassium displaced from soap by calcium and magnesium ions in hard water?

Sodium and potassium are more reactive than calcium and magnesium still they get displaced. Why?

• Metallic sodium and potassium are reactive not their ions. – Mithoron Nov 15 '16 at 15:10

I have no external justification to point to on this, but I've always thought one aspect contributing to this behavior is the fact that the divalent $\ce{Ca^2+}$ and $\ce{Mg^2+}$ bind two soap fatty acid molecules, whereas $\ce{Na+}$ and $\ce{K+}$ as monovalent ions can only strongly bind one molecule.