I am reading Jost's Riemannian Geometry and Geometric Analysis (7-Ed) and having a question about the Yang-Mills functional (page 182).
Let $M$ be a compact manifold and $E$ be a metric bundle where the structure group is $SO(n)$ ($n$ is the fiber dimension). Let $\mathscr{G}$ be the gauge group, i.e., the set of sections of $Aut(E)$. $\mathscr{G}$ acts on the set of all metric connections by conjugation.
Jost first showed that the set of Yang-Mills connections (the solution of Yang-Mills functional) is invariant under this action. Then he wrote
Corollary 4.2.3 The space of Yang–Mills connections on a given metric vector bundle E of rank $ \ge 2$ is infinite dimensional, unless empty.
First, is the set of all Yang-Mills functional an affine space (so that it makes sense to talk about dimension)? If it is an affine space, then why it is infinite dimensional when the rank $\ge 2$?
For the second question, my idea is that we can locally change the connection by choosing a gauge transformation $g \in \mathscr{G}$ such that $g(x)$ is the identity map outsides a neighborhood of $x_0 \in M$. But for the first one, I have no clue now.
Any comment is appreciated!