TITLE: Powering a sum of two easily powered matrices
QUESTION [5 upvotes]: I am currently studying matrices and in order to understand them better I want to know why I can't  do certain things in my calculations. This question is just about that.
The task is to calculate $A^n$ if 
$$
        A=\begin{bmatrix}
        a & b \\
        0 & c \\
        \end{bmatrix}
$$
I started of by calculating smaller powers, $A^2$, $A^3$, but I did not recognize the pattern at first. I tried an alternative approach, writing the matrix in a form of a sum of two matrices that will be easier do power.
$
        A=\begin{bmatrix}
        a & 0 \\
        0 & c \\
        \end{bmatrix} $ $ +\begin{bmatrix}
                            0 & b \\
                            0 & 0 \\
                            \end{bmatrix} 
$
Let's denote these matrices as $C=\begin{bmatrix}
        a & 0 \\
        0 & c \\
        \end{bmatrix} $  and $D=\begin{bmatrix}
                            0 & b \\
                            0 & 0 \\
                            \end{bmatrix} $
When we apply Binomial Theorem, we get:
$$A^n = (C+D)^n=\binom{n}{0}C^n + \binom{n}{1}C^{n-1}D + \binom{n}{2}C^{n-2}D^2 \dots + \binom{n}{n-1}CD^{n-1} + \binom{n}{n}D^n  $$
I tested powering both $C$ and $D$ for smaller powers to see if there is a pattern. As it turns out:
$C^n = \begin{bmatrix}
        a^n & 0 \\
        0 & c^n \\
        \end{bmatrix}$ and
$  D^n = \begin{bmatrix}
                            0 & 0 \\
                            0 & 0 \\
                            \end{bmatrix}$
Every matrix multiplied by zero-matrix $O$ is equal to zero, which leaves us with:
$$A^n = C^n  $$
which is not the correct solution to the problem.
What interests me is: which step did I do wrong and why ? I am aware that it would have been easier to recognize the pattern before turning to Binomial Theorem, but I want to know why is this particular method of solving wrong.

REPLY [3 votes]: When applying the binomial theorem in this way you are assuming that the two matrices commute. The usual proof of that theorem for real numbers freely interchanges $x$ and $y.$

REPLY [3 votes]: The binomial formula is only true for elements that commute, which is not the case of your two matrices.