Why the Order of Multiplication Matters
For square matrices, an inverse is defined by two equations: multiplying on the left gives the identity, and multiplying on the right gives the identity. These conditions look similar, but matrix multiplication is not commutative, so neither equation can be changed into the other merely by switching the factors. The useful fact is that for a square matrix, either one of the conditions is already strong enough: row reduction forces the matrix to have a two-sided inverse.
Throughout, matrices have real entries. Let \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{n\times n}\), where \(n\in\mathbb{N}\). If \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\), then \(\mathbf{B}\) is called a left inverse of \(\mathbf{A}\). If \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\), then \(\mathbf{B}\) is called a right inverse of \(\mathbf{A}\). A two-sided inverse satisfies both equations. The order is part of the condition: in general, \(\mathbf{B}\mathbf{A}\) and \(\mathbf{A}\mathbf{B}\) need not be equal.
The proof will use row reduction, but it will also keep track of the matrix effect of the row operations. Every elementary row operation is reversible by another elementary row operation. Its elementary matrix is therefore invertible, and a finite sequence of row operations is represented by a product \(\mathbf{E}\) of invertible elementary matrices. In particular, \(\mathbf{E}\) is invertible. Applying that sequence to \(\mathbf{A}\) gives \(\mathbf{E}\mathbf{A}\).
A Row-Reduction Fact for Square Matrices
We first record the connection between homogeneous systems and the reduced row-echelon form. A homogeneous system is an equation \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Row operations preserve its solution set: swapping equations, multiplying an equation by a nonzero scalar, or adding a multiple of one equation to another does not change which \(\mathbf{x}\) satisfy the system. Equivalently, if \(\mathbf{R}=\mathbf{E}\mathbf{A}\), then \(\mathbf{A}\mathbf{x}=\mathbf{0}\) holds exactly when \(\mathbf{R}\mathbf{x}=\mathbf{0}\) holds, since \(\mathbf{E}\) is invertible.
Proof. Row operations preserve the solutions of the homogeneous system, so \(\mathbf{R}\mathbf{x}=\mathbf{0}\) also has only the zero solution. Suppose that some column of \(\mathbf{R}\) has no pivot. Its variable is a free variable. Assign that free variable the value \(1\), and assign every other free variable the value \(0\). In each pivot row, the pivot variable can then be set to the negative of the sum of the other terms in that row. This produces a solution to \(\mathbf{R}\mathbf{x}=\mathbf{0}\) with a free variable equal to \(1\), so it is nonzero. That contradicts the fact that the only solution is zero. Thus every column has a pivot. Since \(\mathbf{R}\) is \(n\times n\), it has a pivot in every row as well. In reduced row-echelon form, the pivots are \(1\), each pivot column has zeros elsewhere, and every column is a pivot column; therefore \(\mathbf{R}=\mathbf{I}_n\). \(\square\)
This lemma identifies one route to the identity: prove that the homogeneous system has no nonzero solution. For the other one-sided condition, it is more direct to show that the reduced matrix cannot have a zero row. Both arguments depend on the matrix being square.
A Left Inverse Forces a Two-Sided Inverse
Proof. Assume \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\). If \(\mathbf{A}\mathbf{x}=\mathbf{0}\), then multiplying by \(\mathbf{B}\) gives \(\mathbf{B}\mathbf{A}\mathbf{x}=\mathbf{B}\mathbf{0}\), hence \(\mathbf{x}=\mathbf{0}\). Thus the homogeneous system for \(\mathbf{A}\) has only the zero solution. By the lemma, row reduction takes \(\mathbf{A}\) to \(\mathbf{I}_n\). Write the sequence of row operations as \(\mathbf{E}\), so that \(\mathbf{E}\mathbf{A}=\mathbf{I}_n\). Since \(\mathbf{E}\) is invertible, multiplying on the left by \(\mathbf{E}^{-1}\) gives \(\mathbf{A}=\mathbf{E}^{-1}\). The assumed equation becomes \(\mathbf{B}\mathbf{E}^{-1}=\mathbf{I}_n\); multiplying this equation on the right by \(\mathbf{E}\) gives \(\mathbf{B}=\mathbf{E}\). Consequently, \(\mathbf{A}\mathbf{B}=\mathbf{E}^{-1}\mathbf{E}=\mathbf{I}_n\), as required. \(\square\)
The key first step is where the left-inverse condition enters: if \(\mathbf{A}\mathbf{x}=\mathbf{0}\), then the equation \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\) forces \(\mathbf{x}=\mathbf{0}\). The lemma then guarantees that row reduction reaches the identity. The elementary-matrix equation records this result without reversing the order of any matrix factors.
Worked Example: Starting with a Left Inverse
Let
First check the stated left-inverse condition by multiplication:
Now row-reduce \(\mathbf{A}\). Swap the rows, subtract twice the first row from the second, multiply the second row by \(-1\), and subtract the second row from the first:
The product \(\mathbf{E}\) of the elementary matrices for these operations satisfies \(\mathbf{E}\mathbf{A}=\mathbf{I}_2\). The theorem's argument shows that \(\mathbf{B}=\mathbf{E}\), so the other multiplication must also give the identity. Check it directly:
Both checks agree: the given left inverse is a right inverse as well.
A Right Inverse Also Forces a Two-Sided Inverse
Proof. Assume \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\), and reduce \(\mathbf{A}\) to \(\mathbf{R}=\operatorname{rref}(\mathbf{A})\). Let \(\mathbf{E}\) be the product of the elementary matrices for the row operations, so \(\mathbf{R}=\mathbf{E}\mathbf{A}\). Then \(\mathbf{R}\mathbf{B}=\mathbf{E}\mathbf{A}\mathbf{B}=\mathbf{E}\). The matrix \(\mathbf{E}\) is invertible and therefore has no zero row: a zero row would remain zero in \(\mathbf{E}\mathbf{E}^{-1}\), contradicting \(\mathbf{E}\mathbf{E}^{-1}=\mathbf{I}_n\). If \(\mathbf{R}\) had a zero row, the same row of \(\mathbf{R}\mathbf{B}\) would be zero, contradicting \(\mathbf{R}\mathbf{B}=\mathbf{E}\). Hence \(\mathbf{R}\) has no zero rows. In an \(n\times n\) RREF matrix, this means all \(n\) rows have pivots, so all \(n\) columns have pivots and \(\mathbf{R}=\mathbf{I}_n\). Thus \(\mathbf{E}\mathbf{A}=\mathbf{I}_n\). Finally, \(\mathbf{E}=\mathbf{E}(\mathbf{A}\mathbf{B})=(\mathbf{E}\mathbf{A})\mathbf{B}=\mathbf{B}\), so \(\mathbf{B}\mathbf{A}=\mathbf{E}\mathbf{A}=\mathbf{I}_n\). \(\square\)
Here, the right-inverse condition helps in a different way. It gives \(\mathbf{R}\mathbf{B}=\mathbf{E}\), and the invertibility of \(\mathbf{E}\) rules out zero rows in \(\mathbf{R}\). Because \(\mathbf{R}\) is square, having no zero rows means it is the identity. The equation \(\mathbf{R}\mathbf{B}=\mathbf{E}\) is not used to swap factors; instead, it identifies \(\mathbf{B}\) with \(\mathbf{E}\).
Worked Example: Starting with a Right Inverse
Take
Check the right-inverse condition, showing each entry:
Subtract twice the second row from the first to reduce \(\mathbf{A}\):
The row operation is left multiplication by \(\mathbf{E}=\begin{bmatrix}1&-2\\0&1\end{bmatrix}\), which is exactly \(\mathbf{B}\). This agrees with the proof, which established \(\mathbf{E}=\mathbf{B}\) and \(\mathbf{E}\mathbf{A}=\mathbf{I}_2\). Check the other product directly:
Thus this right inverse is also a left inverse.
Why the Square Hypothesis Matters
The conclusions above use the fact that \(\mathbf{A}\) has the same number of rows and columns. The row-reduction arguments turn “no free variables” or “no zero rows” into the statement that \(\mathbf{R}=\mathbf{I}_n\); that step relies on the matrix being square. A rectangular matrix can have a left inverse or a right inverse without having both. In particular, the identity matrices on the two sides then have different sizes.
Worked Example: A Right Inverse for a Rectangular Matrix
Let \(\mathbf{A}\in\mathbb{R}^{1\times2}\) and \(\mathbf{B}\in\mathbb{R}^{2\times1}\) be
The product in the order \(\mathbf{A}\mathbf{B}\) is a \(1\times1\) matrix:
But the reverse product is \(2\times2\):
So the right-inverse equation holds, but the left-inverse equation does not. This does not contradict either theorem: neither matrix is square.
Common Mistake: Reordering the Factors
A tempting but invalid argument starts from \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\) and claims that \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\) because the two products contain the same matrices. Matrix multiplication is not commutative, so the order cannot be changed without a reason. Even the rectangular example shows that the products can differ: one is \(\begin{bmatrix}1\end{bmatrix}\), while the other is \(\begin{bmatrix}1&0\\0&0\end{bmatrix}\).
The correction is not to swap the factors. Use the square-matrix hypothesis and follow the row-reduction argument: a left inverse forces the homogeneous system to have only the zero solution; a right inverse prevents zero rows in the reduced matrix. In either case, row reduction reaches the identity, and the elementary-matrix equation supplies the needed two-sided inverse relation.
These proofs explain why checking one side is enough when a proposed inverse belongs to a square matrix: either equation alone implies the other. In calculations, it can still be useful to multiply both ways as a direct check, but the implication is a theorem about square matrices, not a rule that permits reordering products. The dimension and the order of multiplication must remain visible throughout.
Check Your Understanding
Use the row-reduction and elementary-matrix arguments to justify each response.
- If \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\), why must \(\mathbf{A}\mathbf{x}=\mathbf{0}\) imply \(\mathbf{x}=\mathbf{0}\)?
- Why does a square RREF matrix with no free variables equal the identity?
- If \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\) and \(\mathbf{R}=\mathbf{E}\mathbf{A}\), derive the equation relating \(\mathbf{R}\mathbf{B}\) and \(\mathbf{E}\).
- In the rectangular example, which product equals \(\mathbf{I}_1\), and which product fails to equal \(\mathbf{I}_2\)?
- State the square-matrix condition that lets either one-sided inverse equation imply the other.