Isoelectric pH of colloids?

How did we derive the relation between the isoelectric pH and the dissociation constants for the amino and carboxyl groups on zwitterionic amino acids.

$$pI=\frac {pK_{a1}+pK_{a2}}{2}$$ where $$\ce{NH3^+-R2(COO^{-})<=>NH3^+-R2(COOH)-K_{a1}}$$ $$\ce{NH3^+-R2(COO^{-})<=>NH2-R2(COO^{-})-K_{a2}}$$

For more complicated cases (charged side groups) and their isoelectric pH, here is one site which just posts the equations without any derivation. Besides this, there is no reference I could find for this derivation.

Consider the equilibria in dilute aqueous solution:

$$\ce{H2A+ \rightleftharpoons HA + H+} \ \ \ \ \ \ \ K_{a_1}=\frac{[HA][H^+]}{[H_2A^+]}$$

$$\ce{HA \rightleftharpoons A^- + H+} \ \ \ \ \ \ \ K_{a_2}=\frac{[A^-][H^+]}{[HA]}$$

At the isoelectric point:

$$[H_2A^+]=[A^-]$$

Using the expressions for $K_{a_1}$ and $K_{a_2}$, we find:

$$\frac{{[HA]}[H^+]}{K_{a_1}}=\frac{K_{a_2}[HA]}{[H^+]}$$

$$[H^+]^2 = K_{a_1}K_{a_2}$$

$$pH_{isoelectric}=\frac{pK_{a_1}+pK_{a_2}}{2}$$