The matrix
[tex]A=\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}[/tex]
has eigenvalues [tex]\lambda[/tex] such that
[tex]\det(A-\lambda I)=\begin{vmatrix}\cos\theta-\lambda&-\sin\theta\\\sin\theta&\cos\theta-\lambda\end{vmatrix}=0[/tex]
[tex](\cos\theta-\lambda)^2+\sin^2\theta=0[/tex]
[tex](\cos\theta-\lambda)^2=-\sin^2\theta[/tex]
[tex]\cos\theta-\lambda=\pm\sqrt{-\sin^2\theta}[/tex]
[tex]\lambda=\cos\theta\pm\sqrt{-\sin^2\theta}[/tex]
[tex]\sin^2\theta\ge0[/tex] for all values of [tex]\theta[/tex], so we need to have [tex]\sin\theta=0[/tex] in order for [tex]\lambda[/tex] to be real-valued. This happens for
[tex]\sin\theta=0\implies\theta=n\pi[/tex]
where [tex]n[/tex] is any integer, and over the given interval we have [tex]\theta=0[/tex] and [tex]\theta=\pi[/tex].