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.