Tutorials › Linear Algebra › Checking a Proposed Matrix Inverse

Elementary Matrices and Inverses · Tutorial 95 of 1000

Checking a Proposed Matrix Inverse

Verify a proposed matrix inverse by checking both products and carefully interpreting any product that is not the identity.

Beginner 9 min read

What You'll Learn

  • State the dimensions required for a proposed inverse.
  • Check a candidate by calculating both matrix products.
  • Use entry-by-entry multiplication to verify an identity matrix.
  • Explain why both product orders belong in the check.
  • Find and correct a multiplication error that invalidates a candidate.

What It Means to Check an Inverse

A proposed inverse is not confirmed because its entries look plausible or because a calculation used to produce them seems convincing. The check is direct: multiply the original matrix by the candidate in each order, and compare both results with the identity matrix. This is useful whether the candidate came from row reduction, a formula, or someone else’s calculation. It also makes a wrong candidate informative: the entries that fail to match the identity show exactly where the proposed relationship breaks down.

Throughout, matrices are over \(\mathbb{R}\). For a square matrix \(\mathbf{A}\) of size \(n\times n\), the identity matrix \(\mathbf{I}_n\) has \(1\)s on its main diagonal and \(0\)s elsewhere. A candidate inverse must also be an \(n\times n\) matrix. The ordinary inverse of a square matrix is defined by requiring products in both orders to equal \(\mathbf{I}_n\).

Definition: A matrix \(\mathbf{B}\in\mathbb{R}^{n\times n}\) is the inverse of \(\mathbf{A}\in\mathbb{R}^{n\times n}\) if \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\) and \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\). When these equations hold, write \(\mathbf{B}=\mathbf{A}^{-1}\). A matrix with such an inverse is called invertible.

The two products involve the same matrices but are different calculations. Matrix multiplication is generally not commutative: changing the order of the factors can change the result. Therefore, the check should display \(\mathbf{A}\mathbf{B}\) and \(\mathbf{B}\mathbf{A}\) separately, rather than silently treating them as interchangeable. The required outcome in each calculation is an identity matrix of the correct size.

A Reliable Product Check

For matrices \(\mathbf{A}=(a_{ij})\) and \(\mathbf{B}=(b_{ij})\), the entry in row \(i\), column \(j\) of their product is obtained by multiplying row \(i\) of the first factor by column \(j\) of the second and adding the results. In symbols, when the product is defined,

$$ (\mathbf{A}\mathbf{B})_{ij}=\sum_k a_{ik}b_{kj}. $$

Thus, for \(\mathbf{A}\mathbf{B}\) to equal \(\mathbf{I}_n\), each diagonal entry must be \(1\), and every off-diagonal entry must be \(0\). The same entry conditions apply to \(\mathbf{B}\mathbf{A}\), but its entries use rows of \(\mathbf{B}\) and columns of \(\mathbf{A}\). A product that is close to the identity, or has only one incorrect entry, is not the identity.

Theorem (Two-sided product test): For square matrices \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{n\times n}\), \(\mathbf{B}\) is an inverse of \(\mathbf{A}\) if and only if both \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\) and \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\).

Proof. By definition, \(\mathbf{B}\) is an inverse of \(\mathbf{A}\) exactly when the two equations \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\) and \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\) both hold. If \(\mathbf{B}\) is an inverse, those equations therefore hold. Conversely, if both equations hold, they satisfy the definition of \(\mathbf{B}\) being an inverse of \(\mathbf{A}\). Hence the stated condition is necessary and sufficient. \(\square\)

Entrywise check: For square matrices \(\mathbf{A}=(a_{ij})\) and \(\mathbf{B}=(b_{ij})\), the equation \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\) holds exactly when \(\sum_k a_{ik}b_{kj}\) equals \(1\) for \(i=j\) and \(0\) for \(i\ne j\). The equation \(\mathbf{B}\mathbf{A}=\mathbf{I}_n\) has the same condition with the factors in the opposite order.

Proof. By the definition of matrix multiplication, the \((i,j)\) entry of \(\mathbf{A}\mathbf{B}\) is \(\sum_k a_{ik}b_{kj}\). By the definition of the identity matrix, its \((i,j)\) entry is \(1\) when \(i=j\) and \(0\) when \(i\ne j\). Two matrices are equal exactly when their corresponding entries are equal, so the stated entry conditions are equivalent to \(\mathbf{A}\mathbf{B}=\mathbf{I}_n\). Applying the same reasoning to \(\mathbf{B}\mathbf{A}\) gives the second condition. \(\square\)

These results explain why a verification needs actual multiplication, not just a visual inspection of the candidate. In practice, first check that the matrices have compatible square dimensions. Then compute each product carefully, compare every entry with the identity, and conclude that the candidate is an inverse only if both equations hold.

Worked Checks with Exact Arithmetic

Worked Example: Verifying a 2 by 2 Candidate

Check whether \(\mathbf{B}=\begin{bmatrix}3&-1\\-5&2\end{bmatrix}\) is the inverse of \(\mathbf{A}=\begin{bmatrix}2&1\\5&3\end{bmatrix}\).

First compute \(\mathbf{A}\mathbf{B}\), using each row of \(\mathbf{A}\) with each column of \(\mathbf{B}\):

$$ \begin{aligned} \mathbf{A}\mathbf{B} &= \begin{bmatrix} 2\cdot3+1\cdot(-5) & 2\cdot(-1)+1\cdot2\\ 5\cdot3+3\cdot(-5) & 5\cdot(-1)+3\cdot2 \end{bmatrix}\\ &= \begin{bmatrix} 6-5 & -2+2\\ 15-15 & -5+6 \end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix} =\mathbf{I}_2. \end{aligned} $$

Now reverse the order. The rows come from \(\mathbf{B}\), and the columns come from \(\mathbf{A}\):

$$ \begin{aligned} \mathbf{B}\mathbf{A} &= \begin{bmatrix} 3\cdot2+(-1)\cdot5 & 3\cdot1+(-1)\cdot3\\ (-5)\cdot2+2\cdot5 & (-5)\cdot1+2\cdot3 \end{bmatrix}\\ &= \begin{bmatrix} 6-5 & 3-3\\ -10+10 & -5+6 \end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix} =\mathbf{I}_2. \end{aligned} $$

Check: Both products equal \(\mathbf{I}_2\), so the two-sided product test confirms that the proposed matrix is an inverse: \(\mathbf{B}=\mathbf{A}^{-1}\).

Worked Example: Checking a 3 by 3 Candidate

Verify that \(\mathbf{B}=\begin{bmatrix}1&-1&1\\0&1&-1\\0&0&1\end{bmatrix}\) is the inverse of \(\mathbf{A}=\begin{bmatrix}1&1&0\\0&1&1\\0&0&1\end{bmatrix}\).

For the first product, calculate row by column. For example, the first row and second column give \(1\cdot(-1)+1\cdot1+0\cdot0=0\), while the first row and third column give \(1\cdot1+1\cdot(-1)+0\cdot1=0\). Computing all entries gives

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

For the reverse product, the rows now come from \(\mathbf{B}\). The entries are

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

Check: Each product equals \(\mathbf{I}_3\), so \(\mathbf{B}\) passes the two-sided check and is an inverse of \(\mathbf{A}\).

When a Candidate Fails

Worked Example: A Single Incorrect Entry

Consider \(\mathbf{A}=\begin{bmatrix}1&2\\3&7\end{bmatrix}\) and the proposed candidate \(\mathbf{C}=\begin{bmatrix}7&-2\\-3&2\end{bmatrix}\). Check whether \(\mathbf{C}\) is an inverse of \(\mathbf{A}\).

Multiply in the order \(\mathbf{A}\mathbf{C}\):

$$ \begin{aligned} \mathbf{A}\mathbf{C} &= \begin{bmatrix} 1\cdot7+2\cdot(-3) & 1\cdot(-2)+2\cdot2\\ 3\cdot7+7\cdot(-3) & 3\cdot(-2)+7\cdot2 \end{bmatrix}\\ &= \begin{bmatrix} 7-6 & -2+4\\ 21-21 & -6+14 \end{bmatrix} = \begin{bmatrix}1&2\\0&8\end{bmatrix}. \end{aligned} $$

The result is not \(\mathbf{I}_2\): its upper-right entry is \(2\), and its lower-right entry is \(8\), not \(1\). The reverse product fails too:

$$ \begin{aligned} \mathbf{C}\mathbf{A} &= \begin{bmatrix} 7\cdot1+(-2)\cdot3 & 7\cdot2+(-2)\cdot7\\ (-3)\cdot1+2\cdot3 & (-3)\cdot2+2\cdot7 \end{bmatrix}\\ &= \begin{bmatrix} 7-6 & 14-14\\ -3+6 & -6+14 \end{bmatrix} = \begin{bmatrix}1&0\\3&8\end{bmatrix}. \end{aligned} $$

Check: Since neither product equals \(\mathbf{I}_2\), \(\mathbf{C}\) is not an inverse of \(\mathbf{A}\). The computations identify the failed entries rather than merely giving a yes-or-no answer.

This example also illustrates how a multiplication error can be detected and corrected. The lower-right entry of \(\mathbf{A}\mathbf{C}\) is \(3\cdot(-2)+7\cdot2=-6+14=8\). Treating it as \(1\) would be an arithmetic mistake: the two products in that row-column calculation must be added exactly as written. Correcting the arithmetic shows that the candidate fails. It does not by itself establish what the correct inverse is; it establishes only that this proposed matrix is not one.

Common Pitfalls and a Careful Conclusion

Pitfall: checking only selected entries. In the last example, the upper-left entry of \(\mathbf{A}\mathbf{C}\) is \(1\), but that single match does not make the product an identity matrix. A product equals \(\mathbf{I}_n\) only if every diagonal entry is \(1\) and every off-diagonal entry is \(0\).

Pitfall: changing the order without recalculating. To find \(\mathbf{A}\mathbf{B}\), use rows of \(\mathbf{A}\) and columns of \(\mathbf{B}\). To find \(\mathbf{B}\mathbf{A}\), use rows of \(\mathbf{B}\) and columns of \(\mathbf{A}\). The first product cannot simply be copied as the second; the worked 3 by 3 example shows that the two calculations have different entry expressions even when they both end at the identity.

Pitfall: accepting a near match. An entry of \(8\) is not an entry of \(1\), and an entry of \(2\) is not an entry of \(0\). For exact matrix arithmetic, the requirement is equality, not closeness. When checking by hand, write out each row-by-column calculation so signs and arithmetic can be inspected.

A sound conclusion should name what was checked. If both \(\mathbf{A}\mathbf{B}\) and \(\mathbf{B}\mathbf{A}\) have been computed and both equal \(\mathbf{I}_n\), the definition confirms that \(\mathbf{B}\) is an inverse of \(\mathbf{A}\). If either computed product differs from \(\mathbf{I}_n\), the candidate does not meet the two-sided definition. This makes multiplication a direct test of a proposed inverse, and each entry provides a checkable record of the result.

Check Your Understanding

For each question, show the relevant row-by-column calculations and compare every entry with the identity matrix.

  1. Check both product orders to decide whether \(\begin{bmatrix}2&1\\1&1\end{bmatrix}\) is an inverse of \(\begin{bmatrix}1&-1\\-1&2\end{bmatrix}\).
  2. For \(\mathbf{A}=\begin{bmatrix}1&0\\2&1\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}1&0\\-2&1\end{bmatrix}\), compute \(\mathbf{A}\mathbf{B}\) and \(\mathbf{B}\mathbf{A}\).
  3. Explain why a product with diagonal entries all equal to \(1\) may still fail to be the identity.
  4. In a proposed inverse check, the \((2,1)\) entry of one product is \(3\). What does that tell you about the candidate?
  5. State the two equations that must hold for a square matrix \(\mathbf{B}\) to be an inverse of \(\mathbf{A}\).

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