Compactness and connectedness on $M_n(\mathbb R)$ Consider $M_n(\mathbb R)$, the set of all $n\times n$ matrices.
Which of the following are compact and which are connected?
a) The set of all invertible matrices
b) The set of all orthogonal matrices
c) The set of all matrices whose trace is zero
 A: Let $\mathcal{A}$, $\mathcal{B}$ and $\mathcal{C}$ denote the sets of items a), b) and c) respectively.
It should be easy to see that $\mathcal{A}$ and $\mathcal{C}$ are unbounded, and therefore are not compact. On the other hand, $\mathcal{B}$ is compact: for a given matrix $X\in\mathcal{B}$, it's columns are orthogonal, hence every entry of $X$ must have absolute value $\leq 1$. Therefore $\mathcal{B}$ is bounded. Since $\mathcal{B}$ is the inverse image of $(I_n,I_n)$ by the continuous function $X\in M_n(\mathbb{R})\mapsto (X^tX,XX^t)\in M_n(\mathbb{R})\times M_n(\mathbb{R})$, it is also closed, and therefore is compact, by Heine Borel's theorem.
$\mathcal{A}$ is not connected, since the determinant function $det: M_n(\mathbb{R})\rightarrow \mathbb{R})$ is continuous and $det(\mathcal{A})=(-\infty,0)\cup(0,+\infty)$, which is disconnected.
The same argument works for $\mathcal{B}$. It should be clear that $det(\mathcal{B})=\left\{-1,1\right\}$, which is disconnected. Therefore $\mathcal{B}$ is disconnected.
Now, it should be clear that $\mathcal{C}$ is a subspace of $M_n(\mathbb{R})$, and is therefore (path-)connected.
