Understanding that $GL_n(\mathbb{R})$ has two connected components I am trying to understand the proof of the theorem: 

$GL_n(\mathbb{R})$ has two components.

The proof says that

The group of matrices with positive and negative determinant, $GL_n(\mathbb{R})_+$ and $GL_n(\mathbb{R})_-$, respectively are homeomorphic open subsets of $GL_n(\mathbb{R}).$  So it suffices to prove that $GL_n(\mathbb{R})_+$ is connected.

I don't understand why they are homeomorphic and open. Could you help me?
 A: Consider the determinant map $\det\colon GL_n(\mathbb{R})\to \mathbb{R}$. This is a continuous map, so the inverse image of an open set is open. Note that $GL_n(\mathbb{R})_+ = \det^{-1}((0,\infty))$ and $GL_n(\mathbb{R})_- =\det^{-1}((-\infty, 0))$ are inverse images of open sets, thus they are open.
Why are they homeomorphic? Well let's construct a homeomorphism between them. Take $f\colon GL_n(\mathbb{R})_+\to GL_n(\mathbb{R})_-$ to be the map which takes a matrix $M\in GL_n(\mathbb{R})_+$ and sends it to $AM$, where $A$ is the diagonal matrix with diagonal entries $(-1,1,1,\ldots, 1)$. Note that $\det (A) = -1$, so $\det(AM) = -\det(M)$. In particular $AM\in GL_n(\mathbb{R})_-$, so indeed $f$ maps $GL_n(\mathbb{R})_+$ into $GL_n(\mathbb{R})_-$. Can you see why $f$ is a homeomorphism? What is its inverse?
A: $\mathrm{GL}_n(\mathbb{R})$ does not contain matrices with determinant zero.  This leaves some matrices with positive determinants and some with negative determinants.  If these are each connected open sets, then they form a separation of $\mathrm{GL}_n(\mathbb{R})$, so the whole thing cannot be connected.
Consider that any matrix with positive determinant can be converted to one with negative determinant by multiplying the first row (or column) by $-1$, giving an easy way to show a bijection.  (Showing it's a homeomorphism is only a bit more work.)
Open...  Let $P = \{M \mid \det M > 0\}$ and consider $f:P \rightarrow \mathbb{R}:M \rightarrow \det M$.  If you believe this is a continuous function then we observe that $f(P) = (0, \infty)$, which is open, so the preimage, $P$, is open.  To show that it is continuous, (I abbreviate:) small changes in the matrix entries cause small changes in the determinant.
