![A = \begin{bmatrix}1&2\\1&1\end{bmatrix} \implies A^(-1) = \frac1{\det(A)}\begin{bmatrix}1&-1\\-2&1\end{bmatrix} = \begin{bmatrix}-1&1\\2&-1\end{bmatrix}](https://img.qammunity.org/2022/formulas/mathematics/high-school/49kyxkoouc6eiz0rytza0oy5g5dygylhcp.png)
where det(A) = 1×1 - 2×1 = -1.
![B = \begin{bmatrix}0&-1\\1&2\end{bmatrix} \implies B^(-1) = \frac1{\det(B)}\begin{bmatrix}2&1\\-1&0\end{bmatrix} = \begin{bmatrix}2&1\\-1&0\end{bmatrix}](https://img.qammunity.org/2022/formulas/mathematics/high-school/60enq8qwmjeygd04n37y7y43pg23n7j10r.png)
where det(B) = 0×2 - (-1)×1 = 1. Then
![B^(-1)A^(-1) = \begin{bmatrix}2&1\\-1&0\end{bmatrix} \begin{bmatrix}-1&1\\2&-1\end{bmatrix} = \begin{bmatrix}-1&3\\1&-2\end{bmatrix}](https://img.qammunity.org/2022/formulas/mathematics/high-school/f5rlbfrm9jqz6m7ufx338f8bjxu2sas3di.png)
On the other side, we have
![AB = \begin{bmatrix}1&2\\1&1\end{bmatrix} \begin{bmatrix}0&-1\\1&2\end{bmatrix} = \begin{bmatrix}2&3\\1&1\end{bmatrix}](https://img.qammunity.org/2022/formulas/mathematics/high-school/ruwfmukcoe6soxopmibpt8kkhnijhln3bi.png)
and det(AB) = det(A) det(B) = (-1)×1 = -1. So
![(AB)^(-1) = \frac1{\det(AB)}\begin{bmatrix}1&-3\\-1&2\end{bmatrix} = \begin{bmatrix}-1&3\\1&-2\end{bmatrix}](https://img.qammunity.org/2022/formulas/mathematics/high-school/owksm9xj4tzdp6fvvwq4d61pjutkwpfrua.png)
and both matrices are clearly the same.
More generally, we have by definition of inverse,
![(AB)(AB)^(-1) = I](https://img.qammunity.org/2022/formulas/mathematics/high-school/5c803ca1n4esjd6dhav4qy4615v3pcch0q.png)
where
is the identity matrix. Multiply on the left by A ⁻¹ to get
![A^(-1)(AB)(AB)^(-1) = A^(-1)I = A^(-1)](https://img.qammunity.org/2022/formulas/mathematics/high-school/ndgmi5ebhcl0ofsogkmfr9q2j7t9vi6qex.png)
Multiplication of matrices is associative, so we can regroup terms as
![(A^(-1)A)B(AB)^(-1) = A^(-1) \\\\ B(AB)^(-1) = A^(-1)](https://img.qammunity.org/2022/formulas/mathematics/high-school/xapf9s14urfn96auz5n5tfutatgz2upvnl.png)
Now multiply again on the left by B ⁻¹ and do the same thing:
![B^(-1)\left(B(AB)^(-1)\right) = (B^(-1)B)(AB)^(-1) = B^(-1)A^(-1) \\\\ (AB)^(-1) = B^(-1)A^(-1)](https://img.qammunity.org/2022/formulas/mathematics/high-school/dwxn0hyslodm18n92626pf2dpg0e0kumzn.png)