This useful relationship can be derived starting with Kw:
Kw = [H3O+]e[OH–]e = 1.0×10–14
Taking the log of both sides gives
log([H3O+]e[OH–]e) = log(1.0×10–14) = –14.00
Using the property of logs that the log of a product is the sum of the logs of the multipliers gives
log([H3O+]e) + log([OH–]e) = –14.00
Multiplying both sides by –1 gives
–log([H3O+]e) + –log([OH–]e) = 14.00
Using the definitions of pH ( = –log[H3O+]e ) and pOH ( = –log[OH–]e ) gives
pH + pOH = 14.00
This relationship is only true at 25 °C because the value of Kw changes at all other temperatures. The 14.00 really should be written as –logKw = pKw, so a more general relationship is
pH + pOH = pKw
which is true at all temperatures.