Solution (source code)

= Solution

For the <determinant of a complex block representation>, put
$$
M=\begin{pmatrix}A&-B\\B&A\end{pmatrix},\qquad
T=\begin{pmatrix}I&I\\-iI&iI\end{pmatrix}.
$$
The <change-of-basis matrix> $T$ is invertible, and direct block multiplication gives
$$
MT=T\begin{pmatrix}A+iB&0\\0&A-iB\end{pmatrix}.
$$
Thus $T^{-1}MT$ is block diagonal. Using <multiplicativity of the determinant> and the preceding block formula,
$$
\boxed{\det M=\det(A+iB)\det(A-iB).}
$$
The identity follows from this constant change of basis for arbitrary complex $A,B$.