I've read in a book that every rotation in the $SO(3)$ can be represented by a matrix of the form $\begin{pmatrix} \cos(\theta)&-\sin(\theta)&0 \\ \sin(\theta)&\cos(\theta)&0 \\ 0&0&1 \end{pmatrix}$ for some $\theta$. 

Now $\begin{pmatrix} 1&0&0 \\ 0&-1&0 \\ 0&0&-1 \end{pmatrix}$ is still a rotation and not of the given form. What is wrong with the first representation?