A gauge field is a connection on a principal bundle. I'll try to show here roughly how this formulation is related to the common construction in physics of the gauge fields in the process of making locally invariant a theory that only has global invariance.
Let $G$ be a Lie group, $G\times V\rightarrow V:(g,v)\mapsto gv$ a representation of $G$, $M$ the space-time manifold, $E\rightarrow M$ a principal $G$-bundle and $F\overset{\pi}{\rightarrow} M$ an associated bundle with fiber isomorphic to $V$. The space of gauge transformations $\Gamma(E)$ is equipped with a canonical action over the space of fields $\Gamma(F)$ as $(g,\phi)\mapsto g\phi$ where $(g\phi)(x)=g(x)\phi(x)$.
Observe that for a constant $g$, derivatives have the nice property that $\partial_\mu(g\phi)=g\partial_\mu\phi$. This isn't true for a general gauge transformation, so we want to construct an object similar to $\partial_\mu$ that satisfies the previous equation for any $g$. By adding a connection $A$ of the principal bundle $G$ (and using the Lie algebra representation $(T,v)\mapsto Tv$ corresponding to the representation of $G$ over $V$) we can define the covariant derivative $D_\mu$ to be $D_\mu\phi(x)=\partial_\mu\phi(x)+A_\mu\phi(x)$. Now we have our object $D_\mu$ for which the equation $D_\mu(g\phi)=gD_\mu\phi$ holds for any $g$.
The action functional is a map $S:\Gamma(F)\rightarrow\mathbb{R}$. It is said to have global invariance under $G$ if $S[\phi]=S[g\phi]$ for every constant gauge transformation $g$. If the condition $S[\phi]=S[g\phi]$ holds for any $g\in\Gamma(E)$ the action is said to be locally (gauge) invariant.
Suppose that we want to construct locally invariant actions from globally invariant ones. Usually, global invariance will depend on the fact that $\partial_\mu(g\phi)=g\partial_\mu\phi$, so an action with global invariance will not have in general local invariance. However, by replacing every $\partial_\mu$ by a $D_\mu$ in the expression for the action one obtains a new one which extends invariance to every gauge transformation because now $D_\mu(g\phi)=gD_\mu\phi$ is satisfied for all $g$.
This post imported from StackExchange Physics at 2017-02-14 10:48 (UTC), posted by SE-user coconut