Is every noninvertible matrix a zero divisor?

New and improved: If $A$ is singular we can get $AB=BA=0$ with no more work.

Original Yes. If $A$ is a singular square matrix then there exists a non-zero vector $v$ with $Av=0$. So if $B$ is the square matrix that has every column equal to $v$ then $AB=0$.

Better There is a non-zero "column vector" $v$ with $Av=0$. There is also a non-zero "row vector" $w$ with $wA=0$. Let $B=(b_{jk})$, where $b_{jk}=v_jw_k$. Then every row of $B$ is a multiple of $w$ and every column of $B$ is a multiple of $v$, so $BA=AB=0$.


Let $p(X) = a_n X^n + \cdots + a_1 X + a_0$ denote the minimal polynomial of $A$. The constant coefficient $a_0$ is, up to sign, the product of the distinct eigenvalues of $A$, and thus vanishes. Hence $p(A) = A(a_n A^{n-1} + \cdots + a_1) = 0$, and the polynomial $a_n A^{n-1} + \cdots + a_1\not = 0$ by the fact that $p$ is minimal.


If $A$ isn't invertible, its rows are linearly dependent, so you can find a column vector $v$ such that $Av=0$. You fill out $v$ into a square matrix (with zeros even, if you like) and you've shown $A$ is a zero divisor.

It's pretty trivial to see, then, that a matrix over $A$ any ring $R$ is a zero divisor iff there exists a nonzero vector $v$ over $R$ (with the right length) such that $Av=0$.

There are probably not many things you can say about the general case that are better than this.