I'm studying for a PhD qualifying exam in linear algebra and I wanted to ask about the following problem:
Let $A$ and $B$ be invertible $n\times n$ matrices. Let $M$ be the matrix \begin{bmatrix} A & B \\ B^{-1} & A^{-1} \\ \end{bmatrix} Assume that $M$ has rank $n$. Prove that $A$ and $B$ commute.
Here's what I got so far. We know that
$$0 = \det (M) = \det(A) \det \left( A^{-1} - B^{-1} A^{-1} B \right)$$
since $M$ is rank deficient. Since $A$ is invertible, $\det(A)\neq 0 $, so $\det(A^{-1}-B^{-1}A^{-1}B) = 0$.
I would like to somehow conclude that $A^{-1}-B^{-1}A^{-1}B = 0$, which would give the desired result. But I only have that this matrix is singular, not necessarily $0$. Does anyone have any suggestions for what I can try?
Hint. Multiply by $\begin{pmatrix} B & 0\\ 0 & A\end{pmatrix}$.
Solution (spoilerised, in case you would like to try the hint first).