TITLE: Compute the $n$-th power of triangular $3\times3$ matrix
QUESTION [26 upvotes]: I have the following matrix
$$
\begin{bmatrix}
1 & 2 & 3\\
0 & 1 & 2\\
0 & 0 & 1
\end{bmatrix}
$$
and I am asked to compute its $n$-th power (to express each element as a function of $n$). I don't know at all what to do. I tried to compute some values manually to see some pattern and deduce a general expression but that didn't gave anything (especially for the top right). Thank you.

REPLY [7 votes]: Using symmetry, write the recurrence relation
$$\begin{pmatrix}
  a_{n+1} & b_{n+1}&c_{n+1}\\
  0 & a_{n+1} & b_{n+1}\\
  0 & 0 &a_{n+1}
 \end{pmatrix}=
\begin{pmatrix}
  1 & 2&3\\
  0 & 1 & 2\\
  0 & 0 &1
 \end{pmatrix}
\begin{pmatrix}
a_{n} & b_{n}&c_{n}\\
  0 & a_{n} & b_{n}\\
  0 & 0 &a_{n} \end{pmatrix}.$$
Then
$$\begin{cases}a_{n+1}=a_n\\
b_{n+1}=b_n+2a_n\\
c_{n+1}=c_n+2b_n+3a_n.\end{cases}$$
We solve with
$$a_n=Cst=1,\\b_n=2(n-1)+Cst=2n,\\
c_n=4t_{n-1}+3(n-1)+Cst=2n^2+n,$$
where $t_n$ denotes a triangular number, using the initial conditions $a_1=1,b_1=2,c_1=3$.