TITLE: The set of traces of orthogonal matrices is compact
QUESTION [8 upvotes]: Is the following set compact: $$M = \{ \operatorname{Tr}(A) : A \in M(n,\mathbb R) \text{ is orthogonal}\}$$ where $\operatorname{Tr}(A) $ denotes the trace of $A$?

In order to be compact $M$ has to be closed and bounded.
$\|A\|=\sqrt {\sum_{i,j} {a_{ij}}^2}=\sqrt n $ and hence bounded. So $\operatorname{Tr}(A)<\sqrt n $. Hence $M$ is bounded.
Now we have to prove that $M$ is closed. Let $\operatorname{Tr}(A_n)$ be a sequence of matrices converging to $\operatorname{Tr}(A)$ where $A_n$ is a sequence of orthogonal matrices. The only thing remaining to show is that $A$ is orthogonal.

REPLY [7 votes]: Besides using compactness of the set of orthogonal matrices, you can show directly that the set of possible traces is $[-n,n]$.   Note that $I$ and $-I$ are orthogonal with $\text{Tr}(I) = n$ and $\text{Tr}(-I) = -n$.
On the other hand, each matrix element of an orthogonal matrix has absolute value at most $1$, so $\text{Tr}(T) = \sum_{i=1}^n T_{ii}$ has absolute value at most $n$.  
To get orthogonal matrices with every trace value from $-n$ to $n$, consider those made from diagonal blocks of the form
$$\pmatrix{\cos \theta & \sin \theta\cr -\sin \theta & \cos\theta}$$
with an additional diagonal entry of $+1$ or $-1$ in case $n$ is odd.