So, I'm trying to find the units of the following rings:
$$\mathbb{Z}/12\mathbb{Z},\, \mathbb{Z}/8\mathbb{Z},\, \mathbb{Z}/n\mathbb{Z}$$
So that means, some elements $a,a'$ in the ring such that $a/a'=1$
By trying different combinations, I am noticing that for $\mathbb{Z}/12\mathbb{Z}$
$$7\cdot7 \mod 12 = 1$$ $$5\cdot5 \mod 12 =1$$
for all elements that are prime relative to $n$. That seems to apply to the other two as well.
So my questions are:
- For a unit $u$ in $R$, does it have to be that $$u\cdot u \mod n = 1$$? That is what my trials resulted in, but is that correct?
- How to I prove that the units will all be elements prime relative to $n$?
It does not have to be so. For example, $3\times5\equiv1\pmod{7}$.
Use Bezout identity. $$\gcd(a,n)=1\iff\exists_{a,b\in\mathbb{Z}} ax+bn=1$$ and $$ax+bn=1\iff ax\equiv1\pmod{n}$$ Thus $x$ is an unit by the definition.