For a block diagonal matrix $\operatorname{diag}(B_1,\ldots,B_k)$ with square blocks, the determinant is $\prod_i\det B_i$. The same product rule holds for block upper or lower triangular matrices with square diagonal blocks. Off-diagonal blocks need not be zero in the triangular case.