TITLE: Determinant of a $k \times k$ block matrix
QUESTION [15 upvotes]: Consider the $k \times k$ block matrix:
$$C = \left(\begin{array}{ccccc} A & B & B & \cdots & B \\ B & A & B &\cdots & B \\ \vdots & \vdots & \vdots & \ddots & 
\vdots \\ B & B & B & \cdots & A
\end{array}\right) = I_k \otimes (A - B) + \mathbb{1}_k \otimes B$$
where $A$ and $B$ are size $n \times n$ and $\mathbb{1}$ is the matrix of all ones.
It would seem that the formula for the determinant of $C$ is simply:
$$\det(C) = \det(A-B)^{k-1} \det(A+(k-1) B)$$
Can anyone explain why this seems to be true or offer a proof or direct me to a proof?

REPLY [3 votes]: Let us assume that $A-B$ is invertible. Write
$$\begin{array}{rl} C &= \begin{bmatrix} A & B & \ldots & B\\ B & A & \ldots & B\\ \vdots & \vdots & \ddots & \vdots\\B & B & \ldots & A\end{bmatrix}\\\\ &= \begin{bmatrix} A-B & O_n & \ldots & O_n\\ O_n & A-B & \ldots & O_n\\ \vdots & \vdots & \ddots & \vdots\\ O_n & O_n & \ldots & A-B \end{bmatrix} + \begin{bmatrix} B \\ B\\ \vdots \\ B\end{bmatrix} \begin{bmatrix} I_n \\ I_n\\ \vdots \\ I_n\end{bmatrix}^T\\\\ &= (I_k \otimes (A-B)) + (1_k \otimes B) (1_k \otimes I_n)^T\\\\ &= (I_k \otimes (A-B)) \left(I_{nk} + (I_k \otimes (A-B)^{-1}) (1_k \otimes B) (1_k \otimes I_n)^T\right)\end{array}$$
Using Sylvester's determinant identity,
$$\begin{array}{rl} \det (C) &= \det\left((I_k \otimes (A-B)) \left(I_{nk} + (I_k \otimes (A-B)^{-1}) (1_k \otimes B) (1_k \otimes I_n)^T\right)\right)\\\\ &= \det(I_k \otimes (A-B)) \cdot \det \left( I_{nk} + (I_k \otimes (A-B)^{-1}) (1_k \otimes B) (1_k \otimes I_n)^T \right)\\\\ &= \det(I_k \otimes (A-B)) \cdot \det \left( I_{n} + (1_k \otimes I_n)^T (I_k \otimes (A-B)^{-1}) (1_k \otimes B) \right)\\\\ &= \left(\det(A - B)\right)^k \cdot \det \left( I_{n} + k (A-B)^{-1} B \right)\\\\ &= \det((A-B)^k) \cdot \det \left( I_{n} + k (A-B)^{-1} B \right)\\\\ &= \det((A-B)^{k-1}) \cdot \det \left( A-B + k B \right)\\\\ &= (\det(A-B))^{k-1} \cdot \det \left( A + (k-1) B \right)\end{array}$$