Tutorials › Linear Algebra › Why Left and Right Inverses Must Agree

Elementary Matrices and Inverses · Tutorial 96 of 1000

Why Left and Right Inverses Must Agree

Learn how row reduction and elementary matrices turn either one-sided inverse condition for a square matrix into a two-sided inverse.

Beginner 10 min read

What You'll Learn

  • Distinguish a left inverse from a right inverse by the order of matrix multiplication.
  • Explain how a sequence of row operations gives an invertible matrix E with EA in reduced row-echelon form.
  • Prove that a square matrix with a left inverse reduces to the identity.
  • Prove that a square matrix with a right inverse has no zero rows after reduction.
  • Use elementary matrices to conclude that either one-sided inverse is two-sided.
  • Identify why the result can fail for rectangular matrices.

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}\).

Key idea: If row reduction takes \(\mathbf{A}\) to \(\mathbf{I}_n\), then \(\mathbf{E}\mathbf{A}=\mathbf{I}_n\), where \(\mathbf{E}\) is invertible. Multiplying by \(\mathbf{E}^{-1}\) gives \(\mathbf{A}=\mathbf{E}^{-1}\), so \(\mathbf{A}\) is invertible. The main task is to show that either one-sided inverse condition forces row reduction to reach \(\mathbf{I}_n\).

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.

Lemma: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\), and let \(\mathbf{R}=\operatorname{rref}(\mathbf{A})\). If \(\mathbf{A}\mathbf{x}=\mathbf{0}\) has only the solution \(\mathbf{x}=\mathbf{0}\), then \(\mathbf{R}=\mathbf{I}_n\).

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

Theorem: Let \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{n\times n}\). If \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\), then \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\) as well.

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

$$ \mathbf{A}=\begin{bmatrix}2&1\\1&1\end{bmatrix}, \qquad \mathbf{B}=\begin{bmatrix}1&-1\\-1&2\end{bmatrix}. $$

First check the stated left-inverse condition by multiplication:

$$ \mathbf{B}\mathbf{A} = \begin{bmatrix} 1\cdot2+(-1)\cdot1&1\cdot1+(-1)\cdot1\\ (-1)\cdot2+2\cdot1&(-1)\cdot1+2\cdot1 \end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix} =\mathbf{I}_2. $$

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:

$$ \begin{bmatrix}2&1\\1&1\end{bmatrix} \xrightarrow{R_1\leftrightarrow R_2} \begin{bmatrix}1&1\\2&1\end{bmatrix} \xrightarrow{R_2\to R_2-2R_1} \begin{bmatrix}1&1\\0&-1\end{bmatrix}. $$
$$ \begin{bmatrix}1&1\\0&-1\end{bmatrix} \xrightarrow{R_2\to -R_2} \begin{bmatrix}1&1\\0&1\end{bmatrix} \xrightarrow{R_1\to R_1-R_2} \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

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:

$$ \mathbf{A}\mathbf{B} = \begin{bmatrix} 2\cdot1+1\cdot(-1)&2\cdot(-1)+1\cdot2\\ 1\cdot1+1\cdot(-1)&1\cdot(-1)+1\cdot2 \end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix} =\mathbf{I}_2. $$

Both checks agree: the given left inverse is a right inverse as well.

A Right Inverse Also Forces a Two-Sided Inverse

Theorem: Let \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{n\times n}\). If \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\), then \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\) as well.

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

$$ \mathbf{A}=\begin{bmatrix}1&2\\0&1\end{bmatrix}, \qquad \mathbf{B}=\begin{bmatrix}1&-2\\0&1\end{bmatrix}. $$

Check the right-inverse condition, showing each entry:

$$ \mathbf{A}\mathbf{B} = \begin{bmatrix} 1\cdot1+2\cdot0&1\cdot(-2)+2\cdot1\\ 0\cdot1+1\cdot0&0\cdot(-2)+1\cdot1 \end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

Subtract twice the second row from the first to reduce \(\mathbf{A}\):

$$ \begin{bmatrix}1&2\\0&1\end{bmatrix} \xrightarrow{R_1\to R_1-2R_2} \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

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:

$$ \mathbf{B}\mathbf{A} = \begin{bmatrix} 1\cdot1+(-2)\cdot0&1\cdot2+(-2)\cdot1\\ 0\cdot1+1\cdot0&0\cdot2+1\cdot1 \end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

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

$$ \mathbf{A}=\begin{bmatrix}1&0\end{bmatrix}, \qquad \mathbf{B}=\begin{bmatrix}1\\0\end{bmatrix}. $$

The product in the order \(\mathbf{A}\mathbf{B}\) is a \(1\times1\) matrix:

$$ \mathbf{A}\mathbf{B} = \begin{bmatrix}1&0\end{bmatrix} \begin{bmatrix}1\\0\end{bmatrix} = \begin{bmatrix}1\end{bmatrix} =\mathbf{I}_1. $$

But the reverse product is \(2\times2\):

$$ \mathbf{B}\mathbf{A} = \begin{bmatrix}1\\0\end{bmatrix} \begin{bmatrix}1&0\end{bmatrix} = \begin{bmatrix}1&0\\0&0\end{bmatrix} \ne \begin{bmatrix}1&0\\0&1\end{bmatrix} =\mathbf{I}_2. $$

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.

  1. If \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\), why must \(\mathbf{A}\mathbf{x}=\mathbf{0}\) imply \(\mathbf{x}=\mathbf{0}\)?
  2. Why does a square RREF matrix with no free variables equal the identity?
  3. 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}\).
  4. In the rectangular example, which product equals \(\mathbf{I}_1\), and which product fails to equal \(\mathbf{I}_2\)?
  5. State the square-matrix condition that lets either one-sided inverse equation imply the other.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon