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 Z^{2} (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.
In the factor ring Z/6Z, the class of 4 is a zero divisor, since 3×4 is congruent to 0 modulo 6.
An example of a zero divisor in the ring of 2-by-2 matrices is the matrix
Left or right zero divisors can never be unitss, because if a is invertible and ab = 0, then 0 = a^{-1}0 = a^{-1}ab = b.
Every non-zero idempotent element a≠1 is a zero divisor, since a^{2} = a implies a(a - 1) = (a - 1)a = 0. Non-zero nilpotent ring elements are also trivially zero divisors.
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
A commutative ring with 0≠1 and without zero divisors is called an integral domain.