Is the trace set of orthogonal matrix compact? 
Show that $$T = \{ \mbox{tr} (A) : A \in O_n (\mathbb{R}) \}$$ is compact.

I tried to show this set is compact. I could not. Any hint would suffice. Thanks in advance.
 A: The trace is a continuous function (this should be obvious). The orthogonal group is compact (one can easily check that it is closed and bounded). Since continuous functions map compact sets to compact sets, the result follows.
A: Consider the inner product $\langle A,B \rangle=tr(AB^t)$ in $M_{n}(\mathbb{R})$. If $A$ is orthogonal then $AA^t=Id_{n}$ and $|tr(A)|=|tr(A Id_n)|\leq\sqrt{tr(AA^t)}\sqrt{tr(IdId^t)}=tr(Id)=n$.
Thus, your set $T$ is a subset of $[-n,n]$. Now, let's see tha $T=[-n,n]$.
If $n$ is even. Consider the following matrix in $O_n(\mathbb{R})$:
$A_n(\theta)= \begin{pmatrix}cos(\theta)&-sin(\theta)&0&0&\ldots&0&0\\
sin(\theta)&cos(\theta)&0&0&\ldots&0&0\\
0&0&cos(\theta)&-sin(\theta)&\ldots&0&0\\
0& 0& sin(\theta)&cos(\theta)&\ldots&0&0\\
\vdots&\vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\
0&0&0&0&\ldots&cos(\theta)&-sin(\theta)\\
0& 0& 0& 0&\ldots&sin(\theta)&cos(\theta)\\
\end{pmatrix}$
Notice that $tr(A_{n}(\theta))=ncos(\theta)$. Since $-1\leq cos(\theta)\leq 1$ then $-n\leq tr(A_{n}(\theta))\leq n$.
If $n$ is odd. Consider the following matrix in $O_n(\mathbb{R})$:  $B_n(\theta,\pm)=\begin{pmatrix}A_{n-1}(\theta)& 0_{n-1\times 1}\\
0_{1\times n-1} & \pm 1\end{pmatrix}$.
Notice $-n+2=-(n-1)+1\leq tr(B_n(\theta,+))\leq (n-1)+1=n$ and $-n=-(n-1)-1\leq tr(B_n(\theta,-))\leq (n-1)-1=n-2$.
Thus, $T=[-n,n]$.
