I would like to compute the fundamental group of connected components of $GL(2,\mathbb{R})$. A hint for compute this fundamental group, is show that $GL(2,\mathbb{R})$ I homeomorphic to $O(2)\times T^+$, where $O(2)$ is a group of all orthogonal matrices, and $T^+$ is the group of all tringular matrices with positive diagonal.
My attempt is show that $\phi: O(2)\times T^+ \to GL^+(2,\mathbb{R})$ given by $\phi(A,B) = AB $ is a homeomorphism. But, I cannot show that $\phi$ is surjective. I try to use the Gram-Schmidt orthogonalization process , but I cannot show that every matrix whose determinant is non-zero can be written as the product of an orthogonal matrix and a triangular matrix. I don't know how to use the orthonormalization process to accomplish this. I appreciate any kind of help.
Start with the basis of columns of $A \in \operatorname{GL}(2, \mathbb{R})$. If you perform Gram-Schmidt orthogonalization on this, you get a orthonormal basis, ie one which forms the columns of an orthogonal matrix $Q$. Verify that each operation you perform in the orthogonalization process can be done by multiplying $A$ on the right by an (invertible) upper triangular matrix with positive diagonal. Since $T^+$ is a group, this shows that $AR^{-1} = Q$ for some $R \in T^+$, which is equivalent to $A = QR$.
All of this works equally well for $\operatorname{GL}(n, \mathbb{R})$, although writing down $R$ explicitly becomes more tedious as the number of steps in the Gram-Schmidt process increases.