<s>[INST] Let $A = \begin{pmatrix} a & b & c \\ 0 & a & b \\ 0 & 0 & a \\ \end{pmatrix} $. Find $A^n$ I am new here so please let me know if I must resentence the exercice. I considered it too short not to include it in the title too.
Let $ A=     \begin{pmatrix}     a & b & c \\     0 & a & b \\     0 & 0 & a \\     \end{pmatrix}$
Find $A^n$
I tried finding the matrix's first 4 or 5 powers and it looks like a pettern can be noticed but I can't seem to find a form for the element on line 3 row 3. I haven't tried using a binomial expansion though, writing the matrix as $$     \begin{pmatrix}     0 & b & c \\     0 & 0 & b \\     0 & 0 & 0 \\     \end{pmatrix}+ a    \begin{pmatrix}     1 & 0 & 0 \\     0 & 1 & 0 \\     0 & 0 & 1 \\     \end{pmatrix} $$
the second one being the identity matrix times $a.$
 [/INST] Let $X=aI,Y=bJ$ and $Z=cJ^2$, where $J$ denotes the $3\times3$ nilpotent Jordan block. Then $X,Y,Z$ commute. Since $J^3=0$, among all degree-$n$ monomials of them, only $X^n,\,X^{n-1}Y,\,X^{n-1}Z$ and $X^{n-2}Y^2$ are nonzero. It follows that
\begin{aligned}
A^n
&=(X+Y+Z)^n\\
&=X^n+nX^{n-1}Y+nX^{n-1}Z+\binom{n}{2}X^{n-2}Y^2\\
&=\pmatrix{a^n&na^{n-1}b&na^{n-1}c+\binom{n}{2}a^{n-2}b^2\\ 0&a^n&na^{n-1}b\\ 0&0&a^n}.
\end{aligned}
</s>