I want to show that $O(n)=\{M\in GL(n,\mathbb{R}): M^T M=id\}$ is compact
I would do it as follows.
Let us consider $$t:GL(n,\mathbb{R})\rightarrow GL(n,\mathbb{R}); \,\,\,M\mapsto M^TM$$We know that $t$ is continuous since it is multilinear. Now we remark that $t^{-1}(id)=O(n)$, but using the of the metric induced topology we know that $\{id\}$ is closed and thus $t^{-1}(id)=O(n)$ is also closed. Now I want to show that $O(n)$ is also bounded.
Let us remark that a subset $A$ of $\mathbb{R}^n$ is bounded if there exists $K\in \mathbb{N}$ such that $|x|<K$ for all $x\in A$.
Therefore let us consider the euclidean norm $||M||=\sqrt{\sum_{1\leq i,j\leq n}m_{i,j} ^2}$. Now take $M\in O(n)$ then $M^TM=id$. This implies that $$||M||=\sqrt{\langle M,M\rangle}=\sqrt{||M^T M||}=\sqrt{||id||}=\sqrt{n}$$ So we have shown that each element is bounded and thus by definition $O(n)$ is bounded. Now using Heine Borel we can conclude that $O(n)$ is compact.
Is this correct so?