In abstract algebra, a non-zero element a of a ring R is a left zero divisor if there exists a non-zero b such that ab = 0. Right zero divisors are defined analogously. An element that is both a left and a right zero divisor is simply called a zero divisor. If the multiplication is commutative, then one does not have to distinguish between left and right zero divisors. A non-zero element that is neither left nor right zero divisor is called regular.
The ring Z of integers does not have any zero divisors, but in the ring Z2 (where addition and multiplication are carried out component wise), we have (0,1) × (1,0) = (0,0) and so both (0,1) and (1,0) are zero divisors.
An example of a zero divisor in the ring of 2-by-2 matrices is the matrix
because for instance
Left or right zero divisors can never be units, because if a is invertible and ab = 0, then 0 = a−10 = a−1ab = b.
In the ring of n-by-n matrices over some field, the left and right zero divisors coincide; they are precisely the nonzero singular matrices. In the ring of n-by-n matrices over some integral domain, the zero divisors are precisely the nonzero matrices with determinant zero.
If a is a left zero divisor, and x is an arbitrary ring element, then xa is either zero or a left zero divisor. The following example shows that the same cannot be said about ax. Consider the set of ∞-by-∞ matrices over the ring of integers, where every row and every column contains only finitely many non-zero entries. This is a ring with ordinary matrix multiplication. The matrix
is a left zero divisor and B = AT is therefore a right zero divisor. But AB is the identity matrix and hence certainly not a zero divisor. In particular, we can conclude that A cannot be a right zero divisor.
A commutative ring with 0≠1 and without zero divisors is called an integral domain.
Zero divisors occur in Z/nZ if and only if n is composite. When n is prime, there are no zero divisors and this factor ring is, in fact, a field, as every element is a unit.