# Commutative property of matrix multiplication (or lack thereof)

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?

• No, it is not correct. May 30, 2015 at 16:20
• You are right, you cannot just say $AB=BA$. Do you know anything more about the matrices? May 30, 2015 at 16:20
• Although it can't be simplified (without knowing more about the matrices), much is known about expressions of this type: they're called commutators. (Yours is $[A,B^{-1}]$.)
– user21467
May 30, 2015 at 16:26
• @riista $(A^{-1}B)(AB^{-1})$ can't be simplified, but your latter expression certainly can. Could you show your work which led to you asking the question? What do you know about $(AB)^{-1}$? May 30, 2015 at 16:36
• @ErickWong, I've expanded the question a bit to show my work. May 30, 2015 at 16:42

In general you won't have any commutative property with matrices, $AB \neq BA$. And you won't be able to simplify $(A^{-1}B)(AB^{-1})$. It is in general the final form of this calculus. For instance $$A=\left(\begin{matrix} 1&2 \\ 3&4 \end{matrix} \right) \qquad B=\left(\begin{matrix} 5&6 \\ 7&8 \end{matrix} \right)$$ $$AB=\left(\begin{matrix} 19&22 \\ 43&50 \end{matrix} \right) \qquad BA=\left(\begin{matrix} 23&34 \\ 31&46 \end{matrix} \right)$$ $$AB \neq BA$$ $$(A^{-1}B)(AB^{-1}) = \left(\begin{matrix} -17&10 \\ 22&-13 \end{matrix} \right)$$

To help you remember this non commutative property remind that matrices are a representation of linear functions and that the matrix product corresponds to the functional composition which is intuitively noncommutative.

In your example : $(AB)^{-1}(AC^{-1})(D^{−1}C^{−1})^{−1}D^{−1}=B^{-1}A^{-1}AC^{-1}CDD^{-1}=B^{-1}$

Getting a good answer coming from a wrong calculus does not validate any hypothesis. Your "According to the above" is logically incorrect. The algebra suggests nothing here.

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:

1. We know that $(AB)^{-1} = A^{-1}B^{-1}$.
2. We know that $A^{-1}B^{-1} = B^{-1}A^{-1}$.
3. 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.

That expression is not always correct. For example, let

$$A=\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix},\quad B=\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$$

We then get

$$(A^{-1}B)(AB^{-1})=\begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}$$

As others have explained, you have no reason to assume that general matrices will commute.