Finding path-connected components of $Gl_n(\mathbb R)$ There is a problem in Elementary Topology by Viro that asks for path-connected components of $Gl_n(\mathbb R)$.
I looked for hints at the end of the book, but I still can't complete it.
Considering the determinant of two connected invertible matrices yields their determinants must have same signs.
Now, how do you show that two invertible matrices of, say, positive determinant are path-connected ?
Another hint suggests building a "moving frame/basis": given $(e_1,...,e_n)$ a basis of $\mathbb R^n$, there exists continuous functions $a_i:[0,1] \rightarrow \mathbb R^n$ such that $\forall t, (a_1(t),...,a_n(t))$ is a basis , $(a_1(0),...,a_n(0))=(e_1,...,e_n)$ and
$(a_1(1),...,a_n(1))$ is an orthonormal basis. 
I proved the existence by induction, but I can't proceed further (where does sign intervene?) 
 A: Another way would be to prove that every elementary matrix $E$ is connected in $GL_n(\mathbb{R})$ to either $I_n$ or $\begin{pmatrix} -1 & 0 \\ 0 & I_{n-1} \end{pmatrix}$. Using Gaussian elimination, every $n \times n$ real matrix $A$ can written in the form $A = E_1 E_2 \cdots E_n R$
where $R$ is the row-reduced echelon form of $A$ and the $E_i$ are elementary matrices. If $A$ is invertible, then $R = I_n$, so this just says every $A \in GL_n(\mathbb{R})$ can be expressed as a product of elementary matrices:
$$A = E_1 E_2 \cdots E_n.$$
Continuously deforming each $E_i$ into either $I_n$ or $\begin{pmatrix} -1 & 0 \\ 0 & I_{n-1} \end{pmatrix}$ as appropriate shows that $A$ can also be continuously deformed to either $I_n$ or $\begin{pmatrix} -1 & 0 \\ 0 & I_{n-1} \end{pmatrix}$, depending on whether an even or odd number of the latter matrix occurs in the product when the deformation is completed. This implies $GL_n(\mathbb{R})$ has at most two path-components, and you have already observed there are at least two, using the determinant. 
First, argue that every elementary matrix $E$ can be connected either to $I_n$ or to $I_n$ with a single diagonal entry replaced by $-1$. There are three types of elementary matrix, hence three cases to consider. 


*

*$E$ is $I_n$ plus a single off-diagonal entry $\lambda$. In this case, $E$ is connected to $I_n$ by a path of elementary matrices of the same type. Just continuously decay $\lambda$ to zero. 

*$E$ is $I_n$ with a single diagonal entry replaced by a nonzero scalar $\lambda$.

*

*If $\lambda < 0$, then $E$ is connected to $I_n$ by a path of elementary matrices of the same type. Just continuously change $\lambda$ to $1$ without crossing $0$. 

*If $\lambda < 0$, then $E$ is connected to $I_n$ with a single diagonal entry replaced by $-1$ by a path of elementary matrices of the same type. Just continuously change $\lambda$ to $-1$ without crossing $0$. 


*$E$ is a transposition. For example, $E = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0\\ \end{pmatrix}$. Note $E = \begin{pmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1\\ \end{pmatrix}\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \\ \end{pmatrix}$ and the matrix on the right is connected to $I_n$ via $\begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos(t) & -\sin(t)  \\ 0 & \sin(t) & \cos(t) \\ \end{pmatrix}$ so that $E$ is connected to $\begin{pmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1\\ \end{pmatrix}$. In general, when $E$ is any transposition, it is connected to $I_n$ with a single diagonal entry replaced by $-1$. 


The argument will be complete provided that any matrix $B$ which is $I_n$ with a single diagonal entry replaced by $-1$ is connected to the particular example $\begin{pmatrix} -1 & 0 \\ 0 & I_{n-1} \end{pmatrix}$. Indeed, if one has, say, $B = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{pmatrix}$ then one can use the path $\begin{pmatrix} \cos(t) & 0 & -\sin(t) \\ 0 & 1 & 0 \\ \sin(t) & 0 & \cos(t)\end{pmatrix} B \begin{pmatrix} \cos(t) & 0 & -\sin(t) \\ 0 & 1 & 0 \\ \sin(t) & 0 & \cos(t)\end{pmatrix}^{-1}$ to continuously shift the $-1$ to the upper-left corner. 
A: By the hint, every basis (i.e. every element $X$ of $GL_n(\Bbb{R})$) can be connected to an orthonormal basis (i.e. an element $X'$ of $O_n(\Bbb{R})$).  If $\det X > 0$ then $\det X' > 0$ also, so therefore $\det X' = 1$.  Therefore it suffices to show that $SO_n(\Bbb{R})$ is connected.  To do that, you use a similar moving frame argument restricted to $SO_n(\Bbb{R})$.  Given 2 positive orthonormal bases $(e_1,\ldots,e_n)$ and $(f_1,\ldots,f_n)$, rotate the $e$ basis so that $e_n$ coincides with $f_n$.  By induction, $(e_1, \ldots, e_{n-1})$ can be rotated into $(f_1,\ldots, f_{n-1})$, and we are done.
The sign restriction comes in at the bottom of the induction: When you get to $n=1$, you cannot go from the basis $\{v\}$ to $\{-v\}$ continuously, so you need the determinant restriction to get the induction started.
