Undoing a Product
When two actions are performed in succession, undoing the combined action requires undoing the last action first. Matrix multiplication follows this same order: in \(AB\mathbf{x}\), the matrix \(B\) acts on \(\mathbf{x}\) first, and \(A\) acts on the result. Therefore, if both matrices are invertible, the operation that undoes \(AB\) must first undo \(A\), and then undo \(B\). This is why the inverse factors appear in the opposite order.
In this tutorial, \(A\) and \(B\) are square matrices of the same size \(n\times n\) with real entries. The product \(AB\) is also \(n\times n\). We use associativity of matrix multiplication and the identity matrix \(\mathbf{I}_n\). The inverse of a matrix \(A\) is a matrix \(A^{-1}\) satisfying both \(AA^{-1}=\mathbf{I}_n\) and \(A^{-1}A=\mathbf{I}_n\).
Suppose \(A\) and \(B\) are invertible. To find the inverse of \(AB\), we need a matrix that gives \(\mathbf{I}_n\) when multiplied by \(AB\), on either side. The proposed matrix is \(B^{-1}A^{-1}\), with the factors in reverse order. The proof is a direct check of both products. Checking only one side would not, by the definition alone, establish that the proposed matrix is an inverse.
The Product Inverse Theorem
Proof. Since \(A\) and \(B\) are invertible, \(A^{-1}\) and \(B^{-1}\) exist, and their defining equations are \(AA^{-1}=A^{-1}A=\mathbf{I}_n\) and \(BB^{-1}=B^{-1}B=\mathbf{I}_n\). Consider \(B^{-1}A^{-1}\). By associativity and the inverse equations, multiplication on the right gives \((AB)(B^{-1}A^{-1})=A(BB^{-1})A^{-1}=A\mathbf{I}_nA^{-1}=AA^{-1}=\mathbf{I}_n\). Multiplication on the left gives \((B^{-1}A^{-1})(AB)=B^{-1}(A^{-1}A)B=B^{-1}\mathbf{I}_nB=B^{-1}B=\mathbf{I}_n\). Thus \(B^{-1}A^{-1}\) is a two-sided inverse of \(AB\), so \(AB\) is invertible and its inverse is \(B^{-1}A^{-1}\). \(\square\)
The reverse order is forced by the grouping in the proof. On the right, \(B\) meets \(B^{-1}\) first; on the left, \(A^{-1}\) meets \(A\) first. These adjacent inverse pairs simplify to the identity. If the proposed inverse factors were left in the original order, those cancellations would not generally occur.
Worked Example: A Product of Two Shear Matrices
Let \(\mathbf{A}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}1&0\\1&1\end{bmatrix}\). Find the inverse of \(\mathbf{A}\mathbf{B}\) using the theorem, and verify the result.
First check the inverses of the individual matrices. Take \(\mathbf{A}^{-1}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}\). Then \(\mathbf{A}\mathbf{A}^{-1}=\begin{bmatrix}1&0\\0&1\end{bmatrix}\), since its entries are \(1-0,\;-1+1,\;0,\;1\); and \(\mathbf{A}^{-1}\mathbf{A}=\begin{bmatrix}1&0\\0&1\end{bmatrix}\) as well. Similarly, take \(\mathbf{B}^{-1}=\begin{bmatrix}1&0\\-1&1\end{bmatrix}\). Both \(\mathbf{B}\mathbf{B}^{-1}\) and \(\mathbf{B}^{-1}\mathbf{B}\) equal \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\).
Now form the product and use the reverse-order formula:
Check the product in one order. Its four entries are \(2-1,\;-2+2,\;1-1,\;-1+2\):
For the other order, the entries are \(2-1,\;-1+1,\;-2+2,\;1\):
Both checks give the identity, as the definition of an inverse requires.
Why the Order Reverses
Matrix multiplication can describe successive actions on a column vector. If \(B\) acts first and \(A\) acts second, the combined result is \(A(B\mathbf{x})=(AB)\mathbf{x}\). To return to \(\mathbf{x}\), apply \(A^{-1}\) first to undo the second action, then apply \(B^{-1}\) to undo the first. The corresponding matrix product is \(B^{-1}A^{-1}\): its rightmost factor acts first.
We can also see this using the theorem's calculation. In \((AB)(B^{-1}A^{-1})\), the middle pair \(BB^{-1}\) cancels, leaving \(AA^{-1}\). In \((B^{-1}A^{-1})(AB)\), the middle pair \(A^{-1}A\) cancels, leaving \(B^{-1}B\). The same order reversal makes both sides reduce to the identity.
Worked Example: Diagonal Matrices
Let \(\mathbf{C}=\begin{bmatrix}2&0\\0&1\end{bmatrix}\) and \(\mathbf{D}=\begin{bmatrix}1&0\\0&3\end{bmatrix}\). Each matrix is invertible, with \(\mathbf{C}^{-1}=\begin{bmatrix}\tfrac12&0\\0&1\end{bmatrix}\) and \(\mathbf{D}^{-1}=\begin{bmatrix}1&0\\0&\tfrac13\end{bmatrix}\). Multiplying each matrix by its proposed inverse, in either order, gives \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\).
The matrices commute in this example: both \(\mathbf{C}\mathbf{D}\) and \(\mathbf{D}\mathbf{C}\) equal \(\begin{bmatrix}2&0\\0&3\end{bmatrix}\). The theorem gives
Multiplying back verifies the answer in both directions:
Here reversing the inverse factors does not change their product, because the two diagonal matrices commute. This special case does not show that order can be ignored in general.
A Longer Product
The same reasoning applies to any finite sequence of invertible square matrices of the same size. Each step of the sequence must be undone in the reverse order. This follows by repeatedly applying the two-factor theorem, not by changing the rule for how matrix products act.
Proof. For \(k=1\), the statement is the definition of \(A_1^{-1}\). Assume the formula holds for a product of \(k\) invertible matrices. For \(k+1\) factors, group the first \(k\) factors as \(P=A_1\cdots A_k\). The induction assumption gives \(P^{-1}=A_k^{-1}\cdots A_1^{-1}\), and \(P\) is invertible. Applying the two-factor theorem to \(PA_{k+1}\) gives \((PA_{k+1})^{-1}=A_{k+1}^{-1}P^{-1}=A_{k+1}^{-1}A_k^{-1}\cdots A_1^{-1}\). This is the formula for \(k+1\). Therefore it holds for every integer \(k\geq 1\). \(\square\)
Worked Example: Two Noncommuting Matrices
Take \(\mathbf{E}=\begin{bmatrix}1&2\\0&1\end{bmatrix}\) and \(\mathbf{F}=\begin{bmatrix}1&0\\2&1\end{bmatrix}\). Their inverses are \(\mathbf{E}^{-1}=\begin{bmatrix}1&-2\\0&1\end{bmatrix}\) and \(\mathbf{F}^{-1}=\begin{bmatrix}1&0\\-2&1\end{bmatrix}\). Direct multiplication in either order gives the identity for each matrix and its proposed inverse.
The product and its inverse, in the required order, are
Multiplying back, the entries are \(5-4,\;-10+10,\;2-2,\;-4+5\), so
The opposite multiplication also gives the identity: its entries are \(5-4,\;-10+10,\;2-2,\;-4+5\). Thus the candidate is indeed a two-sided inverse.
Common Pitfall: Keeping the Original Order
A common error is to write \((AB)^{-1}=A^{-1}B^{-1}\), retaining the order of the original factors. The noncommuting matrices in the last example show concretely why this fails. The incorrect candidate is
Multiplying it by \(\mathbf{E}\mathbf{F}\) gives
The incorrect result does not even give the identity on the right, so it cannot be the inverse. The issue is not that each individual inverse was wrong; it is that the product put the inverse factors in an order that did not allow the required cancellations. A useful check is to write the full product with parentheses: \((AB)(B^{-1}A^{-1})=A(BB^{-1})A^{-1}\).
Also keep the hypotheses in view. The theorem assumes that both factors are invertible square matrices of the same size. If either factor is not invertible, its inverse in the formula is not defined, and this argument does not apply. When the hypotheses hold, the theorem establishes both that the product is invertible and exactly what its inverse is.
Check Your Understanding
For each question, use the definition of a two-sided inverse and keep track of the multiplication order.
- In a product \(AB\mathbf{x}\), which matrix acts on \(\mathbf{x}\) first? Use this to explain why undoing the product starts with \(A^{-1}\).
- Write out both products that must equal \(\mathbf{I}_n\) to verify that \(B^{-1}A^{-1}\) is the inverse of \(AB\).
- For three invertible matrices \(A,B,C\), state the inverse of \(ABC\) in the correct order.
- Why does a diagonal-matrix example in which the factors commute fail to show that inverse factors may always be written in either order?
- For the matrices \(\mathbf{E}\) and \(\mathbf{F}\) above, explain why \(\mathbf{E}^{-1}\mathbf{F}^{-1}\) is not the inverse of \(\mathbf{E}\mathbf{F}\).