The set of traces of orthogonal matrices is compact 
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.
 A: 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.
A: The orthogonal matrices are compact, as I show below. The trace function is continuous, so the image of the orthogonals under this function must be compact as well. 
To see that the orthogonals are compact, first note that the condition $A^TA = I$ is a closed condition. It is the preimage of a single point (closed) under a continuous map, as long as you define the continuous map properly. Further, they are bounded, since their columns are all of norm one.
A: Hint: To show that $A$ is orthogonal, consider $\lim_{n \to \infty} \left\| A_n^TA_n - I \right\|$, noting that the function
$$
f(X) = \left\| X^TX - I \right\|
$$
is continuous.
