# Equilibrium constant expression for an acid base reaction

While reading an organic chemistry textbook I saw the following Formula for calculating equilibrium constant of an acid-base reaction

Consider following acid base reaction in which $$\ce{HA}$$(reactant acid) and $$\ce{HB+}$$(product acid) are acids in forward and backward reaction respectively.

$$\ce{HA + B <=> A- + HB+}$$

$$\mathrm pK_\mathrm{eq}= \mathrm pK_\mathrm {a_\mathrm{reactant}}-\mathrm pK_\mathrm {a_\mathrm{product}}$$

$$\implies K_\mathrm{eq}=\frac{K_\mathrm{a_\mathrm{reactant}}}{K_\mathrm{a_\mathrm{product}}}$$

Now I want to show above expression is equivalent to $$K_\mathrm{eq}=\frac{\ce{[A-][HB+]}}{\ce{[HA][B]}}$$

So I have to write expressions of $$K_\mathrm{a}$$ of both acids to proceed further.

The way $$K_\mathrm {a}$$ is defined in my textbook is like this

$$\ce {HA + H2O <=> A- + H3O+}$$

$$K_\mathrm {a}= \frac{\ce{[H3O+][A-]}}{\ce{[HA]}}$$

So In our acid base reaction we should write expressions of $$K_\mathrm {a}$$ of acids in a similar way as we have no other option left.

$$\ce{HA + H2O <=> A- + H3O+}\tag{1}$$

$$\ce{HB+ + H2O <=> B + H3O+}\tag{2}$$

The above 2 equations I have written are for defining $$K_\mathrm{a}$$ of acids ($$\ce{HA}$$ and $$\ce{HB+}$$).

They are not related to our main acid-base reaction in any way.

As people are pointing out in the comments, concentration of $$\ce{H3O+}$$ should be same in expressions of $$K_\mathrm a$$ as they are in the same solution but I have already pointed out that equation 1 and 2 are written only for the sake of defining $$K_\mathrm a$$ of acids.

They are altogether different from our main acid base reaction. Then the concentration of $$\ce{H3O+}$$ can be different in equations 1 and 2 as they are two different solutions for determining $$K_\mathrm a$$

$$K_\mathrm {a}$$ of $$\ce{HA}$$ which is the reactant is $$K_\mathrm a = \frac{\ce{[A-][H3O+]}}{\ce{[HA]}}$$

$$K_\mathrm {a}$$ of $$\ce{HB+}$$ which is the acid being produced is $$K_\mathrm b = \frac{\ce{[B][H3O+]}}{[\ce{HB+}]}$$

On substituting respective $$K_{a}$$ into the obtained expression we get:

$$K_\mathrm {eq}=\frac{\ce{[A-][HB+]}}{\ce{[HA][B]}}$$

But during this process of substitution we are required to cancel $$\ce{[H3O+}$$ term in numerator and denominator

My question is:

How can we cancel the term of concentration of $$\ce{H3O+}$$ as concentration of protonated water in expression of $$K_\mathrm {a}$$ of reactant and product can be different?

The issue as I can see it here is a simple misunderstanding that can rectified:

$$K_\mathrm a$$ is a constant even if $$\ce{[A]}$$ is not. (which is how it was defined)

The definition of $$k_\mathrm a$$ is as follows:

$$K_\mathrm a$$ , the acid ionization constant, is the equilibrium constant for chemical reactions involving weak acids in aqueous solution.

Nowhere does this definition state that the concentration taken for water has to be constant, in fact, only $$K_\mathrm a$$ is constant.

Once we find the value of $$K_\mathrm a$$, the value cannot change for a given temperature. This means that no matter what solution you add the acid to - in the end, the value of $$K_\mathrm a$$ remains constant. i.e:

$$K_\mathrm a = \frac{\ce{[A-][H3O+]}}{\ce{[HA]}} \tag{constant}$$

Now, in your solution, the value of $$\ce{H3O+}$$ may not be the same as in the place where we determined the $$K_\mathrm a$$ in the beginning but that only means that are $$K_\mathrm a$$ (which is still constant) is the same ratio but with different numbers.

Now, as to the reason why $$\ce{[H3O+]}$$ can be cancelled. Imagine you take a glass of water and add two acids $$\ce{HA}$$ and $$\ce{HB}$$.

What is the concentration of protonated water when we try to find the $$K_\mathrm a$$ of these acids in this solution, we get:

$$K_{\mathrm a_\mathrm A} = \frac{\ce{[A-][H3O+]}}{\ce{[HA]}} \tag{1}\label{1}$$

$$K_{\mathrm a_\mathrm B} = \frac{\ce{[B-][H3O+]}}{\ce{[HB]}} \tag{2}\label{2}$$

Now what is $$\ce{[H3O+]}$$ in ($$\ref{1}$$) and ($$\ref{2}$$)?

They will be the same since you are measuring the $$K_\mathrm a$$s in the same glass of water.

Therefore you can cancel $$\ce{[H3O+]}$$ out since the value is same for the one glass of water that you have.