I'm a bit new to modular arithmetic on congruence classes, and I'm aware of two axioms that let me do this:
- $[a]\cdot[b]=[a \cdot b]$
- $[a]+[b]=[a+b]$
I'm also aware that when working with $\mathbb Z_4$ for example we would have:
- $[3]=[3]$
- $[4]=[0]$
- $[5]=[1]$
But what would this look like?
- $[2]^{-1}\cdot[3]$
- $[2]^{-1}+[3]$
I'm just not sure how to work with inverses. I know that $[a]\cdot[a]^{-1}=[1]$, but I'm not sure what happens if both $a$'s are different instead of the same.
Anyway, thanks.
Not every element has a multiplicative inverse modulo $n$. Indeed, since $[2] \cdot [2] = 0$, if $[2]$ had an inverse than $[0] = [2] \cdot [2] \cdot [2]^{-1} = [2]$, a contradiction.
In general, in $\mathbb Z/ n\mathbb Z$ a residue class $[m]$ has a multiplicative inverse if and only if $m$ and $n$ are relatively prime: $[m]$ has a multiplicative inverse if and only if there is a $[k]$ such that $$km \equiv 1 \mod n,$$ that is, a $k$ such that there exists $t$ such that $km -nt = 1$. This is equivalent to $n$ and $m$ being relatively prime by Bézout's lemma.