A sparingly soluble salt having general formula Axp+Byq- and molar solubility S is in equilibrium with its saturated solution. Derive a relationship between the solubility and solubility product for such salt.

A sparingly soluble salt having general formula Axp+Byq-. Its molar solubility is S mol L-1.
Then, Axp+Byq-xAp+x(aq)+yBq-y(aq)
S moles of AxBy dissolve to give x moles of Ap+ and y moles of Bq-
Therefore, solubility product (Ksp)=[Ap+]x[Bq-]y
=[xS]x[yS]y
=xxyy Sx+y