The relationship between ammonia and pH is as follows: Ammonia exists in two forms in water: un-ionized ammonia (NH3+) and ionized ammonium (NH4+). The ratio between these two forms is determined by the water's pH level. At higher pH levels (more alkaline conditions), more ammonia exists in the toxic un-ionized form (NH3), which can easily injure fish. Conversely, at lower pH levels (more acidic conditions), ammonium (NH4+) predominates, which is less toxic to fish. So if you think you have detectable ammonia in your tank and the pH is increasing, that is a problem.