Is there a formula to compute the determinant of block tridiagonal matrices when the determinants of the involved matrices are known?


In particular, I am interested in the case


$$A = \begin{pmatrix} J\_n & I\_n & 0 & \cdots & \cdots & 0 \\ I\_n & J\_n & I\_n & 0 & \cdots & 0 \\ 0 & I\_n & J\_n & I\_n & \ddots & \vdots \\ \vdots & \ddots & \ddots & \ddots & \ddots & 0 \\ 0 & \cdots & \cdots & I\_n & J\_n & I\_n \\ 0 & \cdots & \cdots & \cdots & I\_n & J\_n \end{pmatrix}$$


where $J\_n$ is the $n \times n$ tridiagonal matrix whose entries on the sub-, super- and main diagonals are all equal to $1$ and $I\_n$ is identity matrix of size $n$.


I have [asked this question before](https://math.stackexchange.com/q/1307671) on MathStackExchange, where a user came up with an algorithm. Nevertheless, I am interested if there is an explicit formula (or at least, if one can say in which cases the determinant is nonzero).



Determinant of block tridiagonal matrices
The Kronecker product idea brought up in Algebraic Pavel's comment on the original maths stack exchange question seems like a good way to approach the particular case of interest to you. Specifically, assuming $A$ is $m n \times m n$, i.e., there are $m$ block rows and columns, then
$$A = J\_m \otimes I\_n + I\_m \otimes J\_n - I\_{mn},$$
and the $mn$ eigenvalues of $A$ are given by
$$\lambda\_{ij} = \Big(1+2 \cos \frac{i \pi}{m+1}\Big) + \Big(1+2 \cos \frac{j \pi}{n+1}\Big) - 1, \qquad 1 \le i \le m, 1 \le j \le n.$$
(I used the formula for the eigenvalues of the $J$ matrices from Denis Serre's answer here.) The determinant is then
$$\det A = \prod\_{i=1}^m \prod\_{j=1}^n \lambda\_{ij}.$$
If you're only after characterizing when $A$ is singular, then you need only determine when any of the $\lambda\_{ij}$ can be zero, which looks fairly straightforward.


