Which of the following are compact?
$1$. The set of all upper triangular matrices all of whose eigenvalues satisfy $|\lambda|\leq 2$.
$2$. The set of all real symmetric matrices all of whose eigenvalues satisfy $|\lambda|\leq 2$.
$3$. The set of all diagonalizable matrices all of whose eigenvalues satisfy $|\lambda|\leq 2$.
Intuitively I feel that all these are bounded from the condition. Is it true? For $1 $and $ 2$ I think the set is closed. $3$ I am not sure. Please give a detailed answer I have never been exposed to these problems before. Thanks
Let $A_n = \begin{bmatrix}1&n\\0& 2 \end{bmatrix}$, we see that the eigenvalues of $A_n$ are $1,2$ and $A_n$ is upper triangular. Since the eigenvalues are distinct, $A_n$ is diagonalisable. We have $\|A_n e_2\|_2 = \sqrt{n^2+4}$, hence $\|A_n\|_2 \ge n$ and so the $A_n$ are unbounded. It follows that the sets (1), (3) are unbounded, hence are not compact.
The real symmetric matrices are normal and so can be diagonalised by an orthogonal matrix. The set of orthogonal matrices $O(n)$ is compact (closed since the map $U \mapsto U U^T-I$ is continuous, and bounded since $\|U\|_2 = 1$), and the set ${\cal D}$ of diagonal matrices whose diagonal entries lie in $[-2,2]$ is compact. Let ${\cal S}$ denote the $n \times n$ real symmetric matrices whose eigenvalues lie in $[-2,2]$. Since $\phi:O(n) \times {\cal D} \to {\cal S}$ given by $\phi(U,\Lambda) = U \lambda U^T$ is continuous, and $\phi$ is surjective, it follows that ${\cal S}$ is compact.