We explore the consequences of introducing a complex conductivity into the quantum Hall effect. This leads naturally to an action of the modular group on the upper-half complex conductivity plane. Assuming that the action of a certain subgroup, compatible with the law of corresponding states, commutes with the renormalization group flow, we derive many properties of both the integer and fractional quantum Hall effects including: universality; the selection rule |p 1q 2 - p 1q 2| = 1 for transitions between quantum Hall states characterized by filling factors v 1 = p 1/q 1 and v 2 = p 2/q 2; critical values of the conductivity tensor; and Farey sequences of transitions. Extra assumptions about the form of the renormalization group flow lead to the semicircle rule for transitions between Hall plateaux.