Hold the metric fixed when varying the gauge potential, put , and take variations with compact support or with appropriate fixed boundary data. The Hodge star operator then gives
For the Abelian Chern-Simons 5-form, the two occurrences of commute as even-degree differential forms. Since ,
The factor three comes from all three appearances of , including those hidden in . The bulk variation is therefore
and the Abelian Chern-Simons five-form field equation is
Under an Abelian gauge transformation , the gauge field strength stays fixed and the action changes by
Thus the local integrand is not gauge invariant, but its change is a boundary term by the Generalized Stokes theorem. With the stated boundary conditions the variational bulk equations are unchanged; they depend only on and the metric, so they are manifestly gauge invariant. On a spacetime with boundary, gauge transformations nonzero at the boundary require boundary conditions or boundary degrees of freedom; the bulk claim does not assert invariance of every possible boundary action.
For the metric variation, write the kinetic action in components,
At fixed covariant components and ,
Substituting into the given definition of the stress-energy tensor yields
The Chern-Simons 5-form uses only wedge products of differential forms and orientation, with no metric or Hodge star operator. Its bulk metric derivative is zero, so the Chern-Simons term contributes no bulk stress-energy tensor. The displayed tensor is generally not traceless in five dimensions: .