# Integral domains¶

Now that you have seen a few examples of rings, we will talk about a
particular kind of ring called an *integral domain*.

There is a fact about \(\mathbb{R}\) which you might know already, called
the **cancellation law**, which says that for any \(a, b, c \in
\mathbb{R}\), such that \(a \neq 0\) and \(ab = ac\), it must be the
case that \(b = c\). We can establish this without too much effort: since
\(a\) is nonzero, we can divide both sides of the equation \(ab = ac\)
by \(a\), and this yields the desired result.

Now \(\mathbb{R}\) is a ring, so we might now wonder if a version of the above statement is true for all rings. In fact it is not, and at this point I can show you two counterexamples!

First recall the ring \(\mathbb{Z}_{12}\). In this ring, if we let \(a = \overline{6}, b = \overline{5},\) and \(c = \overline{1}\), then \(a \neq \overline{0}\) and \(ab = ac\), but \(b \neq c\) (check this!).

Now, consider the ring \(\mathrm{Mat}(2;\mathbb{R})\). In this ring, we have

but also

so if we define

then we have \(AB = AC\) and \(A \neq 0\), but \(B \neq C\).

So what do we do now? Clearly the cancellation law holds for some rings, but not all of them. Whenever we come across a new ring, or if we are just working with some abstract ring and we don’t know which specific ring it is, we would like to be able to say whether the cancellation law holds in it.

To do this we need a new definition. Let \(R\) be any ring, and let
\(a \in R\) with \(a\) nonzero. We say that \(a\) is a
**zero-divisor** if there exists a nonzero \(b \in R\) such that either
\(ab = 0\) or \(ba = 0\).

Note

In a commutative ring \(ab\) is always equal to \(ba\), so it is redundant to say “either \(ab = 0\) or \(ba = 0\)”; we might as well just say “\(ab = 0\)”. However, we want our theory to work with noncommutative rings too, which is why we specify that either \(ab = 0\) or \(ba = 0\).

**Exercise 6.1.** Show that \(a = \overline{3}\) is a zero-divisor in
\(\mathbb{Z}_{12}\) by finding a value \(b\) such that \(ab =
\overline{0}\).

**Exercise 6.2.** Let \(R\) be any ring. Show that the multiplicative
identity in \(R\) cannot be a zero-divisor.

Now we can introduce integral domains; an **integral domain** is a non-zero
commutative ring which has no zero-divisors. We can equivalently define an
integral domain as a non-zero commutative ring \(R\) in which for all
\(a, b \in R\), if both \(a \neq 0\) and \(b \neq 0\) then their
product \(ab \neq 0\) (why?).

The natural first example of an integral domain is \(\mathbb{Z}\), and this is probably where the name “integral domain” comes from.

Our next example of an integral domain is \(\mathbb{Z}_2\). Why is this an integral domain? Well, first, we know it is a commutative ring (we saw this in the Rings chapter). But we still need to check it has no zero-divisors. In this case there are only two elements to check: \(\overline{0}\) and \(\overline{1}\). We can immediately rule out \(\overline{0}\), because a zero-divisor must be nonzero. We also saw in exercise 6.2 that \(\overline{1}\) cannot be a zero-divisor of \(\mathbb{Z}_2\) because it is the multiplicative identity. Therefore \(\mathbb{Z}_2\) has no zero-divisors. So we have established that \(\mathbb{Z}_2\) satisfies both of the requirements to be an integral domain.

We have also seen some non-examples. We found a zero-divisor in \(\mathbb{Z}_{12}\) in exercise 6.1, so \(\mathbb{Z}_{12}\) is not an integral domain. We also saw a zero-divisor in \(\mathrm{Mat}(2;\mathbb{R})\) earlier in this chapter, namely the matrix \(A\), so this ring is not an integral domain either. We could also show that \(\mathrm{Mat}(2;\mathbb{R})\) is not an integral domain by observing that it is not commutative.

**Exercise 6.3.** Show that \(\mathbb{Z}_{8}\) is not an integral domain.

I think it is quite an interesting result that whether or not \(\mathbb{Z}_m\) is an integral domain depends on the choice of \(m\); in particular, we now know that \(\mathbb{Z}_2\) is an integral domain, but neither of \(\mathbb{Z}_{12}\) or \(\mathbb{Z}_8\) are.

**Exercise 6.4. (hard)** Try to establish whether \(\mathbb{Z}_m\) is an
integral domain for a couple more choices of \(m\). Can you think of a rule
for determining whether \(\mathbb{Z}_m\) is an integral domain for any
given \(m \geq 2\)?

## The cancellation law for integral domains¶

The subheading of this paragraph probably gives the game away a bit. Well anyway, I can reveal to you that the cancellation law holds for any integral domain! We just need to state and prove this now.

Let \(R\) be any integral domain. The cancellation law says that for any \(a, b, c \in R\), such that \(a \neq 0\) and \(ab = ac\), then \(b = c\).

To prove this, suppose we have \(a, b, c \in R\) with \(a \neq 0\) and \(ab = ac\). Then we can subtract \(ac\) from both sides to get \(ab - ac = 0\), and factor out \(a\) on the left hand side to get \(a(b - c) = 0\). Now since \(R\) is an integral domain, and since \(a \neq 0\), it must be the case that \(b - c = 0\), that is, \(b = c\).

Note

You might be wondering why this proof is different to the earlier proof I gave for why the cancellation law holds in \(\mathbb{R}\). The reason for this is that in \(\mathbb{R}\), every nonzero number has a multiplicative inverse, but this is not always true in an integral domain. For example, \(2\) has no multiplicative inverse in \(\mathbb{Z}\). We will talk more about multiplicative inverses later on, when we get on to fields.