Skip to content
Tutorials Center
My learning

Topics

Lesson 24 of 37 ยท Rings and Ideals

Rings: The Definition

Learn the ring axioms, meet rings such as the integers, Z_n, polynomials and matrices, and test the axioms with a short Python checker.

A group has one operation. Many number systems have two: you can add and you can multiply, and the two interact through the distributive law. A ring captures this. The integers, the integers mod n, polynomials and square matrices are all rings, and the theory of rings explains why arithmetic works the way it does.

The axioms

A ring is a set R with two operations, addition + and multiplication ยท, such that:

  1. (R, +) is an abelian group. Its identity is written 0, and the inverse of a is -a.
  2. Multiplication is associative: (a ยท b) ยท c = a ยท (b ยท c).
  3. Multiplication distributes over addition, on both sides:
    • a ยท (b + c) = a ยท b + a ยท c
    • (a + b) ยท c = a ยท c + b ยท c

Most textbooks also require a multiplicative identity 1 with 1 ยท a = a ยท 1 = a (a "ring with unity"). This track assumes rings have a 1 unless stated otherwise. If multiplication is commutative, R is a commutative ring.

Notice what is not required: multiplicative inverses, commutativity of multiplication, or the product of two nonzero elements being nonzero. Each of these will be the topic of a later definition.

First consequences

From the axioms alone you can prove:

  • 0 ยท a = 0 for every a. (Proof: 0 ยท a = (0 + 0) ยท a = 0 ยท a + 0 ยท a; subtract 0 ยท a from both sides.)
  • (-a) ยท b = -(a ยท b).
  • (-1) ยท (-1) = 1.

These are the "rules of signs" you learned at school, but now they are consequences of axioms rather than facts to memorize.

Examples

Ring Commutative? Notes
โ„ค, โ„š, โ„, โ„‚ yes The usual number systems.
โ„คโ‚™ yes Integers mod n, with + and ยท mod n.
โ„[x] yes Polynomials with real coefficients.
Mโ‚‚(โ„) no 2 ร— 2 real matrices.
yes The zero ring, where 0 = 1.

The matrix example shows why commutativity is an extra assumption: for A = [[0, 1], [0, 0]] and B = [[0, 0], [1, 0]] one gets AB โ‰  BA.

Checking the axioms by machine

For a finite set with two operation tables, you can check every axiom exhaustively. Let's verify that โ„คโ‚™ is a commutative ring with unity, and that a differently defined structure fails the test.

Python Brute-force ring axiom checker

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The first table is all True. The second structure fails the distributive law and the identity axiom (because max(1, a) is not a for a = 0), even though addition is still a perfectly good group.

A noncommutative example

Let's work in Mโ‚‚(โ„คโ‚‚), the 2 ร— 2 matrices with entries in โ„คโ‚‚. It has 2โด = 16 elements. We test commutativity by brute force and count how many pairs fail.

Python Matrices over Z2 form a noncommutative ring

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A homomorphism of rings must respect both operations: f(a + b) = f(a) + f(b) and f(a ยท b) = f(a) ยท f(b), and (for rings with unity) f(1) = 1. The map โ„ค โ†’ โ„คโ‚™, x โ†ฆ x mod n, is the standard example.

Next you will study the elements that can and cannot be inverted in units and zero divisors.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which is NOT required by the ring axioms (for a ring with unity)?

    Commutative multiplication is extra: it defines a commutative ring.
  2. 2. In any ring, 0 times a equals...

    0a = (0 + 0)a = 0a + 0a, so 0a = 0.
  3. 3. Which of these is a noncommutative ring?

    Matrix multiplication generally satisfies AB != BA.
  4. 4. What must (R, +) be in a ring?

    Addition is required to be an abelian group; commutativity of + actually follows from the distributive laws when R has unity, but it is part of the standard definition.

Summary

  • A ring has an abelian group under +, an associative ยท and two distributive laws; this track also assumes a 1.
  • 0 ยท a = 0 and the usual sign rules follow from the axioms.
  • โ„ค, โ„คโ‚™, polynomials and matrices are rings; matrices are not commutative.
  • Ring homomorphisms preserve both + and ยท (and 1).
  • Inverses and cancellation are not guaranteed; the next lessons study when they hold.

Next: Units and Zero Divisors