# Determinant of a block matrix with entries on the diagonal, right above the diagonal and corner

I am currently trying to take the determinant of a block matrix on the form $$\left[\begin{matrix} I & K_1 & 0 & 0 & \cdots & 0&0 \\ 0 & I & K_2 & 0 & \cdots & 0 & 0 \\\vdots &\vdots&\vdots&\ddots &&\vdots&\vdots \\0&0&0&0&\cdots&I&K_{N-1} \\K_N&0&0&0&\cdots&0&I\end{matrix}\right]$$ where $$I$$ is an $$M \times M$$ identity matrix, and $$K_i$$ are almost tridiagonal $$M\times M$$ matrices, but which also have entries in the top right and bottom left corners. $$K_i=\left[\begin{matrix} \eta_{i,1} & \eta_{i,2}Q_{i,1} & 0 & 0 & \cdots & 0&\eta_{i,M}Q_{i,M}^* \\ \eta_{i,1}Q_{i,1}^* & \eta_{i,2} & \eta_{i,3}Q_{i,2} & 0 & \cdots & 0 & 0 \\ 0&\eta_{i,2}Q_{i,2}^* & \eta_{i,3} & \eta_{i,4}Q_{i,3} & \cdots & 0 & 0 \\\vdots &\vdots&\vdots&\ddots&&\vdots&\vdots \\0&0&0&0&\cdots&\eta_{i,M-1}&\eta_{i,M}Q_{i,M-1} \\\eta_{i,1}Q_{i,M}&0&0&0&\cdots&\eta_{i,M-1}Q_{i,M-1}^*&\eta_{i,M}\end{matrix}\right]$$ Here, $$Q_{i,j}$$ are complex variables, and $$Q_{i,j}^*$$ denotes complex conjugate. Also, $$\eta_{i,j}$$ are arbitrary real variables. Is there in general any way to find the determinant of such a matrix?

For computing the determinant of your matrix, $$\left[\begin{matrix} I & K_1 & 0 & 0 & \cdots & 0&0 \\ 0 & I & K_2 & 0 & \cdots & 0 & 0 \\\vdots &\vdots&\vdots&\ddots &&\vdots&\vdots \\0&0&0&0&\cdots&I&K_{N-1} \\K_N&0&0&0&\cdots&0&I\end{matrix}\right]$$, an equivalent form can be constructed by subtracting $$K_N \times$$ the first row from the last row, which gives $$\left[\begin{matrix} I & K_1 & 0 & 0 & \cdots & 0&0 \\ 0 & I & K_2 & 0 & \cdots & 0 & 0 \\\vdots &\vdots&\vdots&\ddots &&\vdots&\vdots \\0&0&0&0&\cdots&I&K_{N-1} \\0 &-K_N K_1&0&0&\cdots&0&I\end{matrix}\right]$$ In here, subtract $$-K_N K_1 \times$$ the second row from the last row, which gives $$\left[\begin{matrix} I & K_1 & 0 & 0 & \cdots & 0&0 \\ 0 & I & K_2 & 0 & \cdots & 0 & 0 \\\vdots &\vdots&\vdots&\ddots &&\vdots&\vdots \\0&0&0&0&\cdots&I&K_{N-1} \\0 &0&K_N K_1 K_2&0&\cdots&0&I\end{matrix}\right]$$ Continuing like this leads to $$\left[\begin{matrix} I & K_1 & 0 & 0 & \cdots & 0&0 \\ 0 & I & K_2 & 0 & \cdots & 0 & 0 \\\vdots &\vdots&\vdots&\ddots &&\vdots&\vdots \\0&0&0&0&\cdots&I&K_{N-1} \\0 &0&0&0&\cdots&0&I +(-1)^{N-1}K_N\prod_{j=1}^{N-1} K_j\end{matrix}\right]$$ and the sought determinant of this strict triangular matrix is $$\det( I + (-1)^{N-1} K_N\prod_{j=1}^{N-1} K_j)$$. This can be evaluated with the formula $$\det(I+A) = \sum_{k=0}^M \operatorname{Tr}(\Lambda^{k} A)$$, see here, also for details how to technically proceed. Since $$A = (-1)^{N-1}K_N\prod_{j=1}^{N-1} K_j$$, I wonder if this can be achieved elegantly.