The ordinary derivatives commute, so only the symmetric part of γμγν contributes. Requiring this operator to factor the Klein-Gordon equation, (∂μ∂μ+m2)ψ=0, for arbitrary free momenta gives
The gradient of the local phase is exactly cancelled by the potential transformation. Since U is scalar in spinorspace and commutes with the Dirac matrices,
Consequently a solution is mapped into a solution: the minimally coupled Dirac equation is covariant under the local U(1) gauge symmetry. The operator and wavefunction both transform; ordinary differentiation of the transformed wavefunction alone would leave an extra phase-gradient term.