What Conditions Make the Product of Two Matrices Zero?
At a glance
- 1. Check dimensions
Write A as m by n and B as n by p; their product is an m by p matrix.
- 2. Compare image and kernel
AB is zero exactly when every column of B lies in the kernel of A.
- 3. Use the rank bound
Rank-nullity gives rank(A) plus rank(B) at most n, the shared inner dimension.
- 4. Check the actual matrices
The rank bound is necessary, but for specified matrices you must verify that A annihilates every column of B.
Try it: Matrix calculator
The condition does not usually force either matrix to be zero. Instead, it says that the output of always lands in directions that sends to zero.
Suppose is an matrix and is an matrix, with entries over a field such as or . Their product is an matrix. The key condition is
Here, is the space spanned by the columns of , and is the set of vectors for which .
The exact condition for
View the matrices as linear maps:
The composition first applies , then applies . Thus precisely when for every . This means that each vector produced by is in the kernel of .
Equivalently, check the columns individually: if are the columns of , then
This is often the quickest way to test a particular pair of matrices.
A rank condition that must hold
By rank-nullity, the dimension of the kernel of is . If , then the image of is contained in that kernel, so
Therefore,
The number here is the shared inner dimension: the number of columns of , which must equal the number of rows of .
This rank inequality is necessary for a given pair to have zero product, but it is not sufficient by itself. The column space of must actually lie in the kernel of $A.
Worked example
Let
Here is and is , so the product is defined and will be . The columns of are
The kernel of consists of vectors whose first coordinate is zero. Both columns of satisfy that condition. Direct multiplication confirms it:
In this example, and , so their ranks add to , the shared inner dimension.
What the condition says in special cases
- If is invertible, then . The condition therefore forces .
- If has full row rank , then . For , must vanish on all of , so .
- If both matrices are square and invertible, their product cannot be zero.
- If both matrices are nonzero, the shared dimension must be at least . For inner dimension , a nonzero is a nonzero column and a nonzero is a nonzero row; their product is a nonzero outer product.
In particular, for square matrices, a nonzero product-zero pair requires each matrix to have rank at most , and their ranks must add to at most .
Common mistakes
Assuming one factor must be zero. This is true for scalar numbers, but not for matrices. For instance, the worked example has two nonzero factors and a zero product.
Using only the rank inequality. The inequality limits the possible ranks, but it does not establish that the vectors in the image of are in the kernel of . Check the columns or compute the product.
Confusing the dimensions. The product is defined when the number of columns of equals the number of rows of . Its zero matrix has the outer dimensions, ; it need not be square.
Reversing the order. In general, does not imply . The two products may even have different dimensions or one may be undefined. The relevant condition for is that ‘s image lies in ‘s kernel.
References
- Linear Algebra Done Right — Sheldon Axler
- Introduction to Linear Algebra — Gilbert Strang
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.