In more general stuctures, rings, we define *units*, *irreducible elements* and *prime elements*. (What follows is slightly modified quotes from Wolfram MathWorld.)

**Unit**

A unit in a ring is an element $u$ such that there exists $u^{-1}$ where $u \cdot u^{-1}=1$.

**Irreducible Element**

An element $a$ of a ring which is *nonzero*, *not a unit*, and whose only divisors are the trivial ones (i.e., the units and the products ua, where u is a unit). Equivalently, an element a is irreducible if the only possible decompositions of a into the product of two factors are of the form $a=u^{-1}ua$,
where $u^{-1}$ is the multiplicative inverse of $u$.

**Prime Element**

A *nonzero* and *noninvertible* element a of a ring $\mathbf R$ ... characterized by the condition that whenever $a$ divides a product in $\mathbf R$, $a$ divides one of the factors. The prime elements of $\mathbb Z$ are the prime numbers, $\mathbf P$.

**Comments**

In an integral domain, every prime element is irreducible, but the converse holds only in unique factorization domains. The ring $\mathbb Z[i \sqrt 5]$, where $i$ is the imaginary unit, is not a unique factorization domain, and there the element $2$ is irreducible, but not prime, since $2$ divides the product
$(1-i \sqrt 5)(1+i \sqrt 5)=6$, but it does not divide any of the factors.

In the ring of integers, all irreducible elements are also prime elements.

Note that prime and irreducible elements cannot be zero or units.

So why omit zero?

Note that $0$ meets the definition of a prime number since, if $0$ divides $ab$, then zero divides $a$ or zero divides $b$.

But zero is not irreducible since every number divides $0$.

So if we want our prime numbers to also be irreducible, we must require that they not be equal to $0$.