Weyl introduced as a phase factor an exponential in which the phase α is preceded by the imaginary unit i, e.g., e+iqα(x), in the wave function for the wave equations (for instance, the Dirac equation is (iγμ∂μ − m)ψ = 0). It is here that Weyl correctly formulated gauge theory as a symmetry principle from which electromagnetism could be derived. It had been shown that for a quantum theory of charged particles interacting with the electromagnetic field, invariance under a gauge transformation of the potentials required multiplication of the wave function by the now well-know phase factor. Yang cited Weyl’s gauge theory results as reported by Pauli as a source for Yang-Mills gauge theory; although Yang didn’t find out until much later that these were Weyl’s results. Moreover, Pauli did not explicitly mention Weyl’s geometric interpretation. It was only much after Yang and Mills published their article that Yang realized the connection between their work and geometry. Yang says
What Mills and I were doing in 1954 was generalizing Maxwell’s theory. We knew of no geometrical meaning of Maxwell’s theory, and we were not looking in that direction.
For the wave equations to be gauge invariant, i.e., have the same form after the gauge transformation as before, the local phase transformation ψ(x) → ψ(x)e+iα(x) has to be accompanied by the local gauge transformation
This dictates that the ∂μ in the wave equations be replaced by the covariant derivative ∂μ + iqAμ in order for the ∂μα(x) terms to cancel each other. This pair of phase factor-gauge transformation is not unique. Another pair that retains gauge symmetry and results in the same covariant derivative has the q included in the phase factor, i.e., ψ(x) → ψ(x)e+iqα(x) paired with
The fact that this pairing is not unique is not surprising since a change in the phase factor and gauge transformation have no physical significance.