Similarly, we can solve equations like \(\frac{2}{3}\cdot x=5\) over the rational numbers. Why? Because \(\frac{2}{3}\) has a (group) inverse in the group \(\mathbb{Q}\setminus\{0\}\) (under multiplication), namely \(\left(\frac{2}{3}\right)^{-1}=\frac{3}{2}\text{,}\) and
and we already know this does not have a solution. We can’t just use this idea willy-nilly; indeed, there isn’t a \(52^{-1}\) in this case.
Hence we introduce a new group – and it’s even a simple set to define.
Definition9.1.2.
We let \(U_n\text{,}\) the group of units modulo \(n\), be the set of equivalence classes \([a]\) modulo \(n\) such that \(\gcd(a,n)=1\text{.}\)
This will be the set where we are allowed to do inverses, and hence to solve things easily. Recall Definition 5.3.4 and Question 5.3.6.
Example9.1.3.
Before going on, figure out for yourself the elements of \(U_5\) and \(U_{8}\text{.}\)
Now, naming something doesn’t guarantee it’s useful, or that it performs as claimed! So we need to check some things from Definition 8.3.3.
Proposition9.1.4.
The group of units is really a group.
Proof.
First, this is certainly a set. Since we earlier proved that any two elements of a residue class have the same gcd with a modulus, the definition makes sense, and we know how to check if something is in it.
Next, the set is associative with respect to multiplication, because it’s really the same as multiplication over \(\mathbb{Z}\text{.}\) The identity element \([1]\) is likewise inherited from \(\mathbb{Z}\text{.}\) We have inverses because we only allow elements that will have solutions to \(ax\equiv 1\) according to Proposition 5.1.1; see also Question 5.3.6 and Exercise 5.6.5.
Finally, we do need to check whether the multiplication is closed on this set. After all, it’s not obvious that if \(ax\equiv 1\) and \(bx\equiv 1\) have solutions, then so does \((ab)x\equiv 1\text{!}\) But if \(\gcd(a,n)\) and \(\gcd(b,n)\) are both \(1\text{,}\) then \(ab\) will also be coprime to \(n\text{,}\) which is all that is needed 1
Try proving this two ways, using tools in Chapter 3 and then those in Chapter 6.
. All in all, that means \(U_n\) really and truly is a group.
Subsubsection9.1.2.2More facts and examples
The terminology units makes sense too. If you are in a number system with addition and multiplication, then a unit is an element that has a multiplicative inverse.
Example9.1.5.
Here are some examples of units.
In the integers, \(\pm 1\) are the units.
More unusual is the set of complex numbers (!), which are all units (except zero). In fact, the inverse of \(r\left(\cos(\theta)+i\sin(\theta)\right)\) is
And \(U_n\) is the set of all the integers modulo \(n\) that have multiplicative inverses. By our previous investigations, we know this is when \(ax\equiv 1\) (mod \(n\)) has a solution. Since multiplication is the operation, there are inverses!
Naturally, it can take a while to list all the elements of \(U_n\text{,}\) but it’s worth doing. Try it for \(n=10\text{,}\)\(n=11\text{,}\) and \(n=12\) by hand (see Exercise 9.6.1).
Sage has commands to list the group of units and give the order of the group. Try them interactively here, or individually below.
Sage note9.1.6.Reminder to try things out.
Remember, you can use these yourself by using these commands, or by cutting and pasting them in a Sage or Jupyter notebook, CoCalc, or command line interface. They are tedious to type, though!