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 , is a ring (see Modular Arithmetic). Public-key systems such as RSA compute powers and products modulo a large composite number , and their security rests on the difficulty of factoring . 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 or 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 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"]
-
Addition forms a group. Take and . Their sum is a whole number, so the set is closed under addition. Brackets do not matter: . There is a zero, . Every number has a negative: . Order does not matter, . That is the group rules, plus commutativity, which is why the addition is called an abelian group.
-
Multiplication is associative. Take , and . and . The grouping does not change the product. Multiplication does not need to have inverses. There is no requirement that has a partner with , and the whole numbers do not have one.
-
Multiplication splits over addition. Take , and . , and . The two results agree. The rule also works on the other side: and . These two rules are called the distributive laws.
-
Conclusion. The whole numbers pass every test, so is a ring. The ring has an identity for multiplication, , since for every . Many texts require one, and many do not. The ring definition below does not.
-
Now test a set that should fail. Take the odd numbers, . Add two of them: , 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 with two binary operations, and , such that:
- is an abelian group: is associative and commutative, there is an element with , and every has an additive inverse with .
- is associative: .
- Multiplication distributes over addition: and .
The ring is commutative if for all . It is unital if there is an element with . 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, ; associativity, ; identity, ; inverse, ; and commutativity, . With , , : .
Step 2 in symbols: associativity of multiplication
Rule 2 is . With , , : both sides equal .
Step 3 in symbols: the distributive law
Rule 3 is . With , , : the left side is and the right side is .
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: is not odd. So the odd numbers are not a ring, whatever multiplication does. The set with ordinary addition fails the same way, since is not in it.
Worked examples
Take , the numbers mod 2, with addition and multiplication done mod 2.
- Addition table: , , , . Every result is in the set, and is its own inverse because .
- Multiplication table: , , , . Every result is in the set.
- 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.
- Distributivity, one instance: take , and . They agree.
- Interpretation: 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.
Let be the set of matrices with real entries, with matrix addition and matrix multiplication. Take and .
- Matrix addition is entrywise, so it is an abelian group. Each sum is again a matrix.
- Matrix multiplication is associative, a standard fact for matrices, and it distributes over addition. So satisfies rules 1 to 3 and is a ring.
- Compute . The first row of is , and the first column of is , so the entry is . The rest of is zero, so .
- Compute . The first row of is , so the first row of is zero. The second row of is , and the second column of is , so the entry is . So .
- Since , multiplication is not commutative. The ring is therefore non-commutative.
- 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.
A checksum keeps a digit-sum mod 10. A programmer wants to use 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.
- Take checksums , , and weight . Compute mod 10: , then .
- Compute the distributive version: , which mod 10 is .
- The two results agree, . That agreement is the distributive law in , and it is why the programmer can add first and then multiply, or multiply each term first.
- Now check for a zero divisor. A zero divisor is a nonzero element whose product with some other nonzero element is 0. In , , even though neither nor is zero. Multiplying by can erase information that multiplying by kept. A ring allows this, and a checksum scheme must account for it.
- Try it: in , what is , and what is ? Answer: , and . 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 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 , 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 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 . In fact the even integers are a ring with no . 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 . Do not expect to divide: solving for every nonzero 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 matrices and the polynomials with integer coefficients are rings, and so is for any . Its additive part is a Cyclic Group.
- Commutativity and a multiplicative identity are extra properties, not part of the definition.
- Zero divisors such as in 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
- Ring (mathematics), Wikipedia: https://en.wikipedia.org/wiki/Ring_(mathematics)
- Group (mathematics), Wikipedia: https://en.wikipedia.org/wiki/Group_(mathematics)