# Is Maxwell theory gauge invariant on non-trivial manifolds?

I've done my share of QFT, but as a mostly condensed matter person I'm unfamiliar with any discussion of how the gauge invariance of Maxwell theory might depend on the manifold which it's defined on. I imagine this has been discussed somewhere but I can't find any clear discussions online.

My question is the following: we know that the Maxwell Lagrangian with sources is

$$\mathcal{L}_{M} = -\frac{1}{4}F^{\mu\nu}F_{\mu\nu}-A_{\mu}J^{\mu}$$

The resulting equations of motion are of course

$$\partial_{\mu}F^{\mu\nu}=J^{\nu} \Rightarrow \partial_{\nu}J^{\nu}=0$$

Under a gauge transformation $A_{\mu}\rightarrow A_{\mu}+\partial_{\mu}\Lambda$, the field strength is invariant, so we have

$$\mathcal{L}_{M}'=\mathcal{L}_{M}-\left(\partial_{\mu}\Lambda\right)J^{\mu} = \mathcal{L}_{M}-\partial_{\mu}\left(\Lambda J^{\mu}\right)$$

The usual story is that this is a total derivative, so we don't need to worry about it if the boundary terms behave nicely at infinity. But what if we define our theory on, say, a sphere with finite extent? Then what happens? It seems that the story has to be modified, much as the discussion of gauge invariance in Chern-Simons theory becomes somewhat delicate. Can someone point me to a reference discussing this, or perhaps say what's wrong with my logic? I've never heard discussion of this point which seems odd to me.

• Related: physics.stackexchange.com/q/175047/2451 and links therein. – Qmechanic Jan 27 '17 at 18:55
• @Qmechanic - sorry, is there a discussion of gauge invariance there? I'm not seeing it. – miggle Jan 27 '17 at 18:59
• @mflynn I think Qmechanic was referring to the "comma goes to semicolon rule", which basically says if you promote all partial derivatives in a flat spacetime equation (or theory) to covariant derivatives (using the Levi-Civita connection), then the equation (or theory) generalizes to arbitrary spacetime. Maxwell theory generalized to arbitrary spacetime is discussed in the links given by Qmechanic. Using differential forms $A\to A + d\Lambda$ for the gauge makes the generalization even more immediate... – Alex Nelson Jan 27 '17 at 19:33
• @AlexNelson Right, I'm familiar with that story. I certainly agree that this works for the source-free theory. But I can't see how promoting derivatives to covariant derivatives "soaks up" the boundary terms that comes from the sources; I'm less concerned with how the geometry affects the dynamics than I am with how we can justify throwing away the boundary terms. – miggle Jan 27 '17 at 19:38
• @mflynn Oh, sorry, my error. Isn't it that we're really working with the integrand of the action, which includes a factor of $\sqrt{|g|}$? Then one can use integration by parts and the identity $\partial_\mu (\sqrt{|g|} J^\mu) = \sqrt{|g|} \nabla_\mu J^\mu$...I think, it's been a while since I've looked at the gory details... – Alex Nelson Jan 27 '17 at 19:53

Maxwellian, and indeed arbitary Yang-Mills, gauge theory is indeed gauge invariant on all manifolds $M$. One may write the action in a manifestly geometric way as $$S[A] = \int_M \mathrm{tr}(F\wedge{\star} F) + \mathrm{tr}(A\wedge{\star}j)$$ and $F = \mathrm{d}A + A\wedge A$, so no replacement of ordinary derivatives by covariant derivatives is necessary anywhere (recall that the exterior derivative $\mathrm{d}$ and the wedge products $\wedge$ are always properly covariant because the antisymmetrization in their definition kills off the symmetric terms spoiling covariance for an ordinary derivative $\partial_\mu A$).
Now, a gauge transformation is $A\mapsto gAg^{-1} + g^{-1}\mathrm{d}g$, inducing $F\mapsto gFg^{-1}$, so the kinetic term is gauge invariant, and the coupling term behaves as $$A\wedge{\star}j\mapsto gAg^{-1} \wedge g{\star}jg^{-1} + g^{-1}\mathrm{d}g\wedge{\star}j$$ Writing $g^{-1}\mathrm{d}g = \mathrm{d}\chi$ for $g =\exp(\chi)$, we remain with checking that $$\int_M \mathrm{d}\chi\wedge{\star}j = \int_M \mathrm{d}(\chi\wedge{\star}j) - \int_M \chi\wedge\mathrm{d}{\star}j$$ vanishes, which it indeed does: The first term vanishes by Stokes' theorem and the fact that manifolds have no boundary, the second because the conserved current has vanishing divergence, and $\mathrm{d}{\star}j$ is just the divergence of the current.
The obvious generalisation to curved spacetime is $F_{\mu\nu}=\nabla_\mu A_\nu-\nabla_\nu A_\mu$, but in a torsion-free theory such as general relativity the Christoffel symbols cancel, giving the usual formula with $\partial$ and hence the usual gauge invariance. Note that if a transformation effects $\delta S = \int d^n x \partial_\mu V^\mu$ in $n$-dimensional Minkowski spacetime then the general case multiplies the integration measure by $\sqrt{|g|}$ and replaces the $\partial$ with $\nabla$, giving $$\delta S = \int d^n x \sqrt{|g|}\nabla_\mu V^\mu = \int d^n x \partial_\mu \left( \sqrt{|g|} V^\mu\right),$$ which is still an integral of a total derivative.