structural:reformatting, stylistic:tone, information:classification
Gauge symmetry

If the following transformation to the fields is performed at every spacetime point x (a local transformation), then the QED Lagrangian remains unchanged, or invariant:

where α (x) is any function of spacetime coordinates. If a theory's Lagrangian (or more precisely the action) is invariant under a certain local transformation, then the transformation is referred to as a gauge symmetry of the theory. Gauge symmetries form a group at every spacetime point. In the case of QED, the successive application of two different local symmetry transformations e i α (x) {\displaystyle e^{i\alpha (x)}} and e i α ′ (x) {\displaystyle e^{i\alpha '(x)}} is yet another symmetry transformation e i {\displaystyle e^{i}}. For any α (x), e i α (x) {\displaystyle e^{i\alpha (x)}} is an element of the U(1) group, thus QED is said to have U(1) gauge symmetry. The photon field A may be referred to as the U(1) gauge boson.

U(1) is an Abelian group, meaning that the result is the same regardless of the order in which its elements are applied. QFTs can also be built on non-Abelian groups, giving rise to non-Abelian gauge theories (also known as Yang–Mills theories). Quantum chromodynamics, which describes the strong interaction, is a non-Abelian gauge theory with an SU(3) gauge symmetry. It contains three Dirac fields ψ, i = 1,2,3 representing quark fields as well as eight vector fields A, a = 1,...,8 representing gluon fields, which are the SU(3) gauge bosons. The QCD Lagrangian density is:

where D is the gauge covariant derivative:

where g is the coupling constant, t are the eight generators of SU(3) in the fundamental representation (3×3 matrices),

and f are the structure constants of SU(3). Repeated indices i, j, a are implicitly summed over following Einstein notation. This Lagrangian is invariant under the transformation:

where U (x) is an element of SU(3) at every spacetime point x:

The preceding discussion of symmetries is on the level of the Lagrangian. In other words, these are "classical" symmetries. After quantization, some theories will no longer exhibit their classical symmetries, a phenomenon called anomaly. For instance, in the path integral formulation, despite the invariance of the Lagrangian density L {\displaystyle {\mathcal {L}}} under a certain local transformation of the fields, the measure ∫ D ϕ {\textstyle \int {\mathcal {D}}\phi } of the path integral may change. For a theory describing nature to be consistent, it must not contain any anomaly in its gauge symmetry. The Standard Model of elementary particles is a gauge theory based on the group SU(3) × SU(2) × U(1), in which all anomalies exactly cancel.

The theoretical foundation of general relativity, the equivalence principle, can also be understood as a form of gauge symmetry, making general relativity a gauge theory based on the Lorentz group.

Noether's theorem states that every continuous symmetry, i.e. the parameter in the symmetry transformation being continuous rather than discrete, leads to a corresponding conservation law. For example, the U(1) symmetry of QED implies charge conservation.

Gauge-transformations do not relate distinct quantum states. Rather, it relates two equivalent mathematical descriptions of the same quantum state. As an example, the photon field A, being a four-vector, has four apparent degrees of freedom, but the actual state of a photon is described by its two degrees of freedom corresponding to the polarization. The remaining two degrees of freedom are said to be "redundant" — apparently different ways of writing A can be related to each other by a gauge transformation and in fact describe the same state of the photon field. In this sense, gauge invariance is not a "real" symmetry, but a reflection of the "redundancy" of the chosen mathematical description.

To account for the gauge redundancy in the path integral formulation, one must perform the so-called Faddeev–Popov gauge fixing procedure. In non-Abelian gauge theories, such a procedure introduces new fields called "ghosts". Particles corresponding to the ghost fields are called ghost particles, which cannot be detected externally. A more rigorous generalization of the Faddeev–Popov procedure is given by BRST quantization.