# Gauge invariance in classical electrodynamics

I think that I don't fully understand concept of gauge invariance. Suppose we have a Lagrangian for classical ED which is: $$\mathcal{L} = -\frac{1}{4} (F_{\mu \nu})^2 - j^{\mu}A_{\mu}.$$ First part with Maxwell tensor is of course gauge invariant. After I transform my A like $A^{\mu} \rightarrow A^{\mu} + \partial^{\mu} f$, $f$ function couples to current etc and our Lagrangian is no longer gauge invariant, equations of motion still work and are independent of f.

My questions are:

1. Do we require full Lagrangian to be gauge invariant or only equations of motion?

2. What's the case in other theories like $SU(2)$ or $SU(3)$ gauge theories?

• $j^\mu$ are conserved, so the Lagrangian is indeed invariant. Commented Mar 16, 2016 at 19:06
• @MengCheng I disagree. There is an extra term $j_\mu \partial^\mu f$. If the current is conserved this is a four-divergency, so the equations of motion are invariant, but not the Lagrangean. Commented May 20 at 18:56

Do we require full Lagrangian to be gauge invariant or only equations of motion?

The probable expectation of a newbie about the meaning of the statement "$$X$$ is gauge-invariant" is that numerical value of the physical concept $$X$$, all else being equal, is the same in both gauges. In this sense, the above Lagrangian is not gauge-invariant.

The Lagrangian density function is gauge-invariant in a different sense though. The Lagrangian density function for EM field is generally assumed the same in all gauges, that is, the form, the mathematical function of its arguments $$A^\mu, j^\mu$$ is assumed to be the same. This assumption says that in the first gauge, the Lagrangian density function to be used in the action principle is

$$\mathscr L = \mathcal l(A^\mu,j^\mu) = -~\frac{1}{4}(\partial_\mu A_\nu - \partial_\nu A_\mu )(\partial^\mu\!A^\nu - \partial^\nu\!A^\mu) ~-~ j^\mu\!A_\mu$$ and in the second gauge, the Lagrangian density function to be used is $$\mathscr L ' = \mathcal l(A'^\mu,j^\mu) = -~\frac{1}{4}(\partial_\mu A'_\nu - \partial_\nu A'_\mu )(\partial^\mu\! A'^\nu - \partial^\nu\!A'^\mu) ~-~ j^\mu\! A'_\mu.$$ Thus, as shown, the function used is actually the same in both gauges - it's the function $$l$$ - it just uses different value of the argument, $$A'$$ instead of $$A$$. The relation defining values $$A'$$ is $$A'^\mu = A^\mu + \partial^\mu\! N$$, where $$N$$ is an arbitrary function of time and spatial coordinates.

Value of these two functions at the same spacetime point need not be the same, because value of the argument $$A$$ and its derivatives may have changed due to the gauge transformation. So gauge-invariance of the function does not imply gauge-invariance of the function value. Often the latter is not present.

Form of the equations of motion is gauge-invariant too, this is implied already by the fact the Euler-Lagrange equations in terms of $$t,A,L$$ are gauge-invariant, and the Lagrangian density function is gauge-invariant.

This topic is often confused by the ideas that the value of the Lagrangian, or terms in the equation of motion, or even the action itself, should be gauge-independent. These are not needed to formulate and apply the principle of stationary action and to get the equations of motion. They are additional requirements that may be imposed, but often they are not satisfied.

For example, above, values of both Lagrangian densities at the same space time point differ when at that point, the expression $$j^\mu\, \partial_\mu N$$ is non-zero.

The $$FF$$ terms have the same value since the $$FF$$ term is a function of gauge-invariant fields $$\mathbf E,\mathbf B$$, but the jA terms have in general different values, because $$A$$ has changed. The new Lagrangian density value differs from the value of the original one by the value of the term

$$j^\mu\,\partial_\mu N.$$

Similarly for the actions

$$S = \int_T \int_V ~\mathscr{L}~ d^3\mathbf x\, dt,$$ $$S' = \int_T \int_V ~\mathscr{L}'~ d^3\mathbf x\, dt.$$ They have the same form, but their values in different gauges, in general, differ.

Note. In the old version of this answer, I wrote "difference in value among the two Lagrangian densities does not lead to any difference in values of actions". This common belief is in general incorrect, because even assuming local conservation of charge, there will be boundary terms in the primed action, which a well-chosen $$N$$ will make sure they make a non-zero contribution to action.

This is because the difference of two actions due to change to $$A'^\mu = A^\mu + \partial^\mu\!N$$ is

$$\int_\Omega j^\mu\,\partial_\mu N ~d^3\mathbf x\, dt.$$

And value of this is obviously gauge-dependent.

It can be expressed as sum of two integrals:

$$\int_\Omega \partial_\mu(j^\mu N) - \partial_\mu j^\mu\, N ~d^3\mathbf x\,dt = I_1 + I_2.$$

The second integral $$I_2$$ is zero because of local conservation of charge, which is a constraint on $$j$$ we assume independently of the Lagrangian: $$\partial_\mu j^\mu = 0.$$ The first integral, despite common belief to the contrary, is, in general, not ignorable.

It can be expressed as surface integral over the spacetime region $$\Omega$$ (via the 4D variant of the Gauss theorem); in the simple case of a box in space and interval $$t_1..t_2$$ in time, we can express it as:

$$I_1 = \int_V N(t_2)\,c\rho(t_2) - N(t_1)\,c\rho(t_1) \, d^3\mathbf x + \int_{t_1}^{t_2} \oint_{\delta V} N\,\mathbf j \cdot d\boldsymbol \Sigma\, dt.$$

If there is non-zero charge density at the boundary times, or current density on the spatial boundary, this integral can be easily made non-zero by an appropriate choice of the function $$N$$ (for example, $$N$$ that does not have a constant value throughout the spacetime region). $$N$$ can be any function we choose, thus the action value is not, in general, gauge-invariant.

Probably there will be some push-back on this statement from smart people, saying that action is gauge-invariant, because that is how it is taught, pointing out that the boundary term is immaterial, as it does not influence equations of motion, so the meaning of "action is gauge-invariant" is all about the equations of motion. Yes indeed, the boundary terms do not influence equations of motion, because those are gauge-invariant. Nevertheless, my point here is that value of the action is not gauge-invariant, only the fruit of the action and the action principle is - the equations of motion. Describing this fact by statements like "action is gauge-invariant" is pretty misleading.

The action value will be gauge-invariant when adopting this additional restriction on the spacetime region considered: that current density $$j^\mu$$ vanishes on the boundary of the spacetime region.

In our simple case, this implies 1) current cannot pass through the spatial boundary of the region at any time in between $$t_1,t_2$$; 2) charge density is zero everywhere in the region at the initial time $$t_1$$ and at the final time $$t_2$$. Thus action being gauge-invariant is a very special condition, not a general property. It is, for example, obeyed in empty spacetime with no charges. Then the action is just integral of the $$FF$$ term, which has gauge-invariant value.

Summary: both the Lagrangian density function $$\mathscr{L}$$ and the action functional of $$\mathscr{L}$$ are gauge-independent functions of their arguments - potentials, their spacetime derivatives, and possibly other (matter) variables. But Lagrangian density value at some spacetime point is not gauge-independent, because one argument in the function $$l$$ has different value - $$A'^\mu$$ instead of $$A^\mu$$. Action value is not, in general, gauge-independent either, as difference in value of the Lagrangian density integrates to a non-zero contribution on the region boundary. Only in special cases, such as a region of space in which charge density vanishes at the beginning and at the end of the time interval, and no current flows through the spatial boundary at any time in between, is the value of action guaranteed to be gauge-invariant.

If you write the Lagrangian with an external source current $j^\mu$, then you need to use its conservation law $\partial_\mu j^\mu = 0$ to conclude invariance of the Lagrangian. This is not "on-shell" (which would make $\delta S=0$ true by definition under any infinitesimal transformation) because here $j^\mu$ is not a dynamical variable, and its conservation law is given to us as additional off-shell information to ensure the gauge invariance of the model.

• So is $j^{\mu}$ U(1) current which we can get from Noether's theorem applied to a free theory and then we add it to the lagrangian as linear term in $A^{\mu}$ field? Commented Mar 16, 2016 at 19:20
• @Caims: Yeah, that's one way. Another is to not give an external current at all, but to minimally couple your gauge field to a given matter field by replacing $\partial_\mu\mapsto\partial_\mu + A_\mu$ (signs and factors of $\mathrm{i}$ omitted) in the Lagrangian for the matter field, and the just inspect what the resulting $j^\mu$ is (then it also is indeed the conserved current for the global version of the gauge symmetry). Commented Mar 16, 2016 at 19:27

The equations of motion are what is gauge invariant. But people will say the Lagrangian is gauge invariant when what they mean is that Lagrangian changes by a total derivative (which forces the equations of motion to be the same).

Lots of Lagrangians give the same equations of motion. Add a constant. Multiply by a nonzero scalar. Add a function that is a total derivative. Same equations of motion.

But since we think of all these Lagrangians as essentially the same Lagrangians (because they give the same equations of motion) when we say a Lagrangian is gauge invariant, we don't mean that it's the same Lagrangian when you change the gauge. We mean that when you change the gauge you get a Lagrangian that differs by a total derivative.

Specifically in your case when you change the gauge, the electromagnetic field $F$ doesn't change so the difference in the two Lagrangians is just the 4-current $J$ times a derivative of $f$ and since the 4-current satisfies a continuity equation an integration by parts gives that this term is equal to a total derivative.

So your Lagrangian is literally a different function when you change the gauge. It happens to be one that differs by a total deriavtive (and hence gives you the same equations of motion). And by defining the phrase "gauge invariance of a Lagrangian" to mean that it changes to something that differs by a total derivative, then we can say the Lagrangian is gauge invariant (even though it changes).

It changes to something that is close enough. The gauge transformation isn't a symmetry of the Lagrangian, but you could talk about a quasi-symmetry of the action. Yet another different thing. You can see this post about the action, as suggested by ACuriousMind.

An action and a Lagrangian are different. They even have different units. And in the linked post you'll see that a quasi-symmetry of the action differs by a boundary integral and here we talk about Lagrangians differing by a total derivative. But it's the same issue. When you integrate a Lagrangian then a total derivative term in the Lagrangian turns into a boundary integral of the action.

• Invariance of the equations of motion is a distinct concept from invariance of the Lagrangian up to total derivatives, cf. this answer by Qmechanic. In particular, it is the notion of Lagrangian (quasi-)symmetry (use "quasi" if you want to make the "up to total derivative" clear) that forces conservation laws by Noether's theorem, while a mere symmetry of the equations of motion does not. Commented Mar 16, 2016 at 23:20