Tutorials › Linear Algebra › Zero Products And Failed Cancellation

Matrix Operations and Algebra · Tutorial 67 of 1000

Zero Products And Failed Cancellation

Use matrix columns and homogeneous equations to understand zero products and identify exactly when left cancellation is valid.

Beginner 10 min read

What You'll Learn

  • Construct nonzero matrices whose product is the zero matrix.
  • Relate a zero product to the columns of the right-hand factor.
  • See why a nonzero matrix need not be cancellable from a product equation.
  • Prove a condition under which left cancellation does hold.
  • Distinguish scalar cancellation from matrix multiplication.

When a Product Is Zero

For real numbers, a product \(ab=0\) forces at least one factor to be zero. Matrix multiplication behaves differently: a nonzero matrix can send a nonzero vector to the zero vector, because the entries in each row-column product can cancel. As a result, two nonzero matrices can have a zero product, and a nonzero matrix cannot generally be cancelled from an equation such as \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\).

Throughout, matrices have real entries. Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\) and \(\mathbf{B}\in\mathbb{R}^{n\times p}\), so their product is defined and has size \(m\times p\). The zero matrix of that size is denoted \(\mathbf{O}\). The entry formula for the product is \((\mathbf{A}\mathbf{B})_{ij}=\sum_{k=1}^{n}a_{ik}b_{kj}\). Each such entry is a sum of products; it can be zero even when many of its terms are nonzero.

Definition: A matrix is nonzero if at least one of its entries is nonzero. A zero product is an equation \(\mathbf{A}\mathbf{B}=\mathbf{O}\), where the matrices have compatible dimensions. The equation concerns the product, not whether either factor is the zero matrix.

A useful way to read the product is one column at a time. Write the columns of \(\mathbf{B}\) as \(\mathbf{b}_1,\dots,\mathbf{b}_p\). By the entry formula, the \(j\)th column of \(\mathbf{A}\mathbf{B}\) is \(\mathbf{A}\mathbf{b}_j\). Thus a product is zero precisely when every column of \(\mathbf{B}\) solves the homogeneous equation \(\mathbf{A}\mathbf{x}=\mathbf{0}\).

Theorem: For \(\mathbf{A}\in\mathbb{R}^{m\times n}\) and \(\mathbf{B}\in\mathbb{R}^{n\times p}\), \(\mathbf{A}\mathbf{B}=\mathbf{O}\) if and only if \(\mathbf{A}\mathbf{b}_j=\mathbf{0}\) for every column \(\mathbf{b}_j\) of \(\mathbf{B}\).

Proof. The \(j\)th column of \(\mathbf{A}\mathbf{B}\) has \(i\)th entry \(\sum_{k=1}^{n}a_{ik}b_{kj}\), which is exactly the \(i\)th entry of \(\mathbf{A}\mathbf{b}_j\). Therefore the \(j\)th column of \(\mathbf{A}\mathbf{B}\) is \(\mathbf{A}\mathbf{b}_j\). A matrix is zero exactly when all its columns are zero. Hence \(\mathbf{A}\mathbf{B}=\mathbf{O}\) exactly when \(\mathbf{A}\mathbf{b}_j=\mathbf{0}\) for every \(j\). \(\square\)

Building a Zero Product

Worked Example: Two Nonzero Matrices With Zero Product

Find nonzero \(2\times2\) matrices \(\mathbf{A}\) and \(\mathbf{B}\) such that \(\mathbf{A}\mathbf{B}=\mathbf{O}\).

Choose \(\mathbf{A}\) so that its rows are multiples of one another, and choose a nonzero vector it sends to zero. For the vector \(\begin{bmatrix}2\\-1\end{bmatrix}\), the row \(\begin{bmatrix}1&2\end{bmatrix}\) gives \(1(2)+2(-1)=0\). The row \(\begin{bmatrix}2&4\end{bmatrix}\) does too. Set

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

Both matrices are nonzero. Compute each entry of the product:

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

Check: the columns of \(\mathbf{B}\) are \(\begin{bmatrix}2\\-1\end{bmatrix}\) and \(\begin{bmatrix}0\\0\end{bmatrix}\). Multiplying either by \(\mathbf{A}\) gives \(\begin{bmatrix}0\\0\end{bmatrix}\), as the theorem predicts.

This construction illustrates the central mechanism: the columns of \(\mathbf{B}\) can be nonzero while still being sent to zero by \(\mathbf{A}\). In the first column, the row products cancel: \(2-2=0\) and \(4-4=0\). The zero product does not arise because all the individual factors in those sums are zero.

Theorem: For \(\mathbf{A}\in\mathbb{R}^{m\times n}\), there exists a nonzero matrix \(\mathbf{B}\in\mathbb{R}^{n\times p}\), for any positive integer \(p\), with \(\mathbf{A}\mathbf{B}=\mathbf{O}\) if and only if there is a nonzero vector \(\mathbf{x}\in\mathbb{R}^n\) such that \(\mathbf{A}\mathbf{x}=\mathbf{0}\).

Proof. Suppose first that a nonzero \(\mathbf{B}\) satisfies \(\mathbf{A}\mathbf{B}=\mathbf{O}\). Since \(\mathbf{B}\) is nonzero, at least one of its columns, say \(\mathbf{b}_j\), is nonzero. The preceding theorem gives \(\mathbf{A}\mathbf{b}_j=\mathbf{0}\). Thus \(\mathbf{x}=\mathbf{b}_j\) is a nonzero vector with \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Conversely, suppose \(\mathbf{x}\ne\mathbf{0}\) and \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Form \(\mathbf{B}\) with first column \(\mathbf{x}\) and all its other columns zero. This matrix is nonzero, and every column \(\mathbf{b}_j\) satisfies \(\mathbf{A}\mathbf{b}_j=\mathbf{0}\). The preceding theorem therefore gives \(\mathbf{A}\mathbf{B}=\mathbf{O}\). \(\square\)

Why Left Cancellation Can Fail

For real numbers, if \(a\ne0\) and \(ab=ac\), division by \(a\) gives \(b=c\). For matrices, having \(\mathbf{A}\ne\mathbf{O}\) is not enough to justify the same conclusion. Different matrices can have the same product with \(\mathbf{A}\) on the left if their columns differ by vectors that \(\mathbf{A}\) sends to zero.

Worked Example: Equal Products From Different Matrices

Use the matrix from the previous example to find distinct matrices \(\mathbf{B}\) and \(\mathbf{C}\) for which \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\), despite \(\mathbf{A}\ne\mathbf{O}\).

Take \(\mathbf{B}=\mathbf{I}_2\), and let the first column of \(\mathbf{C}\) differ from the first column of \(\mathbf{B}\) by \(\begin{bmatrix}2\\-1\end{bmatrix}\), which \(\mathbf{A}\) sends to zero. This gives

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

The matrices are distinct. Their products are

$$ \mathbf{A}\mathbf{B} = \begin{bmatrix}1&2\\2&4\end{bmatrix}, \qquad \mathbf{A}\mathbf{C} = \begin{bmatrix} 1(3)+2(-1)&1(0)+2(1)\\ 2(3)+4(-1)&2(0)+4(1) \end{bmatrix} = \begin{bmatrix}1&2\\2&4\end{bmatrix}. $$

Check: \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\), but \(\mathbf{B}\ne\mathbf{C}\), since their first entries are \(1\) and \(3\). The difference in their first columns is precisely \(\begin{bmatrix}2\\-1\end{bmatrix}\), which \(\mathbf{A}\) sends to zero.

The exact condition for left cancellation can be stated using the solutions of the homogeneous equation. Say that \(\mathbf{A}\) has only the trivial homogeneous solution if \(\mathbf{A}\mathbf{x}=\mathbf{0}\) implies \(\mathbf{x}=\mathbf{0}\). This condition is stronger than merely saying \(\mathbf{A}\ne\mathbf{O}\).

Theorem (Left cancellation criterion): Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(p\) be a positive integer. The implication \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\Rightarrow\mathbf{B}=\mathbf{C}\) holds for every \(\mathbf{B},\mathbf{C}\in\mathbb{R}^{n\times p}\) if and only if the only solution to \(\mathbf{A}\mathbf{x}=\mathbf{0}\) is \(\mathbf{x}=\mathbf{0}\).

Proof. First suppose the only solution to \(\mathbf{A}\mathbf{x}=\mathbf{0}\) is \(\mathbf{x}=\mathbf{0}\), and suppose \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\). For each column index \(j\), equality of the \(j\)th columns says that for every row \(i\), \(\sum_{k=1}^{n}a_{ik}b_{kj}=\sum_{k=1}^{n}a_{ik}c_{kj}\). Subtracting the right side gives \(\sum_{k=1}^{n}a_{ik}(b_{kj}-c_{kj})=0\) for every \(i\). Thus \(\mathbf{A}(\mathbf{b}_j-\mathbf{c}_j)=\mathbf{0}\). By the assumed condition, \(\mathbf{b}_j-\mathbf{c}_j=\mathbf{0}\), so \(\mathbf{b}_j=\mathbf{c}_j\). This holds for every column, and hence \(\mathbf{B}=\mathbf{C}\). Conversely, suppose there is a nonzero \(\mathbf{x}\) with \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Let \(\mathbf{B}\) have first column \(\mathbf{x}\) and all remaining columns zero, and let \(\mathbf{C}=\mathbf{O}\). Then \(\mathbf{B}\ne\mathbf{C}\), while \(\mathbf{A}\mathbf{B}=\mathbf{O}=\mathbf{A}\mathbf{C}\). Therefore the stated cancellation implication cannot hold for every pair \(\mathbf{B},\mathbf{C}\). \(\square\)

The Order of the Factors Matters

A zero product in one order does not force a zero product in the other order. The dimensions of the factors must also be checked: \(\mathbf{A}\mathbf{B}\) and \(\mathbf{B}\mathbf{A}\) can both be formed when the matrices are square, but their entries can differ.

Worked Example: Reversing the Factors

Consider the following nonzero \(2\times2\) matrices:

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

Multiplying in the order \(\mathbf{A}\mathbf{B}\) gives

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

In the reverse order,

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

Check: \(\mathbf{B}\mathbf{A}=\mathbf{B}\ne\mathbf{O}\), whereas \(\mathbf{A}\mathbf{B}=\mathbf{O}\). The zero product in one order gives no general conclusion that the reversed product is zero.

Common Mistake: Cancelling From a Zero Product

A tempting but incorrect claim is: “\(\mathbf{A}\mathbf{B}=\mathbf{O}\) and \(\mathbf{A}\ne\mathbf{O}\), so \(\mathbf{B}=\mathbf{O}\).” The first worked example directly disproves this claim. In that example, the top-left entry is computed as \(1(2)+2(-1)=2-2=0\), even though the entries \(1,2,2,-1\) involved in the calculation are not all zero. The other entries vanish as well, but the cancellation in these sums does not make \(\mathbf{B}\) the zero matrix.

The correction is to inspect the homogeneous equation \(\mathbf{A}\mathbf{x}=\mathbf{0}\). If it has a nonzero solution, that solution can be placed in a column of a nonzero matrix \(\mathbf{B}\), producing \(\mathbf{A}\mathbf{B}=\mathbf{O}\). If its only solution is zero, the left cancellation criterion proves that equal products \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\) force \(\mathbf{B}=\mathbf{C}\). In either case, nonzeroness of \(\mathbf{A}\) alone does not settle cancellation.

When checking a proposed argument, first confirm that the matrix products have compatible dimensions. Then distinguish between the statement that a factor is nonzero and the stronger condition that its homogeneous equation has only the trivial solution. The latter condition, not the former, is what the left cancellation proof requires.

Check Your Understanding

Use the column interpretation of matrix multiplication and verify each proposed product by computing its entries.

  1. Find a nonzero vector \(\mathbf{x}\) such that \(\begin{bmatrix}1&3\\2&6\end{bmatrix}\mathbf{x}=\mathbf{0}\), then use it to form a nonzero \(2\times2\) matrix \(\mathbf{B}\) with \(\mathbf{A}\mathbf{B}=\mathbf{O}\).
  2. For \(\mathbf{A}=\begin{bmatrix}1&0\\0&1\end{bmatrix}\), does \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\) force \(\mathbf{B}=\mathbf{C}\)? Explain using the cancellation criterion.
  3. Explain why a nonzero column of \(\mathbf{B}\) must be a solution of \(\mathbf{A}\mathbf{x}=\mathbf{0}\) whenever \(\mathbf{A}\mathbf{B}=\mathbf{O}\).
  4. Give a concrete example showing that \(\mathbf{A}\mathbf{B}=\mathbf{O}\) need not imply \(\mathbf{B}\mathbf{A}=\mathbf{O}\).
  5. State the additional condition on \(\mathbf{A}\) that makes \(\mathbf{A}\mathbf{B}=\mathbf{A}\mathbf{C}\Rightarrow\mathbf{B}=\mathbf{C}\) valid for all compatible \(\mathbf{B}\) and \(\mathbf{C}\).

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