# Simplifying the determinant of a given sparse matrix

I was thinking about how to simplify the determinant in order to obtain the following equality of determinants. i am not seeing a direct connection between the determinants.

$$\det \begin{bmatrix} -1+b_{3} & a_2 & a_1 & 1 & 0 &0&0&0&0\\ b_4+b_1 & a_3-1&a_2&0&1&0&0&0&0\\ b_5+b_2&a_4+a_1&a_3-1&0&0&1&0&0&0\\ b_6&a_5&a_4&-1&0&0&1&0&0\\ b_7&a_6&a_5&0&-1&0&0&1&0\\ b_8&a_7&a_6&0&0&-1&0&0&1\\ b_9&a_8&a_7&0&0&0&-1&0&0\\ 0&a_9&a_8&0&0&0&0&-1&0\\ 0&0&a_9&0&0&0&0&0&-1 \end{bmatrix} = \det \begin{bmatrix} a_1+a_4+a_7 & -1+a_3+a_6+a_9 & b_2+b_5+b_8\\ a_2+a_5+a_8 & a_1+a_4+a_7 & -1+b_3+b_6+b_9\\ -1+a_3+a_6+a_9 & a_2+a_5+a_8&b_1+b_4+b_7\end{bmatrix}$$

I think some row and column operations might be needed. also, any idea how to show this in general?

This is similar to the question: Simplifying the determinant of a matrix.

The matrix $$M=\begin{pmatrix} -1 & 0 &0 &1 & 0 & 0 &\cdots \\ 0& -1 & 0 &0 &1 & 0 &\cdots \\ 0&0&-1 & 0 &0 &1 &\cdots \\ 0&0&0&-1 & 0 &0 &\cdots \\ 0&0&0&0&-1 & 0 &\cdots \\ 0&0&0&0&0&-1&\cdots \\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\ddots \end{pmatrix}$$ is the matrix with entries $$M_{i,j} = -\delta_{i,j}+\delta_{i,j-3}$$ and has an explicit inverse $$M^{-1}=\begin{pmatrix} -1 & 0 &0 &-1 & 0 & 0 &-1&\cdots \\ 0& -1 & 0 &0 &-1 & 0 &0&\cdots \\ 0&0&-1 & 0 &0 &-1 &0&\cdots \\ 0&0&0&-1 & 0 &0 &-1&\cdots \\ 0&0&0&0&-1 & 0 &0&\cdots \\ 0&0&0&0&0&-1&0&\cdots \\ 0&0&0&0&0&0&-1&\cdots \\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\ddots \end{pmatrix}$$ i.e. $$(M^{-1})_{i,j} = -(\delta_{i,j}+\delta_{i,j-3}+\delta_{i,j-6}+...)=-\sum_{s\geq 0}\delta_{i,j-3s}.$$ This can be checked in many ways, for instance by a direct computation of the matrix product. Another hint for this formula for the inverse matrix is given below (see the Additional comment below).
Once this is settled, we have to compute the determinant of $$M+N$$ where $$N$$ is an arbitrary matrix with only the first three columns different from zero, let me call it $$N=\begin{pmatrix}a_1&b_1&c_1&0&0&\cdots\\ a_2&b_2&c_2&0&0&\cdots\\ a_3&b_3&c_3&0&0&\cdots\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots\end{pmatrix}.$$ Hence, $$\det (M+N)=\det(M)\det(I+M^{-1}N).$$ Now, $$\det M=(-1)^n$$ (calling $$n$$ the size of the matrices under consideration), and the matrix $$M^{-1}N$$ has the same structure as $$N$$, in the sense that its only nonzero columns are the 1st, 2nd, and 3rd ones, for the sake of giving a name to its entries let us denote it as $$M^{-1}N=\begin{pmatrix}A_1&B_1&C_1&0&0&\cdots\\ A_2&B_2&C_2&0&0&\cdots\\ A_3&B_3&C_3&0&0&\cdots\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots\end{pmatrix}$$ so that (and here's the crucial step where we reduce it to a $$3\times 3$$ determinant) $$\det(I+M^{-1}N) = \det\begin{pmatrix}1+A_1&B_1&C_1\\ A_2&1+B_2&C_2\\ A_3&B_3&1+C_3\end{pmatrix}$$ and it remains to compute $$A_i,B_i,C_i$$ for $$i=1,2,3$$. This is done using the explicit expression for $$M^{-1}$$, yielding \begin{align} A_1&=-a_1-a_4-a_7-...=-\sum_{s\geq 0}a_{1+3s}, & B_1&=-b_1-b_4-b_7-...=-\sum_{s\geq 0}b_{1+3s}, \\ C_1&=-c_1-c_4-c_7-...=-\sum_{s\geq 0}c_{1+3s}, \\ A_2&=-a_2-a_5-a_8-...=-\sum_{s\geq 0}a_{2+3s}, & B_2&=-b_2-b_5-b_8-...=-\sum_{s\geq 0}b_{2+3s}, \\ C_2&=-c_2-c_5-c_8-...=-\sum_{s\geq 0}c_{2+3s}, \\ A_3&=-a_3-a_6-a_9-...=-\sum_{s\geq 0}a_{3+3s}, & B_3&=-b_3-b_6-b_9-...=-\sum_{s\geq 0}b_{3+3s}, \\ C_3&=-c_3-c_6-c_9-...=-\sum_{s\geq 0}c_{3+3s}. \end{align} (Here we set $$a_j:=0,b_j:=0,c_j:=0$$ for all $$j>n$$.) With some elementary manipulation and matching of the parameters $$a_i,b_i,c_i$$ in the question this is the $$3\times 3$$ determinant given in the question.
Additional comment about $$M$$ and $$M^{-1}$$. Let $$\mathcal R$$ be the quotient of the ring of polynomials in one variable $$x$$ by the ideal generated by $$x^n$$. Then, $$M$$ represents the linear transformation of $$\mathcal R$$ induced by multiplication by $$x^3-1$$, with respect to the monomial basis. The element $$x^3-1$$ is invertible in the ring $$\mathcal R$$, with inverse $$-1-x^3-x^6-\cdots$$ (it is a finite sum due to the definition of $$\mathcal R$$). Multiplication by this element is represented by the matrix $$M^{-1}$$.