0

I was reading on a website that in order to find a multiplicative inverse you just have to multiply the number you are given by $1\ldots n-1$ where $n$ is the modulus and you guaranteed to find the multiplicative inverse.

For example if you have, $5x \equiv 1 (mod 3)$, then all you have to do is multiply $5$ by $0$, $1$, and $2$. How do I know that $5 \cdot 1$ and $5 \cdot 2$ won't both generate $2$ as their equivalence class instead of $1$ and $2$ being unique equivalence classes?

Neel Sandell
  • 306
  • 1
  • 10
  • did you left out any assumption on $n$ in your question, is it a prime? – Siong Thye Goh Nov 28 '21 at 04:29
  • By the Theorem in the linked dupe, if $a$ is coprime to $n$ then $!\bmod n,$ the map $x\to ax$ is $1$-to-$1$ so onto, so it takes the value $1\ \ $ – Bill Dubuque Nov 28 '21 at 05:05
  • @BillDubuque The duplicates didn't answer my question. What is the codomain of the map? Also, isn't the map $ax \to x$ since we are dividing out $a$ not the other way around? Also, I don't see how 1 to 1 implies onto? Aren't those two distinct concepts? What takes the value $1$? – Neel Sandell Nov 28 '21 at 18:22
  • @SiongThyeGoh I should have specified that we are guaranteed to find a modular inverse. In other words, given the linear congruence $ax \equiv b \pmod{n}$, the gcd(a,n) = 1. If n was prime as you mentioned, then the gcd(a,n) would be guaranteed to be 1 unless a = p. – Neel Sandell Nov 28 '21 at 18:24
  • The map $,f(x) := ax,$ is on the finite set $,\Bbb Z_n = $ integers $!\bmod n.\ $ By the pigeonhole principle a $1$-to-$1$ map on a finite set is onto, so $f$ takes the value $1$, i.e. $,ax\equiv 1,$ for some $x\ \ $ – Bill Dubuque Nov 28 '21 at 18:57
  • Can you explain your latex ,\Bbb Z_n = ? Why is there a comma, what is Bbb? Also, is x from the domain $,\Bbb Z_n$? Thanks for the help! – Neel Sandell Nov 29 '21 at 05:26
  • @BillDubuque I know this is an old question, but isn't the statement "a $1$-to-$1$ map on a finite set is onto" only true if the domain and the codomain are the same size? – Neel Sandell Jul 02 '22 at 06:29
  • @Neel As explained in my prior comment, the map $,x\to ax,$ is on the finite set $,\Bbb Z_n = $ integers $!\bmod n,,$ which has $n$ elements - any complete set of residues, e.g. $,{0,1,2,\ldots,n!-!1}.\ $ – Bill Dubuque Jul 02 '22 at 07:30

0 Answers0