Search

Search papers and lessons

Ring (Abstract Algebra)

Level 2 · 13 min read

A ring is a set with addition and multiplication, where addition forms a group and multiplication distributes over it, so the integers, square matrices and polynomials are all rings.

On this page

  • Colour = topic mix
  • Discrete math
  • Abstract algebra
  • ReadReady to readNot yet

TL;DR

A ring is a set with two operations, addition and multiplication, that behave the way they do for ordinary numbers. Addition must form a group: you can add, subtract and reorder sums freely. Multiplication must be associative, and it must split over addition, so that a times (b plus c) equals a times b plus a times c. The whole numbers, the square matrices of a fixed size and the polynomials with integer coefficients all satisfy these rules, so a fact proved once for rings applies to all three.

Builds on: Group (Abstract Algebra) · Leads to: Field (Abstract Algebra), where every nonzero element can also be divided, and Polynomial arithmetic as a ring

Where it's used

Number theory and cryptography. Arithmetic on the integers modulo a number, written Z/nZ\mathbb{Z}/n\mathbb{Z}, is a ring (see Modular Arithmetic). Public-key systems such as RSA compute powers and products modulo a large composite number nn, and their security rests on the difficulty of factoring nn. Their correctness rests on the ring rules: the identity that makes decryption undo encryption is a statement about multiplication in that ring.

Error-correcting codes. Many codes treat the message as a Polynomial whose coefficients come from a Finite Field, and the arithmetic of checksums and codewords is polynomial arithmetic in a ring. A decoder works with the ring operations to find and fix errors.

Computer graphics and physics. A 2×22 \times 2 or 3×33 \times 3 Matrix describes a rotation or a scaling, and the matrices of a fixed size form a ring. Composing transformations is matrix multiplication, which is multiplication in that ring. It is not commutative, which is why the order of transformations changes the result.

How it works

Take the whole numbers Z\mathbb{Z} with ordinary addition and multiplication, and check whether they form a ring. The walkthrough tests each rule with one tiny instance. The first rule is a group test, so recall what a group needs:

flowchart TD
  A["Set R with + and ×"] --> B["Step 1: (R, +) is an abelian group"]
  B --> C["Step 2: × is associative"]
  C --> D["Step 3: × splits over +"]
  D --> E["Step 4: conclude R is a ring"]
  E --> F["Step 5: odd numbers fail closure, so not a ring"]
  1. Addition forms a group. Take 33 and 55. Their sum 88 is a whole number, so the set is closed under addition. Brackets do not matter: (3+5)+2=3+(5+2)=10(3+5)+2 = 3+(5+2) = 10. There is a zero, 0+4=40 + 4 = 4. Every number has a negative: 4+(−4)=04 + (-4) = 0. Order does not matter, 3+5=5+33+5 = 5+3. That is the group rules, plus commutativity, which is why the addition is called an abelian group.

  2. Multiplication is associative. Take 22, 33 and 44. (2⋅3)⋅4=6⋅4=24(2 \cdot 3)\cdot 4 = 6 \cdot 4 = 24 and 2⋅(3⋅4)=2⋅12=242 \cdot (3 \cdot 4) = 2 \cdot 12 = 24. The grouping does not change the product. Multiplication does not need to have inverses. There is no requirement that 22 has a partner with 2⋅x=12 \cdot x = 1, and the whole numbers do not have one.

  3. Multiplication splits over addition. Take 22, 33 and 44. 2⋅(3+4)=2⋅7=142 \cdot (3+4) = 2 \cdot 7 = 14, and 2⋅3+2⋅4=6+8=142 \cdot 3 + 2 \cdot 4 = 6 + 8 = 14. The two results agree. The rule also works on the other side: (3+4)⋅2=14(3+4)\cdot 2 = 14 and 3⋅2+4⋅2=143\cdot 2 + 4 \cdot 2 = 14. These two rules are called the distributive laws.

  4. Conclusion. The whole numbers pass every test, so Z\mathbb{Z} is a ring. The ring has an identity for multiplication, 11, since 1⋅x=x1 \cdot x = x for every xx. Many texts require one, and many do not. The ring definition below does not.

  5. Now test a set that should fail. Take the odd numbers, {…,−3,−1,1,3,5,… }\{\dots, -3, -1, 1, 3, 5, \dots\}. Add two of them: 3+5=83 + 5 = 8, which is even and so not in the set. Addition is not closed, so the odd numbers are not a ring. A ring must stay inside its own set under both operations, and one failed test is enough to rule a set out. The even numbers, by contrast, do form a ring, though one without a multiplicative identity; that case is covered under Common mistakes.

The math

Definition. A ring is a set RR with two binary operations, ++ and ⋅\cdot, such that:

  1. (R,+)(R, +) is an abelian group: ++ is associative and commutative, there is an element 00 with a+0=aa + 0 = a, and every aa has an additive inverse −a-a with a+(−a)=0a + (-a) = 0.
  2. ⋅\cdot is associative: (a⋅b)⋅c=a⋅(b⋅c)(a\cdot b)\cdot c = a \cdot (b \cdot c).
  3. Multiplication distributes over addition: a⋅(b+c)=a⋅b+a⋅ca \cdot (b + c) = a\cdot b + a\cdot c and (a+b)⋅c=a⋅c+b⋅c(a + b)\cdot c = a\cdot c + b \cdot c.

The ring is commutative if a⋅b=b⋅aa \cdot b = b \cdot a for all a,ba, b. It is unital if there is an element 11 with 1⋅a=a⋅1=a1 \cdot a = a \cdot 1 = a. Here neither property is required.

Step 1 in symbols: the additive group

The condition in rule 1 says that ++ has the four group properties plus commutativity. For the whole numbers the test is: closure, a+b∈Za + b \in \mathbb{Z}; associativity, (a+b)+c=a+(b+c)(a+b)+c = a+(b+c); identity, a+0=aa + 0 = a; inverse, a+(−a)=0a + (-a) = 0; and commutativity, a+b=b+aa + b = b + a. With a=3a = 3, b=5b = 5, c=2c = 2: (3+5)+2=10=3+(5+2)(3+5)+2 = 10 = 3+(5+2).

Step 2 in symbols: associativity of multiplication

Rule 2 is (a⋅b)⋅c=a⋅(b⋅c)(a\cdot b)\cdot c = a\cdot(b\cdot c). With a=2a=2, b=3b=3, c=4c=4: both sides equal 2424.

Step 3 in symbols: the distributive law

Rule 3 is a⋅(b+c)=a⋅b+a⋅ca\cdot(b+c) = a\cdot b + a\cdot c. With a=2a=2, b=3b=3, c=4c=4: the left side is 2⋅7=142 \cdot 7 = 14 and the right side is 6+8=146 + 8 = 14.

Step 5 in symbols: a set that fails closure

Rules 1 to 3 are checked one at a time, and one failing rule is enough to rule a set out. For the odd numbers, closure of addition fails: 3+5=83 + 5 = 8 is not odd. So the odd numbers are not a ring, whatever multiplication does. The set {0,1}\{0, 1\} with ordinary addition fails the same way, since 1+1=21 + 1 = 2 is not in it.

Worked examples

Example
1. Tiny: is Z/2 a ring?

Take Z/2Z={0,1}\mathbb{Z}/2\mathbb{Z} = \{0, 1\}, the numbers mod 2, with addition and multiplication done mod 2.

  1. Addition table: 0+0=00+0=0, 0+1=10+1=1, 1+0=11+0=1, 1+1=2≡01+1=2 \equiv 0. Every result is in the set, and 11 is its own inverse because 1+1=01+1=0.
  2. Multiplication table: 0⋅0=00\cdot 0 = 0, 0⋅1=00 \cdot 1 = 0, 1⋅0=01 \cdot 0 = 0, 1⋅1=11 \cdot 1 = 1. Every result is in the set.
  3. Associativity of both operations and distributivity hold for mod 2. Each operation is ordinary arithmetic followed by reducing mod 2, and ordinary arithmetic already obeys these laws. There are only eight triples to check by hand if you want to confirm it.
  4. Distributivity, one instance: take 1⋅(1+1)=1⋅0=01\cdot(1+1) = 1 \cdot 0 = 0, and 1⋅1+1⋅1=1+1=01\cdot 1 + 1\cdot 1 = 1 + 1 = 0. They agree.
  5. Interpretation: Z/2Z\mathbb{Z}/2\mathbb{Z} is a ring, and it is also commutative and unital. In fact every nonzero element here has a multiplicative inverse (1 times 1 is 1), so it is a field, which the next lesson covers.
Example
2. Standard: 2 by 2 matrices are a non-commutative ring

Let RR be the set of 2×22 \times 2 matrices with real entries, with matrix addition and matrix multiplication. Take A=(0100)A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} and B=(0010)B = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}.

  1. Matrix addition is entrywise, so it is an abelian group. Each sum is again a 2×22 \times 2 matrix.
  2. Matrix multiplication is associative, a standard fact for matrices, and it distributes over addition. So RR satisfies rules 1 to 3 and is a ring.
  3. Compute ABAB. The first row of AA is (0,1)(0, 1), and the first column of BB is (0,1)(0, 1), so the entry is 0⋅0+1⋅1=10\cdot 0 + 1 \cdot 1 = 1. The rest of ABAB is zero, so AB=(1000)AB = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}.
  4. Compute BABA. The first row of BB is (0,0)(0, 0), so the first row of BABA is zero. The second row of BB is (1,0)(1, 0), and the second column of AA is (1,0)(1, 0), so the entry is 1⋅1+0⋅0=11 \cdot 1 + 0 \cdot 0 = 1. So BA=(0001)BA = \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}.
  5. Since AB≠BAAB \ne BA, multiplication is not commutative. The ring is therefore non-commutative.
  6. Interpretation: rings can fail to be commutative, and this matrix ring is the standard example. Order matters in the ring, so the rules must say which side a factor sits on.
Example
3. Realistic: checksum arithmetic mod 10

A checksum keeps a digit-sum mod 10. A programmer wants to use Z/10Z\mathbb{Z}/10\mathbb{Z} to combine two checksums and then multiply by a weight. The arithmetic must obey the ring rules, or the programmer cannot rearrange the steps and trust the answer.

  1. Take checksums a=7a = 7, b=5b = 5, and weight w=4w = 4. Compute (a+b)⋅w(a + b) \cdot w mod 10: 7+5=12≡27 + 5 = 12 \equiv 2, then 2⋅4=82 \cdot 4 = 8.
  2. Compute the distributive version: a⋅w+b⋅w=28+20a\cdot w + b\cdot w = 28 + 20, which mod 10 is 8+0=88 + 0 = 8.
  3. The two results agree, 8=88 = 8. That agreement is the distributive law in Z/10Z\mathbb{Z}/10\mathbb{Z}, and it is why the programmer can add first and then multiply, or multiply each term first.
  4. Now check for a zero divisor. A zero divisor is a nonzero element whose product with some other nonzero element is 0. In Z/10Z\mathbb{Z}/10\mathbb{Z}, 2⋅5=10≡02 \cdot 5 = 10 \equiv 0, even though neither 22 nor 55 is zero. Multiplying by 55 can erase information that multiplying by 22 kept. A ring allows this, and a checksum scheme must account for it.
  5. Try it: in Z/10Z\mathbb{Z}/10\mathbb{Z}, what is 3⋅4+3⋅63 \cdot 4 + 3 \cdot 6, and what is 3⋅(4+6)3 \cdot (4 + 6)? Answer: 3⋅4+3⋅6=12+18=30≡03\cdot 4 + 3 \cdot 6 = 12 + 18 = 30 \equiv 0, and 3⋅(4+6)=3⋅10=30≡03\cdot(4+6) = 3 \cdot 10 = 30 \equiv 0. They agree, as the distributive law says they must.

Common mistakes and tradeoffs

It is tempting to think that a ring must have a multiplicative inverse for every nonzero element. In fact the whole numbers are a ring, and 22 has no inverse among them. Inverses for nonzero elements are the extra property that makes a field (Field (Abstract Algebra)). A ring can have zero divisors: nonzero elements whose product is zero. In Z/10Z\mathbb{Z}/10\mathbb{Z}, 2⋅5=02 \cdot 5 = 0 although neither factor is zero, and that is why cancellation can fail there.

It is tempting to think that multiplication must be commutative. In fact the 2×22 \times 2 matrices show it need not be. Books that use "ring" for a commutative ring are common, so check the definition a text uses before applying a result.

It is tempting to think that a ring must contain 11. In fact the even integers are a ring with no 11. Many texts require one and call the other kind a rng. The choice changes which theorems apply, so state it.

It is tempting to think that a set with two operations that look like addition and multiplication is automatically a ring. In fact the rules must be checked one at a time. A set that fails distributivity is a different object, and the proofs for rings do not apply to it.

Use the ring framework when a result needs only addition, subtraction and multiplication, such as expanding brackets or working mod nn. Do not expect to divide: solving ax=bax = b for every nonzero aa needs a field.

History

Early algebra worked with numbers and polynomials one case at a time. In the later 1800s, mathematicians studying whole numbers and their algebraic extensions met collections of numbers closed under addition and multiplication. Richard Dedekind studied such collections of algebraic integers and introduced ideals, subsets that absorb multiplication by any element of the collection. The word "ring" for the general structure came later, from David Hilbert's work on number fields.

The axioms were pulled out of specific examples in the 1920s. Emmy Noether's work on ideal theory showed that many results depend only on the ring rules, not on the particular numbers, and her approach made the abstract definition the standard one. Since then, rings have become a central object of algebra, used in number theory, geometry and computer science.

Recap

  • A ring is a set with addition and multiplication, where addition forms an abelian group and multiplication is associative and distributes over addition.
  • The whole numbers, the 2×22 \times 2 matrices and the polynomials with integer coefficients are rings, and so is Z/nZ\mathbb{Z}/n\mathbb{Z} for any nn. Its additive part is a Cyclic Group.
  • Commutativity and a multiplicative identity are extra properties, not part of the definition.
  • Zero divisors such as 2⋅5=02 \cdot 5 = 0 in Z/10Z\mathbb{Z}/10\mathbb{Z} show that a ring can lack cancellation.
  • Read next: Field (Abstract Algebra), where every nonzero element has an inverse, and Polynomial and Modular Arithmetic, two families of examples that show the rules at work.

Check yourself

QuestionIs the set of even integers a ring under ordinary addition and multiplication? Which rules does it satisfy, and which property does it lack?Show answer

Yes, it is a ring. The sum and product of two even numbers are even, addition is an abelian group, and multiplication distributes over addition. It lacks a multiplicative identity, since 1 is not even. Lacking an identity does not stop it being a ring, because the identity is not part of the definition.

QuestionCompute 5 times 4 plus 5 times 6 in the integers mod 10, and compare with 5 times (4 plus 6).Show answer

5 times 4 is 20, which is 0 mod 10, and 5 times 6 is 30, which is 0 mod 10. Their sum is 0. The other side is 5 times 10, which is 50, which is 0 mod 10. Both sides are 0, as the distributive law requires.

QuestionWhy does the 2 by 2 matrix ring fail to be commutative, and what does that tell you about the order of operations?Show answer

Two particular matrices give AB different from BA: with A equal to the matrix with a 1 in the top right and B equal to the matrix with a 1 in the bottom left, AB has a 1 in the top left and BA has a 1 in the bottom right. Rings do not have to be commutative, so the order of multiplication matters, and the ring rules have to say which side a factor is on.

QuestionIn the integers mod 10, the product 2 times 5 is 0 even though neither factor is 0. What does this mean for cancellation, and why does it matter for a checksum?Show answer

If a times b equals a times c, you cannot conclude that b equals c. For example, 2 times 5 and 2 times 0 are both 0 mod 10, yet 5 is not 0. Multiplying by a zero divisor such as 5 can erase information that a unit such as 3, which has an inverse mod 10, keeps. A checksum weight should therefore be a unit, such as 3, 7 or 9.

Sources