Hello! Welcome to the fourth lesson in our abstract algebra course.
In our previous lesson, we established the concept of modular congruence (), an equivalence relation that preserves addition and multiplication. We saw how this allows us to simplify complex calculations by reducing numbers at each step.
Today, we will build directly on that foundation. Our goal is to perform addition and multiplication in the ring of integers modulo n (). We will formalize the "clock arithmetic" we've been using into a concrete algebraic structure with a well-defined set of elements and operations. This is a crucial step towards defining the groups, rings, and fields that are the central focus of this course.
1. The Integers Modulo n: From Congruence to a Set
In the last lesson, we saw that congruence modulo is an equivalence relation. This means it partitions the set of all integers () into distinct collections, called equivalence classes. For a given , the equivalence class of an integer , denoted [a], is the set of all integers that are congruent to modulo .
For example, in modulo 5:
[0] = {..., -10, -5, 0, 5, 10, ...}[1] = {..., -9, -4, 1, 6, 11, ...}[2] = {..., -8, -3, 2, 7, 12, ...}[3] = {..., -7, -2, 3, 8, 13, ...}[4] = {..., -6, -1, 4, 9, 14, ...}
Notice that [5] would be the same set as [0], [6] the same as [1], and so on. There are exactly such unique classes, which we can represent by the standard remainders [0], [1], ..., [n-1].
The set of integers modulo n, denoted ** **, is precisely this set of equivalence classes.
For simplicity, we often drop the brackets and write , but it's vital to remember that each element represents an entire class of integers.
2. Are Operations on Well-Defined?
This brings us to a critical question. We want to define addition and multiplication on these classes, for example, by setting [a] + [b] = [a+b]. But does this definition depend on the specific representatives we choose from each class?
For instance, in , we know [2] = [7] and [4] = [9].
Does [2] + [4] give the same result as [7] + [9]?
[2] + [4] = [2+4] = [6] = [1][7] + [9] = [7+9] = [16] = [1](since )
The results match! This property is called being well-defined. It ensures that our arithmetic on classes is consistent, no matter which member of the class we use for the calculation.
Given your background in writing proofs, it is valuable to see the formal argument for why addition and multiplication on are well-defined. The following video walks through these proofs, which are based on the divisibility definition of congruence we covered previously.
(Abstract Algebra 1) Integers Modulo n
Watch this section from the 'Integers Modulo n' video by learnifyable to see the formal proofs that addition and multiplication on equivalence classes are well-defined.
Watch from 3:14 to 10:36. The first part (3:14-7:00) proves it for addition, and the second part (7:00-10:36) proves it for multiplication. Pay attention to how the assumption a_1 \equiv a_2 \pmod n is translated into n \mid (a_1-a_2) to build the argument.
3. Performing Addition and Multiplication in
Now that we know these operations are consistent, we can confidently compute. The rules are simple and align with the "remainder method" we've discussed.
The following resource provides a very clear and practical guide to performing arithmetic in \mathbb{Z}_n.
Read the sections that introduce the integers mod n and provide an extended example with Z_6. These are found on pages 2-4, starting from the heading 'The integers mod n' and ending just before the list of examples. Focus on how to add, multiply, take powers, and handle negative numbers.
To summarize the key idea from the reading:
- To add and in : Compute their sum as integers, then find the remainder when you divide by .
- To multiply and in : Compute their product as integers, then find the remainder when you divide by .
Example: In :
- . Since , we have .
- . Since , we have .
- To compute , we can think of it as . The additive inverse of 6 in is 1, because . So, . Alternatively, , and .
4. Visualizing Operations: Cayley Tables
A powerful way to visualize the entire structure of for small is to create Cayley tables (or operation tables). These tables show the result of applying the operation to any two elements in the set.

Constructing these tables helps solidify your understanding of the mechanics. Let's look at a few more examples.
This text from Mathematics LibreTexts formally introduces the operations and provides complete addition and multiplication tables for \mathbb{Z}_6 and \mathbb{Z}_7.
Read the section titled 'The set of integers modulo n.' It's near the middle of the page. Pay attention to the special notation \oplus (circled plus) and \odot (circled dot) used to distinguish these new operations from standard integer arithmetic. Compare the multiplication table for \mathbb{Z}_6 (where n is composite) with that of \mathbb{Z}_7 (where n is prime) - do you notice any differences? We'll explore these differences later in the course.
If you'd like a guided walkthrough of building a table, the first part of this video is a helpful, practical demonstration.
Addition and Multiplication Tables in Modulo Arithmetic | SHS 2 CORE MATH
For a step-by-step walkthrough, this video shows how to construct an addition table for \mathbb{Z}_5.
Watch from 0:56 to 3:29. This part focuses only on constructing the addition table.
5. Practice Your Skills
Now it's time to put this into practice. The best way to get comfortable with is to perform computations.
Test your understanding!
Compute the following:
- In :
- In :
- In :
- In :
Show answer
- In : . The remainder of 12 divided by 8 is 4. So, .
- In : . The remainder of 12 divided by 5 is 2. So, .
- In : . The remainder of 24 divided by 12 is 0. So, . (This is an example of "zero divisors," which we'll discuss when we study rings!)
- In : . We can compute this as . So, . Alternatively, we can reduce at each step: . Then .
For more practice, work through the following set of examples.
The 'Commutative Rings and Fields' resource has an excellent set of worked examples covering various moduli.
Review the examples on page 5. Try to solve each problem (a through g) yourself first, then compare your answer and method to the solution provided.
Conclusion
In this lesson, we made the leap from the abstract idea of congruence to a tangible algebraic system, . This set, equipped with modular addition and multiplication, is a cornerstone of abstract algebra.
Key Takeaways:
- is the set of integers representing equivalence classes modulo .
- Addition and multiplication in are performed by taking the standard sum or product and then finding the remainder after division by .
- These operations are well-defined, meaning the outcome is independent of the specific integer we choose to represent an equivalence class.
- Cayley tables provide a complete visual map of the operations for a given .
Preview of the Next Lesson:
We have now defined a set and two operations. Next, we will narrow our focus to a single operation: addition. We will investigate the structure of and verify that it satisfies the properties of a group—our first major algebraic object. We will also see that it has a special property that makes it a cyclic group.