Definition and formula for pH