# Gauge invariance of a Lagrangian

How do I check whether or not the Lagrangian is a gauge invariant? A Lagrangian is $$\mathcal{L} = -\frac{1}{4} F_{\mu \nu} F^{\mu \nu} + \frac{1}{2}m^2A_\mu A^\mu$$

• Can you be more specific? What is your definition of "gauge invariant" and what problems do you encounter in checking whether it applies to your Lagrangian or not? The gauge invariance of the Lagrangian of a massive vector field is also discussed in this recent question May 6, 2021 at 22:51

You perform a gauge transformation, $$A'_{\mu}=A_{\mu}+\partial_{\mu}\lambda$$ for some function $$\lambda$$ and check if the Lagrangian is the same or not. The given Lagrangian changes under a gauge transformation, the $$F_{\mu\nu}F^{\mu\nu}$$ term doesn't change, but the second term does.