And we know that water undergoes the autoprolysis reaction:
#2H_2OrightleftharpoonsH_3O^+ +HO^-#, we can write,
#K_w=[H_3O^+][HO^-]=10^-14#, under standard conditions. Note that #H_3O^+# and #H^+# can be used fairly interchangeably. The actual species is possibly a cluster of water molecules with AN extra #H^+# associated with it; the proton can tunnel across clusters to give the observed ionic mobility. Likewise, #HO^-#, is a cluster of water molecules with ONE less #H^+#; of course we may isolate actual salts of #HO^-#.
And given #K_w=[H_3O^+][HO^-]=10^-14#, we can take #log_10# of both sides; we remember the definition of the logarithmic function:
#log_(10)0.1=log_(10)10^-1=-1; log_(10)1=log_(10)10^0=0;log_(10)10=+1;log_(10)100=2;.........................................................# and #log_(10)1000=log_(10)10^3=3.#
And so #log_10K_w=log_10([H_3O^+][HO^-])#
#log_10(10^-14)=log_10[H_3O^+]+log_10[HO^-]#,
i.e. #-14=log_10[H_3O^+]+log_10[HO^-]#, multiply each side by #-1#, and thus we get......
#14=underbrace(-log_10[H_3O^+])_(pH)-underbrace(log_10[HO^-])_(pOH)#,
And thus our defining relationship, the goal of all the previous rigmarole:
#pH+pOH=14#
You will not have to derive this function, but you will use it. Equivalently, in aqueous solution, #pK_a+pK_b=14#.