Does solubility product dictate predominant precipitate from the solution with several ionic compounds?

While removing temporary hardness through boiling, magnesium bicarbonate will give $$\ce{Mg(OH)2}.$$ $$\ce{Mg(OH)2}$$ predominates over $$\ce{MgCO3}$$ as the solubility product $$K_\mathrm{sp}$$ of $$\ce{Mg(OH)2}$$ is higher compared to that of $$\ce{MgCO3}$$.

When a compound is dissolved where it is possible to precipitate two different salts, will the one with the lower $$K_\mathrm{sp}$$ form a precipitate?

• You can precipitate selectively, when the Ksp of one compound is exceeded and the other one is not; howver, when both Ksp are exceeded, both will precipitate and it will be a matter of kinetics which precipitates first. Commented Apr 12 at 14:19
• the related Q/A is probably this Is Mg(OH)2 more insoluble than MgCO3? Commented Apr 12 at 14:53
• Yes, thank you! Commented Apr 15 at 11:12

According to this table, calcium hydroxide $$\ce{Ca(OH)2}$$ has a solubility product constant of $$5.5×10^{-6}$$ and calcium sulfate $$\ce{CaSO4}$$ has a solubility product constant of $$9.1×10^{-6}$$. Now suppose that a soluble calcium salt such as calcium chloride is dissolved into a medium containing $$0.01$$ molar hydroxide ions and $$0.001$$ molar sulfate ions. The calcium ion concentration required to precipitate each of the salts given above is calculated:
$$\ce{Ca(OH)2}: \dfrac{5.5×10^{-6}}{0.01^2}=0.055$$ molar
$$\ce{CaSO4}: \dfrac{9.1×10^{-6}}{0.001}=0.0091$$ molar