I need to find the inverse of a sparse square matrix that has the following sparsity pattern.
$$\begin{bmatrix} * & * & * & * & * & * & * & * \\ * & * & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & * & * & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & * & * & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & * & * & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & * & * & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & * & * & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & * & * \end{bmatrix}$$
Namely, it has non-zero entries only on:
the main diagonal,
the second diagonal under the main one,
the first row.
Everything else is just zero. The matrix is an $n \times n$, full-rank, and well-defined matrix.
The problem I am working on actually requires more general sparse patterns, which means I will probably end up working with some approximation methods to find the inverse. But, for the pattern I have now, I would like to explore the possibility of finding an exact inverse.
Denote the $22$ entries of the matrix $M\in M_8(K)$, for the stars, from left to right as $a_1,a_2,\ldots ,a_{22}$. Then the determinant is given by $$ \det(M)=a_1a_{10}a_{12}a_{14}a_{16}a_{18}a_{20}a_{22} - a_{11}a_{13}a_{15}a_{17}a_{19}a_{21}a_8a_9 + a_{11}a_{13}a_{15}a_{17}a_{19}a_{22}a_7a_9 - a_{11}a_{13}a_{15}a_{17}a_{20}a_{22}a_6a_9 + a_{11}a_{13}a_{15}a_{18}a_{20}a_{22}a_5a_9 - a_{11}a_{13}a_{16}a_{18}a_{20}a_{22}a_4a_9 + a_{11}a_{14}a_{16}a_{18}a_{20}a_{22}a_3a_9 - a_{12}a_{14}a_{16}a_{18}a_2a_{20}a_{22}a_9. $$ Accordingly the inverse matrix can be computed explicitly, but it will have huge polynomials in the entries in general (divided by the determinant). Of course it can be computed by any computer algebra system. For example, the upper left entry of $M^{-1}$ is given by (a nice case) $$ \frac{a_{10}a_{12}a_{14}a_{16}a_{18}a_{20}a_{22}}{\det(M)} $$
However, I don't see an easy explicit formula for arbitrary $n\ge 8$.