<s>[INST] If all eigenvalues are 1 or -1, is then $A^{12}=I$? True or false: If all the eigenvalues of A are either $\lambda=1$ or $\lambda = -1$ then $A^{12}$= I
If we have a matrix $$\mathbf A = \begin{pmatrix}1&0\\0&-1\end{pmatrix}$$ this has eigenvalues of 1 or -1 then $$\mathbf A = \begin{pmatrix}\lambda-1&0\\0&\lambda+1\end{pmatrix}$$ and if we plug in $\lambda=1 $ $$\mathbf A = \begin{pmatrix}0&0\\0&2\end{pmatrix}$$ So $A^{12}$ $\neq$ I  
Is this a correct way of proving this is false?
 [/INST] Compute powers of the matrix $A$, where
$$A=\begin{pmatrix} 1 & 1\\0&1\end{pmatrix}.$$
You will find that 
$$A^n=\begin{pmatrix} 1 & n\\0&1\end{pmatrix}.$$
Remark: If a $2\times 2$ matrix $A$ has both $1$ and $-1$ as eigenvalues, then we will have $A^2=I$. But we can find a $3\times 3$ matrix that has both $1$ and $-1$ as eigenvalues such that $A^n\ne I$ for all positive integers $n$. 
</s>