An example of a $4×4$ matrix $A$ such that $A\not= I$, $A^2\not=I$, ..., $A^5 = I$ How do I go about solving this? I went for tutoring and the tutor said I am trying to get to an Identity matrix so I should start with an identity matrix and mix the values around till I get a solution. I have worked on this for 2 hours now and there has to be an easier way. Please help!
 A: The matrix $A_\theta=\begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta\end{bmatrix}$ corresponds to a rotation of $\theta$ radians. Choose $\theta$ such that $A_\theta^5 = I$. Then figure out how to 'expand' $A_\theta$ to be a $4 \times 4$ matrix.
A: One way is to ensure that $A^4+A^3+A^2+A+I=0$. Since $A$ is $4\times 4$, it is actually inevitable to find a non-zero polynomial of degree $4$ satisfied by $A$. Since $A^5-I=0$ but $A-I\ne0$, the polynomial I suggested is simply the factor $x^4+x^3+x^2+x+1$ of $x^5-1$.
An $A$ with this property is $$ \begin{bmatrix} 0&0&0&-1 \\ 1&0&0&-1\\ 0&1&0&-1\\ 0&0&1&-1\end{bmatrix}.$$
In fact, if you want an $n\times n$ matrix $A$ to satisfy a degree $n$ polynomial $$p(x)=a_0+a_1x+\dots+a_{n-1}x^{n-1} +x^n,$$ that is, $p(A)=0$, make $e_{i+1}$ the $i$th column of $A$ for $i<n$, and make the last column $(-a_0,-a_1,\dots,-a_{n-1})^T$.

As mentioned in the comments, this matrix is called the companion of $p$. It has the property that $p(A)=0$, and if $q(A)=0$, then $p$ divides $q$ (as polynomials), that is, $p$ is the minimal polynomial of $A$. 
The Cayley-Hamilton theorem gives us that for any $n\times n$ matrix $B$, we have $r(B)=0$ where $r(x)$ is the characteristic polynomial of $B$, $r(x)=\det(xI-B)$. This is a monic polynomial of degree $n$. In particular, since $p$ has degree $n$ and is monic, we have that $p$ is also the characteristic polynomial of its companion matrix $A$.
To see that $p(A)=0$ we can of course just multiply. But let me show in general that this holds, and that $p$ is the minimal polynomial of $A$: Think about the specific $4\times 4$ example we have, and note that $e_1$, $Ae_1=e_2$, $A^2e_1=Ae_2=e_3$, and $A^3e_1=AA^2e_1=Ae_3=e_4$ are independent, so $A$ cannot satisfy a nonzero polynomial $s(x)=\alpha+\beta x+\gamma x^2+\delta x^3$ of degree $3$ or less, since $$s(A)e_1=(\alpha I+\beta A+\gamma A^2+\delta A^3)e_1=\alpha e_1+\beta e_2+\gamma e_3+\delta e_4 $$ is a nontrivial linear combination of basis vectors. On the other hand, $$A^4e_1=Ae_4=-e_1-e_2-e_3-e_4=-e_1-Ae_1-A^2e_1-A^3e_1, $$ so
 $$ p(A)e_1=(A^4+A^3+A^2+A+I)e_1=0. $$
Also, $p(A)e_2=p(A)Ae_1=Ap(A)e_1=A0=0$, and similarly $p(A)e_3=p(A)e_4=0$. But then $p(A)v=0$ for any $v$ that is a linear combination of $e_1,\dots,e_4$, that is, for any $v$, and therefore $p(A)=0$. 
