Let $A, B, C, D$ be square matrices on a field $K$. I know that if $\det D\neq 0$ and $CD=DC$ then the following holds: $$\begin{vmatrix}A& B\\C& D\end{vmatrix}=|AD-BC|.$$
Question is: Can we remove the $\det D\neq 0$ hypothesis? I have tested it on a large class of $4\times 4$ matrices and I think so, but I'm having trouble proving it.
You can look at $$f(t):=\det\begin{bmatrix}A+t\,I&B\\C&D+t\,I\end{bmatrix}\,,$$ as an element of $K(t)$, where $I$ is the identity matrix. Clearly, $D+tI$ is invertible over $K(t)$, and commutes with $C$, whence $$f(t)=\det\big((A+t\,I)(D+t\,I)-BC\big)\,.$$ However, the evaluation $f(0)$ gives the required result. Therefore, $$\det\begin{bmatrix}A&B\\C&D\end{bmatrix}=f(0)=\det(AD-BC)\,.$$