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.
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}\).
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
Both matrices are nonzero. Compute each entry of the product:
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.
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
The matrices are distinct. Their products are
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}\).
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:
Multiplying in the order \(\mathbf{A}\mathbf{B}\) gives
In the reverse order,
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.
- 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}\).
- 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.
- 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}\).
- Give a concrete example showing that \(\mathbf{A}\mathbf{B}=\mathbf{O}\) need not imply \(\mathbf{B}\mathbf{A}=\mathbf{O}\).
- 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}\).