<s>[INST] Inverse of special upper triangular matrix Consider the following $n \times n$ upper triangular matrix with a particularly nice structure:
\begin{equation}\mathbf{P} = \begin{pmatrix}
1 & \beta & \alpha+\beta & \dots & (n-3)\alpha + \beta & (n-2)\alpha + \beta\\
0 & 1 & \beta & \dots & (n-4)\alpha + \beta & (n-3)\alpha + \beta\\
0 & 0 &     1 & \dots & (n-5)\alpha + \beta & (n-4)\alpha + \beta\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\
0 & 0 & 0 & \dots & \beta & \alpha+\beta\\
0 & 0 & 0 & \dots & 1 & \beta\\
0 & 0 & 0 & \dots & 0 & 1
\end{pmatrix}
\end{equation}
i.e. 
\begin{equation}
p_{i,j}=\begin{cases}
0, &i>j,\\
1, &i=j,\\
(j-i-1)\alpha+\beta, &i<j.
\end{cases}
\end{equation}
Would it be possible to find an explicit expression for the elements of the inverse of $\mathbf{P}$?
 [/INST] Let $A$ be the nilpotent matrix $$\begin{pmatrix}0 & 1 & 1 & \cdots & 1 \\ & 0 & 1 & \cdots & 1 \\ & & \cdots & \cdots & \cdots \\ & & & 0 & 1 \\ & & & & 0\end{pmatrix},$$ then the matrix $P$ is equal to $1 + \beta A + \alpha A^2$.
This gives the inverse: \begin{eqnarray*}P^{-1} & = & (1 + \beta A + \alpha A^2)^{-1} \\ & = & (1 - \lambda A)^{-1} (1 - \mu A)^{-1} \\ & = & \sum_{k \geq 0} \frac{\lambda^{k + 1} - \mu^{k + 1}}{\lambda - \mu} A^k,\end{eqnarray*} where $\lambda$ and $\mu$ are the two roots of the equation $x^2 + \beta x + \alpha = 0$. Since we have $A^n = 0$, the sum essentially ranges through $0 \leq k < n$.
</s>