Commutative Rings and Fields

Different algebraic systems are used in linear algebra. The most important are commutative rings with identity and fields.

Definition. A ring is a set R with two binary operations addition (denoted +) and multiplication (denoted $\cdot$ ). These operations satisfy the following axioms:

1. Addition is associative: If $a, b, c
   \in R$ , then

$$a + (b + c) = (a + b) + c.$$

2. There is an identity for addition, denoted 0. It satisfies

$$0 + a = a \quad\hbox{and}\quad a + 0 = a \quad\hbox{for all} \quad a \in R.$$

3. Every every of R has an additive inverse. That is, if $a \in R$ , there is an element $-a
   \in R$ which satisfies

$$a + (-a) = 0 \quad\hbox{and}\quad (-a) + a = 0.$$

4. Addition is commutative: If $a, b \in
   R$ , then

$$a + b = b + a.$$

5. Multiplication is associative: If $a,
   b, c \in R$ , then

$$a \cdot (b \cdot c) = (a \cdot b) \cdot c.$$

6. Multiplication distributes over addition: If $a, b, c \in R$ , hen

$$a \cdot (b + c) = a\cdot b + a\cdot c.$$

It's common to drop the "$\cdot$ " in "$a\cdot b$ " and just write "$ab$ ". I'll do this except where the "$\cdot$ " is needed for clarity.

You'll study general rings in an abstract algebra course. The rings that occur in linear algebra satisfy some additional axioms.

Definition. A ring R is commutative if the multiplication is commutative. That is, for all $a, b \in R$ ,

$$ab = ba.$$

A ring R is a ring with identity if there is an identity for multiplication. That is, there is an element $1 \in R$ such that

$$1\cdot a = a \quad\hbox{and}\quad a\cdot 1 = a \quad\hbox{for all}\quad a \in R.$$

A commutative ring which has an identity element is called a commutative ring with identity.

In a ring with identity, you usually also assume that $1 \ne 0$ . (Nothing stated so far requires this, so you have to take it as an axiom.) In fact, you can show that if $1
   = 0$ in a ring R, then R consists of 0 alone --- which means that it's not a very interesting ring!


Example. Here are some number systems you're familiar with:

The integers $\integer$ .

The rational numbers $\rational$ .

The real numbers $\real$ .

The complex numbers $\complex$ .

Each of these is a commutative ring with identity. In fact, all of them except $\integer$ are fields. I'll discuss fields below.


Example. ( The integers mod n) For this collection of examples, n will denote an integer. Actually, n can be any integer if I modify the discussion a little, but to keep things simple, I'll take $n \ge 2$ .

The integers mod n is the set

$$\integer_n = \{0, 1, 2, \ldots, n - 1\}.$$

n is called the modulus.

For example,

$$\integer_2 = \{0, 1\} \quad\hbox{and}\quad \integer_6 = \{0, 1, 2, 3, 4, 5\}.$$

$\integer_n$ becomes a commutative ring with identity under the operations of addition mod n and multiplication mod n. I'm going to describe these operations in a functional way, which is sufficient for a linear algebra course. You'll see a rigorous treatment of $\integer_n$ in abstract algebra.

(a) To add x and y mod n, add them as integers to get $x + y$ . Then divide $x + y$ by n and take the remainder --- call it r. Then $x + y = r$ .

(b) To multiply x and y mod n, multiply them as integers to get $xy$ . Then divide $xy$ by n and take the remainder --- call it r. Then $x y = r$ .

This is actually much easier to do than it is to describe! Here's an example. Suppose $n = 6$ , so the ring is $\integer_6$ .

$$\matrix{ 4 + 5 & = & 9 & \hbox{(Add them as integers \dots}) \cr & = & 3 & \hbox{(Divide 9 by 6 and take the remainder, which is 3)} \cr}$$

Hence, $4 + 5 = 3$ in $\integer_6$ .

$$\matrix{2\cdot 5 & = & 10 & \hbox{(Multiply them as integers \dots}) \cr & = & 4 & \hbox{(Divide 10 by 6 and take the remainder, which is 4)} \cr}$$

Hence, $2\cdot 5 = 4$ in $\integer_6$ .

Notice that when you take the remainder after dividing by 6, you'll always wind up with a number in $\{0, 1,
   2, 3, 4, 5\}$ .

Other arithmetic operations work as you'd expect. For example,

$$\matrix{ 3^4 & = & 81 & \hbox{(Take the power as an integer \dots}) \cr & = & 3 & \hbox{(Divide 81 by 6 and take the remainder, which is 3)} \cr}$$

Hence, $3^4 = 3$ in $\integer_6$ .

Negative numbers in $\integer_6$ are additive inverses. Thus, $-2 = 4$ in $\integer_6$ , because $4 + 2 = 0$ . To deal with negative numbers in general, add a positive multiple of 6 to get a number in the set $\{0, 1, 2, 3, 4, 5\}$ . For example,

$$\matrix{ (-3)\cdot 5 & = & -15 & \hbox{(Multiply them as integers \dots}) \cr & = & -15 + 18 & \hbox{(Add 18, which is $3 \cdot 6$)} \cr & = & 3 & \cr}$$

Hence, $(-3)\cdot 5 = 3$ in $\integer_6$ .

The reason you can add 18 (or any multiple of 6) is that 18 divided by 6 leaves a remainder of 0. In other words, "$18 = 0$ " in $\integer_6$ , so adding 18 is like adding 0.


Example. ( Addition and multiplication mod 5) Construct addition and multiplication tables for $\integer_5$ .

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & + & & 0 & & 1 & & 2 & & 3 & & 4 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 0 & & 0 & & 1 & & 2 & & 3 & & 4 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 1 & & 1 & & 2 & & 3 & & 4 & & 0 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 2 & & 2 & & 3 & & 4 & & 0 & & 1 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 3 & & 3 & & 4 & & 0 & & 1 & & 2 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 4 & & 4 & & 0 & & 1 & & 2 & & 3 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} \hskip0.5in \vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & $\cdot$ & & 0 & & 1 & & 2 & & 3 & & 4 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 0 & & 0 & & 0 & & 0 & & 0 & & 0 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 1 & & 0 & & 1 & & 2 & & 3 & & 4 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 2 & & 0 & & 2 & & 4 & & 1 & & 3 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 3 & & 0 & & 3 & & 1 & & 4 & & 2 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 4 & & 0 & & 4 & & 3 & & 2 & & 1 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} $$

Notice in the multiplication table that

$$2\cdot 3 = 1 \quad\hbox{and}\quad 4\cdot 4 = 1.$$

This means that $2^{-1} = 3$ , $3^{-1} = 2$ , and $4^{-1} = 4$ . In particular, to divide by 2 you multiply by 3: in $\integer_5$ , the elements 2 and 3 are reciprocals.


Commutative rings with identity come up in discussing determinants, but the algebraic system of greatest importance in linear algebra is the field.

Definition. Let R be a ring with identity, and let $x \in R$ . The multiplicative inverse of x is an element $x^{-1} \in R$ which satisifies

$$x\cdot x^{-1} = 1 \quad\hbox{and}\quad x^{-1}\cdot x = 1.$$

Definition. A field F is a commutative ring with identity in which $1 \ne 0$ and every nonzero element has a multiplicative inverse.

By convention, you don't write "$\dfrac{1}{x}$ " for "$x^{-1}$ " unless the ring happens to be $\rational$ , $\real$ , or $\complex$ .

If an element x has a multiplicative inverse, you can divide by x by multiplying by $x^{-1}$ . Thus, in a field, you can divide by any nonzero element. (You'll learn in abstract algebra why it doesn't make sense to divide by 0.)


Example. The rationals $\rational$ , the reals $\real$ , and the complex numbers $\complex$ are fields. Many of the examples will use these number systems.

The ring of integers $\integer$ is not a field. For example, 2 is a nonzero integer, but it does not have a multiplicative inverse which is an integer. ($\dfrac{1}{2}$ is not an integer --- it's a rational number.)


$\rational$ , $\real$ , and $\complex$ are all infinite fields --- that is, they all have infinitely many elements. For applications, it's important to consider finite fields as well. Before I give some examples, I need some definitions.

Definition. Let R be a commutative ring with identity. The characteristic of R is the smallest positive integer n such that $n\cdot 1 = 0$ . Notation: $\char R = n$ .

If there is no positive integer n such that $n\cdot 1 = 0$ , then $\char R = 0$ .

In fact, if $\char R = n$ , then $n\cdot
   x = 0$ for all $x \in R$ .

$\integer$ , $\rational$ , $\real$ , and $\complex$ are all rings of characteristic 0. On the other hand, $\char \integer_n = n$ .

Definition. An integer $n > 1$ is prime if its only positive divisors are 1 and n.

The first few prime numbers are

$$2, \quad 3, \quad, 5, \quad 7, \quad 11, \ldots.$$

An integer $n > 1$ which is not prime is composite. The first few composite numbers are

$$4, \quad 6, \quad 8, \quad 9, \ldots.$$

The following important results are proved in abstract algebra courses.

Theorem. The characteristic of a field is either 0 or a prime number.

Theorem. If p is prime and n is a positive integer, there is a field of characteristic p having $p^n$ elements. This field is unique up to ring isomorphism, and is denoted $GF(p^n)$ (the Galois field of order $p^n$ ).

The only unfamiliar thing in the last result is the phrase "ring isomorphism". This is another concept whose precise definition you'll see in abstract algebra. The statement means, roughly, that any two fields with $p^n$ elements are "the same", in that you can get one from the other by just renaming or reordering the elements.

Since the characteristic of $\integer_n$ is n, the first theorem implies the following result:

Corollary. $\integer_n$ is a field if and only if n is prime.


Example. ( Fields of prime characteristic) $\integer_2$ , $\integer_{13}$ , and $\integer_{61}$ are fields, since 2, 3, and 61 are prime.

On the other hand, $\integer_6$ is not a field, since 6 isn't prime (because $6 = 2\cdot 3$ ). $\integer_6$ is a commutative ring with identity.

For simplicity, the fields of prime characteristic that I use in this course will almost always be finite. But what would an infinite field of prime characteristic look like?

As an example, start with $\integer_2 =
   \{0, 1\}$ . Form the field of rational functions $\integer_2(x)$ . Thus, elements of $\integer_2(x)$ have the form $\dfrac{p(x)}{q(x)}$ where $p(x)$ and $q(x)$ are polynomials with coefficients in $\integer_2$ . Here are some examples of elements of $\integer_2(x)$ :

$$\dfrac{1}{x}, \quad \dfrac{x^2 + x + 1}{x^{100} + 1}, \quad 1, x^7 + x^3 + 1.$$

You can find multiplicative inverses of nonzero elements by taking reciprocals; for instance,

$$\left(\dfrac{x^2 + x + 1}{x^{100} + 1}\right)^{-1} = \dfrac{x^{100} + 1}{x^2 + x + 1}.$$

I won't go through and check all the axioms, but in fact, $\integer_2(x)$ is a field. Moreover, since $2 \cdot 1 = 0$ in $\integer_2(x)$ , it's a field of characteristic 2. It has an infinite number of elements; for example, it contains

$$1, \quad x, \quad x^2, \quad x^3, \quad \ldots.\quad\halmos$$


Example. ( A field with 4 elements) Here are the addition and multiplication tables for $GF(4)$ , the Galois field of order 4.

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & + & & 0 & & 1 & & a & & b & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 0 & & 0 & & 1 & & a & & b & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 1 & & 1 & & 0 & & b & & a & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & a & & a & & b & & 0 & & 1 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & b & & b & & a & & 1 & & 0 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} \hskip0.25in \vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & $\cdot$ & & 0 & & 1 & & a & & b & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 0 & & 0 & & 0 & & 0 & & 0 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & 1 & & 0 & & 1 & & a & & b & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & a & & 0 & & a & & b & & 1 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr & b & & 0 & & b & & 1 & & a & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} $$

You can check by examining the multiplication table that multiplication is commutative, that 1 is the multiplicative identity, and that the nonzero elements (1, a, and b) all have multiplicative inverses.


Example. Find the multiplicative inverses of the nonzero elements of $\integer_5$ .

Since 5 is prime, $\integer_5$ is a field. This means that every nonzero element has a multiplicative inverse.

$$1\cdot 1 = 1, \quad\hbox{so}\quad 1^{-1} = 1.$$

$$2\cdot 3 = 1, \quad\hbox{so}\quad 2^{-1} = 3 \quad\hbox{and}\quad 3^{-1} = 2.$$

$$4\cdot 4 = 1, \quad\hbox{so}\quad 4^{-1} = 4.\quad\halmos$$


Example. Find $8^{-1}$ in $\integer_{13}$ .

In $\integer_{13}$ , I have $8 \cdot 5 =
   1$ , so $8^{-1} = 5$ . You could do this by trial and error, since $\integer_{13}$ isn't that big:

$$8 \cdot 1 = 8, \quad 8 \cdot 2 = 16 = 3, \quad 8 \cdot 3 = 24 = 11, \quad 8 \cdot 4 = 32 = 6, \quad 8 \cdot 5 = 40 = 1.$$

Alternatively, you might reason this way: I want x so that $8 x = 1$ . Now an integer equals 1 mod 13 if it is a multiple of 13 plus 1 (because mod 13 multiples of 13 equal 0). So I take multiples of 13 and add 1, stopping when I get a number divisible by 8:

$$\eqalign{ 13 \cdot 1 + 1 & = 14 \quad\hbox{Not divisible by 8}\quad \cr 13 \cdot 2 + 1 & = 27 \quad\hbox{Not divisible by 8}\quad \cr 13 \cdot 3 + 1 & = 40 \quad\hbox{Divisible by 8}\quad \cr}$$

Then $\dfrac{40}{8} = 5$ , so $8^{-1} =
   5$ .

Even this approach is too tedious to use with large numbers. The systematic way to find inverses is to use the Extended Euclidean Algorithm.


Example. (a) Show that 2 doesn't have a multiplicative inverse in $\integer_4$ .

(b) Show that 14 doesn't have a multiplicative inverse in $\integer_{18}$ .

(a) Try all possibilities:

$$2 \cdot 1 = 2, \quad 2 \cdot 2 = 0, \quad 2 \cdot 3 = 2.$$

Note that 4 isn't prime, and $\integer_4$ is not a field. This example shows it directly: 2 is nonzero, but 2 does not have a multiplicative inverse.

(b) I could do this by trial and error, but it would be tedious because 18 is a bit large. Instead, I'll show that there is no multiplicative inverse using proof by contradiction.

Suppose $14 x = 1$ for $x \in
   \integer_{18}$ . Then

$$\eqalign{ 14 x & = 1 \cr 9 \cdot 14 x & = 9 \cdot 1 \cr 0 & = 9 \cr}$$

(Note that $9 \cdot 14 = 136 = 7 \cdot
   18 = 0$ in $\integer_{18}$ .) The last line above is a contradiction, so 14 does not have a multiplicative inverse in $\integer_{18}$ .

In general, the elements in $\integer_n$ which have multiplicative inverses are the elements which are relatively prime to n.


Example. Find the roots of $x^2 + 5 x + 6$ in $\integer_{10}$ .

Make a table:

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & x & & 0 & & 1 & & 2 & & 3 & & 4 & & 5 & & 6 & & 7 & & 8 & & 9 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr & $x^2 + 5 x + 6$ & & 6 & & 2 & & 0 & & 0 & & 2 & & 6 & & 2 & & 0 & & 0 & & 2 & \cr height2pt & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} $$

The roots are $x = 2$ , $x = 3$ , $x
   = 7$ and $x = 8$ .

You would normally not expect a quadratic to have 4 roots! This shows that algebraic facts you may know for real numbers may not hold in arbitrary rings (note that $\integer_{10}$ is not a field).


There are systematic ways for finding inverses of elements in $\integer_n$ --- for example, by using the Extended Euclidean Algorithm. I'll stick to simple cases where trial and error is sufficient.

Linear algebra deals with structures based on fields, and you've now seen most of the fields that will come up in the examples. To keep things simple, most of the example involving finite fields will use $\integer_p$ for p prime, rather than the more general Galois fields, or infinite fields of characteristic p.


Contact information

Bruce Ikenaga's Home Page

Copyright 2016 by Bruce Ikenaga