<s>[INST] Determinant of block matrix with equal diagonals 
Let $$Q=\begin{bmatrix}A&B\\-B&A\end{bmatrix}$$ where $A,B\in \mathbb{R}^{n\times n}$. Prove that $$\det(Q)=\det(A^2+B^2)$$ 

Since $A$ and $B$ do not commute, I cannot use Schur's formula. Also, $A$ and $B$ may not be invertible. Any comment or response is appreciated. 
 [/INST] The trick, if $A$ and $B$ were commutative, is to notice that 
$$\begin{bmatrix}A&B\\-B&A\end{bmatrix} \cdot \begin{bmatrix}A&-B\\B&A\end{bmatrix}=\begin{bmatrix}A^2+B^2&0\\0&A^2+B^2\end{bmatrix},$$
which I will refer to as $Q\cdot Q^\top = D$. It is true that $\det(M)=\det(M^\top)$ for any real matrix, so we obtain $\det(D)=\det(Q)^2$. All one has to show now is $\det(D)=\det(A^2+B^2)^2$, which is easy because of the zero block matrices. We conclude $\det(Q)=\pm\det(A^2+B^2)$.
If $A$ and $B$ do not commute, this does not hold in general. A counterexample is given by
$$A=\begin{bmatrix}1&0\\1&1\end{bmatrix},\quad B=\begin{bmatrix}1&1\\0&1\end{bmatrix}.$$
We have $AB=\begin{bmatrix}1&1\\1&2\end{bmatrix}$, $BA=\begin{bmatrix}2&1\\1&1\end{bmatrix}$, $A^2+B^2=\begin{bmatrix}2&2\\2&2\end{bmatrix}$ which yields $\det(A^2+B^2)=0$, but
$$
\det(Q)
=\det\left(\begin{bmatrix}A&B\\-B&A\end{bmatrix}\right)
=\det\left(\begin{bmatrix}1&0&1&1\\1&1&0&1\\-1&-1&1&0\\0&-1&1&1\end{bmatrix}\right)=1.
$$
</s>