How can I find the determinant of this $2\times 2$ block matrix directly?

I wish to explicitly compute the determinant of $$K = \begin{pmatrix} I & A \\ B & 0 \end{pmatrix}$$ where $$A,B$$ are $$n\times n$$ matrices and $$I$$ is the $$n\times n$$ identity, using the permutation definition. If I write $$\det K = \sum_{\sigma\in S_{2n}} \text{sgn}(\sigma) \prod_{i=1}^{2n} k_{i,\sigma(i)},$$ then you can check that if $$\sigma(i) > n$$ for some $$i>n$$, then the product is zero, so we only care about permutations $$\sigma$$ that factorise as $$\sigma=\sigma_1\sigma_2$$, where $$\sigma_1$$ maps $$\{1,2,\dots, n\}$$ to $$\{n+1 , n+2, \dots, 2n\}$$ and $$\sigma_2$$ maps $$\{n+1, n+2, \dots 2n\}$$ to $$\{1,2,\dots,n\}$$.

For each $$\sigma_1$$, I can construct a permutation $$f(\sigma_1)$$ of $$\{1,2,\dots, n\}$$ by $$f(\sigma_1)(t) = \sigma_1(t) - n$$, and $$f$$ is a bijection from all such $$\sigma_1$$ to $$S_n$$. Similarly, I can a bijection $$g$$ mapping possible $$\sigma_2$$ to the permutations of $${n+1,\dots, 2n}$$, and $$\text{sgn}(\sigma_1\sigma_2) = \text{sgn}(g(\sigma_1))\text{sgn}(f(\sigma_2)).$$ So

$$\det K = \sum_{\sigma_1} \sum_{\sigma_2} \text{sgn}(f\sigma_1) \text{sgn}(g\sigma_2) \prod_{i=1}^{n} k_{i,\sigma_1(i)} \prod_{i=n+1}^{2n} k_{i,\sigma_2(i)} = \left( \sum_{\sigma_1} \text{sgn}(f\sigma_1) \prod_{i=1}^{n} k_{i,f\sigma_1(i)} \right) \left( \sum_{\sigma_2} \text{sgn}(g\sigma_2) \prod_{i=n+1}^{2n} k_{i,g\sigma_2(i)} \right).$$

But this is just $$\det A\cdot \det B$$, and I know that the answer is $$\det K = -\det A \cdot \det B$$. Where have I gone wrong?

• Are you sure that the answer you "know" is correct? Shouldn't the sign be $(-1)^n$? Also, I think your final product formula has errors in it. You should end up with $\text{sgn}\,f$ and $\text{sgn}\,g$ pulling out of the correct formula, no? Commented Nov 11, 2023 at 18:05
• @TedShifrin I was told that the answer was correct since one can transform $$\begin{pmatrix} I & A \\ B & 0 \end{pmatrix}$$ to $$\begin{pmatrix} I & A \\ 0 & -AB \end{pmatrix}$$ by subtracting the relevant multiple of each of the top $n$ rows from each of the bottom $n$ to 'clear out' the entries of $B$. I'm not sure what you mean by 'pulling out of' in your final comment.
– RDL
Commented Nov 11, 2023 at 18:34
• In general, $\det(-A) = (-1)^n \det(A) \color{red}{\neq} -\det(A)$. Commented Nov 11, 2023 at 18:36
• I say you should have $\text{sgn}\,f \sum \text{sgn}\,\sigma_1\prod k_{i\sigma_1(i)}$, for example. You surely do not want the $f\sigma_1$ messing up the entries of the matrix. (Here you think of $f$ and $g$ as elements of $S_{2n}$.) Commented Nov 11, 2023 at 18:39
• $$\begin{pmatrix} I & A \\ B & 0 \end{pmatrix} \begin{pmatrix} I & -A \\ 0 & I \end{pmatrix} = \begin{pmatrix} I & 0 \\ B & -AB \end{pmatrix}$$ and the determinant of the middle matrix, which is genuinely upper triangular (not just as blocks), is one. Commented Nov 11, 2023 at 18:50

Accounting for misbracketing and the fact that $$\det(-A) \not\equiv \det A$$, the steps above lead to the right solution. Thanks to those who commented.