TITLE: Commutative property of matrix multiplication (or lack thereof)
QUESTION [7 upvotes]: Assuming $A$ and $B$ are invertible matrices and are of proper dimensions to be multiplied (say, $2\times2$), is the following expression correct for all examples of matrices $A$ and $B$?
$$(A^{-1}B)(AB^{-1}) = A^{-1}BAB^{-1} = A^{-1}AB^{-1}B = I^2 = I$$
My understanding is that for matrices $A$ and $B$, $AB$ doesn't necessarily equal $BA$ as matrix multiplication is not commutative.
I'm trying to simplify the below expression:
$$(AB)^{-1}(AC^{-1})(D^{-1}C^{-1})^{-1}D^{-1}$$
Nothing is given about the matrices $A$, $B$, $C$, or $D$ beyond that they are invertible and of correct dimensions such that any matrix multiplication is possible. My process is as below:
$$\begin{align}(AB)^{-1}(AC^{-1})(D^{-1}C^{-1})^{-1}D^{-1} &= (A^{-1}B^{-1})(AC^{-1})(DC)D^{-1}\\
&= A^{-1}B^{-1}AC^{-1}DCD^{-1}\\
&= B^{-1}A^{-1}AC^{-1}CDD^{-1}\\
&= B^{-1}I^3\\
&= B^{-1}\end{align}$$
You'll notice the error I've made here: $(AB)^{-1} = (B^{-1}A^{-1})$, not $(A^{-1}B^{-1})$, but in the end it doesn't change the answer. The answer in the textbook is indeed $B^{-1}$. According to the above:
$$(B^{-1}A^{-1}) = (A^{-1}B^{-1})$$
But matrices are not commutative? Why does the algebra suggest they are?

REPLY [2 votes]: Focusing on just the relevant part of your calculation: you wrote
$$ (AB)^{-1} = A^{-1}B^{-1} = B^{-1}A^{-1} $$
That's how we usually write it, but a more explicit form of the reasoning actually being presented here is:

We know that $(AB)^{-1} = A^{-1}B^{-1}$.
We know that $A^{-1}B^{-1} = B^{-1}A^{-1}$.
Therefore $(AB)^{-1} = B^{-1}A^{-1}$.

(3) would indeed follow from (1) and (2), if they were true; but they are not.  This is a valid argument with false premises; as such, it does not prove the conclusion.  (The conclusion happens to be true anyway.)
So, your question "Why does the algebra suggest [that matrices commute]?" is taking a true conclusion to suggest true premises, which doesn't work.
tl;dr: Even when two wrongs make a right, they're still wrong.