So I was stuck with the famous Sylvester's determinant identity and don't know how to correctly interpret the difference between the sizes of identity matrices $I_m$ and $I_n$. The line that I dont' understand is: $$\det(I_m) \det(I_n - B I_m^{-1} (-A)) = \det(I_n + BA).$$
I understand that $\det(I_m) = 1$ but what if we rewrite it in the form: $$\det(I_m) \det(I_n - B I_m^{-1} (-A)) = \det(I_mI_n - B I_m I_m^{-1} (-A)).$$
Do we have any right to multipy $I_m$ by $I_n$? Maybe there is a special property of matrix block determinants? Which part am I missing?
It looks like the question you asked was not the question you really intended to ask. Consider $$\pmatrix{I_m&-A\\B&I_n}=\pmatrix{I_m&O\\B&I_n}\pmatrix{I_m&O\\O&I_n+BA} \pmatrix{I_m&-A\\O&I_n}.$$ Take determinants. As two of three matrices on the right are triangular with $1$s on the diagonal, they have determinant $1$. Thus $$\det\pmatrix{I_m&-A\\B&I_n}=\det\pmatrix{I_m&O\\O&I_n+BA}.$$ But that's a block diagonal matrix, with determinant $\det (I_n)\det(I_n+BA) =\det(I_n+BA)$.