A problem on matrices : Powers of a matrix 
If $ A=
        \begin{bmatrix}
        i & 0 \\
        0 & i \\
        \end{bmatrix}
, n \in \mathbb N$, then $A^{4n}$ equals?

I guessed the answer as $ A^{4n}=
        \begin{bmatrix}
        i^{4n} & 0 \\
        0 & i^{4n} \\
        \end{bmatrix}
=\begin{bmatrix}
        1 & 0 \\
        0 & 1 \\
        \end{bmatrix}$ which actually was the answer. 
Can you provide me with the correct method of getting the answer?
 Thank you.
 A: you can see $A^2=\begin {pmatrix}i^2&0\\0&i^2 \end{pmatrix}$
you assume that it satisfy fo n-1 so :
$A^{n-1}=\begin {pmatrix}i^{n-1}&0\\0&i^{n-1} \end{pmatrix}$
then :
$A^n=A*A^{n-1}=\begin {pmatrix}i^n&0\\0&i^n \end{pmatrix}$
A: Well you're in luck because what you did actually work with diagonal matrices. Let's look at an example :
Let $A = \begin{bmatrix}
        a & 0 \\
        0 & b \\
        \end{bmatrix}$ be a diagonal matrix then $ A^{2}=
        \begin{bmatrix}
        a & 0 \\
        0 & b \\
        \end{bmatrix}
\begin{bmatrix}
        a & 0 \\
        0 & b \\
        \end{bmatrix} = \begin{bmatrix}
        a^2& 0 \\
        0 & b^2 \\
        \end{bmatrix}$ and more generally :
$$A^n = \begin{bmatrix}
        a^n & 0 \\
        0 & b^n \\
        \end{bmatrix}$$
So you guess wasn't wrong at all, it's just that when you have a diagonal matrix, raising it to a power $n$ equals to raising each of it's coefficients to the power $n$.
But keep in mind that this only works for diagonal matrices. If you have a matrix $B$ that is not diagonal, the best way to find $B^n$ is to diagonalize it (if possible), raise it's coefficients to the power $n$ and go back to your first basis.
A: Since $A=iI$ and scalars commute with matrices you get
$$A^{4n}=(i)^{4n}I^{4n}=I \,.$$ 
A: Isn't it enough to show $A^4=I$ ?
