A Matrix $A$ that $A^2$ is not I, but $A^4 = I$ I am studying linear algebra in school, and I came across this problem: Find A $\in$ $M_2$($\mathbb{R}$) which satisfies $A^4$ = I but $A^2\neq $I. I'm not really sure how to approach it. A programatic way to solve this would be much help. 
 A: Hint : Find some $A$ such that $A^2 = - I$. Since we are in $\mathbb{M}_2$ you can either guess it or try and calculate it!
A: Rotation matrices of the form $$R_\theta=\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}$$ can offer answers to the problem of finding $A$ such that $A^n=I$ but $A^k\neq I$ for any $k<n$ by taking $\theta=\frac{2\pi}n$ because of the fundamental property
$$R_\theta R_\phi=R_{\theta+\phi}.$$
So in you case ($n=4$) simply take $R_{\pi/2}=\begin{pmatrix}0&-1\\1&0\end{pmatrix}$. 
A: Given $$A^2=-I$$ and since $A$ is $2 \times 2$ matrix, its characteristic equation is of the form:
$$A^2-Tr(A)A+|A|I=O$$ $\implies$
$$-I-Tr(A)A+|A|I=O$$
since $A^2=-I$ ,$|A|=+1$ OR $|A|=-1$ . If $|A|=-1$ we get $A$ with complex entries which are $$ \pm\begin{bmatrix}
i & 0\\0 & i\end{bmatrix}$$ 
If we choose $|A|=1$, Then
$$-Tr(A)A=O$$ which is possible only if $Tr(A)=0$
Hence $A$ will be of the form $$A=\begin{bmatrix} x & a \\ b & -x \end{bmatrix}$$ and since $|A|=1$ we have $$x^2+ab=-1$$ now we can randomly choose values of $x$,$a$ and $b$.
Say $x=2$, $a=1$ and $b=-5$ so
$$A=\begin{bmatrix} 2 & 1 \\ -5 & -2 \end{bmatrix}$$
