# Is the Dirac action invariant under $U(1)$ local gauge transformations?

I have usually found in books/lectures that the Dirac theory, given by

$$S=\int d^4x\bar\psi(i\gamma^\mu\partial_\mu-m)\psi,$$ is invariant under $$U(1)$$ global transformations (which is evident) but not invariant under $$U(1)$$ local (gauge) transformations, due to an extra term appearing in the Lagrangian of the form

$$\mathcal{L}\rightarrow\mathcal{L}’=\mathcal{L}-(\partial_\mu\theta)\bar{\psi}\gamma^\mu\psi.$$

Nevertheless, if one integrates this Lagrangian to obtain the new action, you find when integrating by parts that this extra term vanishes.

$$\int d^4x (\partial_\mu\theta)\bar\psi\gamma^\mu\psi=-\int d^4x \theta \partial_\mu(\bar\psi\gamma^\mu\psi)=0,$$ since $$\partial_\mu(\bar\psi\gamma^\mu\psi)=\partial_\mu\bar\psi\gamma^\mu\psi-im\bar\psi\psi=i(\partial_\mu\bar\psi\gamma^\mu\psi+m\bar\psi\psi)=0,$$ where I used the Dirac equation both for $$\psi$$ and for $$\bar\psi$$. So one concludes $$S=S’$$. Is then the Dirac theory invariant to gauge transformation with no need of introducing the covariant derivative?

• Thank you! I see... One thing that that I just realised is that the eoms that I am imposing are obtained from $S$ but not from $S'$. So let's assume that one is interested in on-shell invariance: is it legit to impose the Dirac equation, shouldn't one impose the new equations of motion which would have an extra term proportional to $\partial_\mu\theta$? Sep 4, 2022 at 14:44
• @TopoLynch $\theta$ isn't a field, but a parameter in the transformation. So it does not have an associated equation of motion (nor should it appear in the equations of motion). Sep 4, 2022 at 17:07
• @TopoLynch Right, so you're finding different Lagrangians related by a $U(1)$ gauge transformation give you different equations of motion, because the Lagrangian isn't gauge invariant. That's not surprising and the solution is to work with a gauge invariant Lagrangian. Sep 4, 2022 at 23:41
• But, when applying the E-L. equations to the transformed Lagrangain, i.e. $\mathcal{L}’=\bar\psi(i\gamma^\mu\partial_\mu-m)\psi-(\partial\mu\theta)\bar\psi\gamma^\mu\psi$, varying w.r.t. $\bar\psi$, one obtains $(i\gamma^\mu\partial_\mu-m-\gamma^\mu(\partial_\mu\theta))\psi$, which is not the original Dirac equation (due to de extra term) and thus is not the equations that I imposed to cancel the extra term when integrating in the action. Am I mistaken? Sep 4, 2022 at 23:48