Solution (source code)

= Solution

<Matrix multiplication> is associative, so
$$
(AB)(B^{-1}A^{-1})=A(BB^{-1})A^{-1}=I,\qquad
(B^{-1}A^{-1})(AB)=B^{-1}(A^{-1}A)B=I.
$$
The uniqueness of the <matrix inverse> then gives
$$
\boxed{(AB)^{-1}=B^{-1}A^{-1}.}
$$
The order is reversed; $A^{-1}B^{-1}$ does not generally work because <matrix multiplication> need not be commutative.