Which of the following subsets of $M_n(\mathbb{R})$ are compact (NBHM) Following is a list of problems from an exam for admission into Ph. D program. I have just compiled all previous questions on compactness of certain subsets of matrices  and i tried to work out . I would be thankful if some one can check the solutions and please suggest if there are any better ways to do and if the solution is wrong please let me know what could be done for them.


*

*$\{ A\in M_n(\mathbb{R}) : \text { A is real symmetric Matrix with eigenvalues $|\lambda|\leq 2$}\}$

Solution: We see that any real symmetric matrix is diagonalizable. So, I believe each element in $S$ is similar to some $\begin{bmatrix} a& 0\\0&b\end{bmatrix}$ where $|a|\leq 2, |b|\leq 2$ in which case we have boundedness. I am not so certain about the closedness I believe it is closed though i can not write it in detail.

*$\{ A\in M_n(\mathbb{R}) : \text { A is diagonalizable Matrix with eigenvalues $|\lambda|\leq 2$}\}$

Solution: We see this is same as above set $S$ and so should be compact.

*$\{\text {unitary matrices in $M_2(\mathbb{C}$)}\}$

Solution: My justification for this makes no sense.. I would edit this once i got some clear idea..

*$\{ A\in M_n(\mathbb{R}) : \text { det (A)} =1\}$

Solution: We can consider $\begin{bmatrix} 1& n\\0&1\end{bmatrix}$ to be in given set and $n$ can be as large as i wish.. so this set is not bounded so is not compact.

*$\{\text {Trace (A) : $A\in M_n(\mathbb{R})$ is orthogonal}\}\subset \mathbb{R}$

Solution: I have no idea. only thing i could see is that determinant is $\pm 1$ but i do not see any properties regarding Trace.

*$\{ A\in M_n(\mathbb{R}) : \text { A is invertible diagonal Matrix}\}$

Solution: We can consider $\begin{bmatrix} n& 0\\0&n\end{bmatrix}$ for $n\neq 0$to be in given set and $n$ can be as large as i wish.. so this set is not bounded so is not compact.

*$\{ A\in M_n(\mathbb{R}) : \text { A is upper triangular Matrix}\}$

Solution: We can consider $\begin{bmatrix} 1& n\\0&1\end{bmatrix}$ to be in given set and $n$ can be as large as i wish.. so this set is not bounded so is not compact.
Thank you for sparing your valuable time in checking my solutions. Once somebody confirm that every thing is fine and no modifications needed i would delete this question so please post only comments (unless you believe it is so beautiful and worth being an answer :)).
Thank you :)
 A: Your Argument looks okay to me for $7,6,4,1,2$
$5$. Look $O(n,\mathbb{R})$ is compact in $M_n(\mathbb{R})$, Now $Trace:M_n(\mathbb{R})\to\mathbb{R}$ is a linear map so continuous map, so image of compact set under continuos map is compact.
$3$. $UU^*=U^*U=I\Rightarrow \|Ux\|=\|x\|$, so set of all unitary matrices are bounded.
now $U\to U,U\to U^*$ are continous and so $f:U\to UU^*$ is continous from $M_n(\mathbb{C})\to$ itself. now $U(n,\mathbb{C})=f^{-1}(I)$ so closed also.
A: A few comments:
(2) The matrix $\begin{bmatrix}a & 0 \\ 0 & a\end{bmatrix}$ is positive semidefinite if and only if $a\geq 0$ (you write $a\in\mathbb{R}$).  Also, this set is closed.  In particular,  a matrix
$$
\begin{bmatrix}a & b \\ c & d\end{bmatrix}
$$
is positive semidefinite if and only if it is symmetric and has non-negative eigenvalues.  We can check that both eigenvalues are non-negative by checking that the trace and determinant are both nonnegative.  Hence, the above matrix is positive semidefinite if and only if it satisfies the equations
$$
b=c,\qquad a+d\geq 0,\qquad ad-bc\geq 0.
$$
(5) A matrix in this set doesn't have to be similar to $\begin{bmatrix}a & 0 \\ 0 & a\end{bmatrix}$, since the two eigenvalues don't have to be the same.  In any case, bounding the eigenvalues isn't necessarily sufficient for bounding the matrix.
(7) This argument is not correct.  The matrix $\begin{bmatrix}1 & n \\ 0 & 1\end{bmatrix}$ is unitary if and only if $n=0$.
(Hint for 9) What do you know about the eigenvalues of an orthogonal matrix?
A: I don't think the set from $6$ is the same as the set from $5$. A symmetric matrix is diagonalizable by a orthonormal matrix, this is a stronger condition to just being diagonalizable. For a $2\times 2$ matrix, take the matrix
$$\begin{bmatrix}0& 1 \\ 1& b\end{bmatrix}\begin{bmatrix} 1& 0\\0&2\end{bmatrix}\begin{bmatrix}0& 1 \\ 1& b\end{bmatrix}^{-1}= \begin{bmatrix}0& 1 \\ 1& b\end{bmatrix}\begin{bmatrix} 1& 0\\0&2\end{bmatrix}\begin{bmatrix}-b& 1 \\ 1& 0\end{bmatrix} = \begin{bmatrix}2& 0 \\ b& 1\end{bmatrix}$$
and set $b$ to be as large as you want.
For $7$, the matrix $U=\begin{bmatrix} 1& n\\0&1\end{bmatrix}$ is not unitary.
$UU^*=\begin{bmatrix} 1+n^2& n\\n&1\end{bmatrix}\neq I$
For $9$, if $A$ is orthogonal, its columns all have the norm of $1$, so you have boundedness
A: your 2 ans is wrong..bcoz u can take upper triangular matrix with distinct entries on diagonal ,then it is diagonalizable but it is not bounded if u take one of d non diagonal entry large
