For define . A fixed-coordinate infinitesimal field variation satisfying gives the Noether current
Indeed, the first variation is
subtract the divergence of and use the Euler-Lagrange field equations. The components of the Lorentz four-vector are simply the field labels in this formula. For a transformation moving the coordinates, use its induced fixed-coordinate variation; this includes translations and Lorentz transformations. The spatial integral of is conserved when the spatial current has vanishing boundary flux.
With signature , a gauge transformation is . The electromagnetic field tensor
is unchanged, since mixed derivatives of commute. Thus is gauge invariant. Write , so and . Then
The overall minus sign produces a positive electric kinetic term and a positive physical Hamiltonian. Reversing it reverses the sign of the physical energy and gives the wrong positive-energy theory; the issue is the indefinite spacetime metric, not negative magnetic energy.
For , direct differentiation gives . Since
the canonical energy-momentum tensor gives the conserved energy current
Its time component is
because . Thus Noether's conserved canonical energy is . In pure, source-free electromagnetism the field equation gives , and
For sufficiently decaying fields, or boundary conditions removing this surface term,
The canonical density is not locally gauge invariant, even though the total energy with these conditions is.
Now use the gauge-compensated time translation in electromagnetism,
The extra term is a gauge transformation with the field-dependent parameter . It changes no field strength; therefore the combined variation still has and the same . The new current is
It is expressed entirely in gauge-invariant field strengths. In particular
This is the energy column of the electromagnetic stress-energy tensor
in the chosen mostly-minus convention. Its conservation is the energy continuity equation.
The currents differ by
on the source-free field equations. The final expression is an antisymmetric superpotential divergence, so it changes the integrated charge only by a boundary term. The compensating gauge transformation improves the local energy density without changing the physical conserved energy under the stated boundary conditions.