use the dissociation constant ka=[H+][A-]/[HA] to show that ph=pka

pH = pKa ONLY when (A^-)/(HA) = 1

Ka = (H^+)(A^-)/(HA). Rearrange to
(H^+) = Ka*(HA)/(A^-).
When (HA) = (A^-) then (HA)/(A^-) = 1 and
(H^+) = Ka*1 or Ka.
Take the negative log of both sides.
-log(H^+) = -logKa
-log(H^+) = pH and -logKa = pKa
pH = pKa BUT that is true only when (HA) = (A^-)