 Can we define a group under multiplication mod n? Yes, if we're careful. Now, multiplication mod n is associative and has identity 1, but will we always have inverses? Let's take a look. So the first thing we might observe is that since multiplication by 0 always gives 0, then 0 can't have an inverse. We'll return to this idea later. Could the remaining elements, 1, 2, 3, up to n minus 1, have inverses under multiplication mod n? Well, let's consider. So let's start off by finding a necessary condition. Suppose pq is congruent to 1 mod n. Then we know that n divides pq minus 1, and so pq minus 1, well that's n times something, or rearranging pq minus nk is equal to 1, and this means that any common divisor of p and n must also divide 1. Consequently, if p has a multiplicative inverse mod n, then p and n are relatively prime. While this tells us what happens if we have an inverse, we need to know if the inverse exists. So we're looking for a sufficient condition. Our results suggest that we may want to start with a case where p and n are relatively prime. For this, we'll need something called Bezier's Lemma. Suppose the greatest common divisor of two numbers is d, then there exist integers x and y, where px plus qy is equal to d. In other words, we can express that greatest common divisor as a linear combination of the two numbers. So if p and n are relatively prime, then Bezier's Lemma guarantees there are integers x and y, where px plus ny is equal to 1. And from here, we can work things backwards. So px must be negative ny plus 1, which tells us that px must be congruent to 1 mod n. And so if p and n are relatively prime, then p does have a multiplicative inverse mod n. So we might find the elements of the multiplicative group of integers mod 10, and then let's produce our Cayley table. Since every element of a group has to have an inverse, then we need to begin with the numbers that are relatively prime to 10. And so the elements will be 1, 3, 7, and 9. At our Cayley table, the products of these numbers with each other will be... Now, let's consider an important special case. Let's consider the powers of a mod n. Since the number of elements in a mod n is finite, the powers must eventually repeat. And since the product of two powers is another power, the powers will be closed under multiplication. And so the question is, does this produce a group? And the answer is, sometimes, but not always. For example, let's consider the powers of 2 mod 10. Is this a group under multiplication? And so we find our powers of 2. 2 is just 2. 2 to the second is 4. 2 to the third is 8. 2 to the fourth is 16, which reduces to 6 mod 10. And for 2 to the fifth, we'll take advantage of the fact that working mod 10, we never have to work with numbers larger than 10. So 2 to the fifth is really 2 to the fourth times 2. But I already know that 2 to the fourth is congruent to 6. And so 2 to the fifth is 6 times 2, 12, which reduces back to 2. And we're back to our starting point. And so our distinct powers are going to be 2, 4, 8, and 6. And we look at our elements and say, well, this isn't a group because it doesn't have the identity. Or does it? Let's produce our Cayley table. So remember, the identity is going to be the element where, if we operate with it, we get what we started with. So we can look through our Cayley table and see if we have a copy of the table column headers. And we have one here, which means that 6 times something gives us what we started with. 6 times 2 is 2. 6 times 4 is 4. 6 times 6 is 6. And 6 times 8 is 8. Also, we want to see if we can right multiply by 6. And so we check this column and we see that 2 times 6 is 2. 4 times 6 is 4. 6 times 6 is 6. And 8 times 6 is 8. And that means 6 is the identity. And so we see that multiplication is associative and the powers of 2 mod 10 form a closed set with identity 6. And you can verify that the table does satisfy the Latin square property and so every element has an inverse. This is actually a group.