Potassium hydrogen phthalate (#"KHP"#) has the molecular formula #"C"_8"H"_5"KO"_4# and is known to be a weak acid.
When placed in water, #"KHP"# dissociates completely into the potassium cation #"K"^(+)# and the hydrogen phthalate anion, #"HP^(-)#. After the dissociation takes place, #"HP"^(-)# reacts with water to give the hydronium cation, #"H"_3^(+)"O"#, and the phthalate anion, #"P"^(2-)#. So,
#KHP_((aq)) rightleftharpoons K_((aq))^(+) + HP_((aq))^(-)#, followed by
#HP_((aq))^(-) + H_2O_((l)) rightleftharpoons H_3^(+)O_((aq)) + P_((aq))^(2-)#
The expression for the reaction's equilibrium constant is
#K_(eq) = ([H_3^(+)O] * [P^(2-)])/([HP^(-)] * [H_2O])#
Because the concentration of water is presumed constant and therefore not included in the expression, the equilibrium constant for this reaction is called acid dissociation constant, #"K"_"a"#.
#K_a = ([H_3^(+)O] * [P^(2-)])/([HP^(-)])#
Usually, this acid dissociation constant for a particular reaction will be given to you; in #"KHP"#'s case #"K"_"a"# is equal to
#K_a = 3.9 * 10^(-6)#, which confirms that #"KHP"# is a weak acid.
GIven the above expression, you can solve for #"K"_"a"# by using the equilibrium concentrations of the species involved.