Gauge field theory describes fundamental interactions through the principle of local gauge invariance. Quantum mechanics respects the gauge invariance of electromagnetic fields by requiring a simultaneous change in phase of the wavefunction under gauge transformations of potentials. Insisting on local gauge freedom in quantum mechanics forces the introduction of gauge fields that interact with particles. Yang-Mills theory extends this concept to field theories by demanding local gauge invariance of the Lagrangian density. This dictates that gauge fields belong to the Lie algebra of the symmetry group and interact with matter fields through covariant derivatives. The Lagrangian includes terms for gauge fields constructed from an invariant field strength tensor.