That's in fact due to matrix decomposition. If a matrix M can be written as $M=CDC^{-1}$ with D being diagonal and C being invertible then for any power $n$ of $M$ we have:
$M^{n}=M*M*M*...*M$ (ntimes). Replacing the decomposition we have: $M^{n}=CDC^{-1}CDC^{-1}...CDC^{-1}$. Since $CC^{-1}=I$ by consecutive operation we have $M^{n}=CD^{n}C^{-1}$ in which $D^{n}$ has been defined to be extracted form diagonal $D$ by power affecting on diagonal entries.
That's in fact due to matrix decomposition. If a matrix M can be written as $M=CDC^{-1}$ with D being diagonal and C being invertible then for any power $n$ of $M$ we have: $M^{n}=M*M*M*...*M$ (ntimes). Replacing the decomposition we have: $M^{n}=CDC^{-1}CDC^{-1}...CDC^{-1}$. Since $CC^{-1}=I$ by consecutive operation we have $M^{n}=CD^{n}C^{-1}$ in which $D^{n}$ has been defined to be extracted form diagonal $D$ by power affecting on diagonal entries.