TITLE: What is the largest subgroup of $GL^{+}(7,\mathbb{R})$ which smoothly retracts onto $G_2$?
QUESTION [5 upvotes]: There is a nice smooth retraction from $\operatorname{GL}(n,\mathbb{C})$ onto $\operatorname{U}(n)$, which can be explained using polar decomposition. There is an analogous one from $\operatorname{GL}(n, \mathbb{R})$ onto $\operatorname{O}(n)$. Both are "natural" from a Lie theoretic point of view (in a sense that shall not be made precise for now).
I am wondering what is the largest subgroup of $\operatorname{GL}^{+}(7,\mathbb{R})$ ('+' here just means with positive determinant) which smoothly retracts onto $\operatorname{G}_2$?
I have a strange feeling it could be $\operatorname{G}_2$ itself, because I don't think that one can split a $G_2$ structure into 2 independent pieces, one being a Riemannian inner product, and something else. For instance if one uses the usual $3$-form as one of the pieces, then the subgroup of $\operatorname{GL}^{+}(7,\mathbb{R})$ which preserves that $3$-form is $G_2$ itself (so that preserving that $3$-form implies preserving an inner product).

REPLY [12 votes]: There is no retraction of $\mathrm{SO}(7)$ onto $\mathrm{G}_2$.  If such a retraction $\rho:\mathrm{SO}(7) \to \mathrm{G}_2$ existed, then the composition
$$
\mathrm{G}_2 \hookrightarrow \mathrm{SO}(7)\ {\buildrel{\rho}\over{\rightarrow}}
\ \mathrm{G}_2\,,
$$
would induce a composition of the homotopy group homomorphisms
$$
\pi_6\bigl(\mathrm{G}_2\bigr) \rightarrow \pi_6\bigl(\mathrm{SO}(7)\bigr)\ {\buildrel{\rho_*}\over{\rightarrow}}
\ \pi_6\bigl(\mathrm{G}_2\bigr)
$$
that was the identity.  However, according to M. Mimura, The homotopy groups of Lie groups of low rank, J. Math. Kyoto Univ. 6 (1967), 131–176 (see the tables on page 132),
$$
\pi_6\bigl(\mathrm{G}_2\bigr)\simeq \mathbb{Z}_3
 \quad\text{while}\quad
\pi_6\bigl(\mathrm{SO}(7)\bigr)\simeq 0\,,
$$
so this is impossible.
Beyond this, though, I feel that the OP's given motivation for asking the question suggests that the issue of concern is not really whether $\mathrm{SO}(7)$ retracts onto $\mathrm{G}_2$.
The usual reason that one wants to retract $\mathrm{GL}(n,\mathbb{C})$ onto $\mathrm{U}(n)$ and $\mathrm{GL}(n,\mathbb{R})$ onto $\mathrm{O}(n)$ is that these are the fundamental steps in the proof that a complex vector bundle over a paracompact base can always be given a unitary structure and a real vector bundle over a paracompact base can always be given an Euclidean structure (i.e., a positive definite inner product field).  
The analogous question concerning $\mathrm{SO}(7)$ and its subgroup $\mathrm{G}_2$ would be whether every oriented $7$-plane bundle $E\to M$ endowed with an Euclidean structure can be given a $\mathrm{G}_2$-structure, i.e., whether there exists a 'definite' (i.e., a $\mathrm{G}_2$-defining) section of $\Lambda^3(E)\to M$.  Now, the answer to this question is a definite 'no'.  For example, let $M^7$ be any orientable-but-not-spinnable $7$-manifold, say $M^7 = \mathbb{CP}^2\times S^3$.  Then $E=TM\to M$ certainly has a $\mathrm{SO}(7)$-structure (defined by the orientation and any Riemannian metric on $M$), but, because $M$ is not spinnable (because $\mathbb{CP}^2$ is not), its tangent bundle does not allow a structure reduction to $\mathrm{G}_2$.  (This is because $\mathrm{G}_2$ is simply-connected, so that any $7$-manifold whose tangent bundle has a reduction of structure to $\mathrm{G}_2$ would necessarily be spinnable.)
Thus, this particular problem does not motivate the retraction question.
The OP's other remark expressing doubts about whether a $\mathrm{G}_2$-structure can be split into two 'independent pieces' seems to be asking for an analog of what happens in complex and symplectic geometry, where one has the intersections
$$
\mathrm{U}(n) 
= \mathrm{GL}(n,\mathbb{C})\cap \mathrm{Sp}(n,\mathbb{R})
= \mathrm{GL}(n,\mathbb{C})\cap \mathrm{O}(n) 
= \mathrm{Sp}(n,\mathbb{R})\cap \mathrm{O}(n),
$$
so that one can think of a unitary structure as a combination of two 'independent' (but compatible) weaker structures.  The natural analog of this in the present context would be whether $\mathrm{G}_2$ can be expressed as the intersection of two (or more?) Lie subgroups of $\mathrm{GL}(7,\mathbb{R})$ that properly contain $\mathrm{G}_2$.  The answer to this is a(n uninteresting) 'yes'.  There are only three connected Lie groups that lie strictly between $\mathrm{G}_2$ and $\mathrm{GL}^+(7,\mathbb{R})$, and they are
$$
\mathrm{R}^+{\cdot}\mathrm{G}_2,\quad \mathrm{SO}(7),\quad\text{and}
\quad \mathrm{R}^+{\cdot}\mathrm{SO}(7).
$$
Thus, the only nontrival way to do this is the uninteresting intersection
$$
\mathrm{G}_2 = \mathrm{R}^+{\cdot}\mathrm{G}_2 \cap \mathrm{SO}(7).
$$
Thus, the largest (connected) subgroup of $\mathrm{GL}^+(7,\mathbb{R})$ that retracts onto $\mathrm{G}_2$ is $\mathrm{R}^+{\cdot}\mathrm{G}_2$.
As a final argument as to why the retraction question seems to be irrelevant to the OP's apparent concerns, consider the analogous question of whether $\mathrm{SO}(2n)$ can be retracted onto $\mathrm{U}(n)$ for $n>1$.  It cannot, because, such a retraction $\rho$, if it existed in the form the OP desired, i.e.,
$$
\mathrm{U}(n)\hookrightarrow \mathrm{SO}(2n)\ {\buildrel{\rho}\over{\rightarrow}}
\ \mathrm{U}(n),
$$ 
where the composition is the identity on $\mathrm{U}(n)$, then the composition of the induced map on fundamental groups
$$
\mathbb{Z}\to \mathbb{Z}_2\to \mathbb{Z}
$$
would be an isomorphism, which is manifestly impossible.