-2

In algebraic structure $\langle Z_n, *\rangle$ say for $n=6$, element $3,2,4$ has no inverse. It can be seen that as $(5,6)=1$, so all elements in the set are generated, same for identity element $1$, as:

\begin{array}{|c|c|c|c|} \hline * & 0& 1 & 2 & 3 & 4 & 5\\ \hline 0 & 0& 0 & 0 & 0 & 0 & 0\\ \hline 1 & 0& 1 & 2 & 3 & 4 & 5\\ \hline 2 & 0& 2 & 4 & 0 & 2 & 4\\ \hline 3 & 0& 3 & 0 & 3 & 0 & 3\\ \hline 4 & 0& 4 & 2 & 0 & 4 & 2\\ \hline 5 & 0& 5 & 4 & 3 & 2 & 1\\ \hline \end{array}

Request hint as to which theorem can apply to explain it.

Have some basic analysis, with obvious assumption that all elements are representing modulo remainder equivalence class.:

If there exist for an element $a$ an inverse in set $x \in \mathbb{Z_n}$, then $ax\equiv 1$.

Hence, there must exist another element $a' \in \mathbb{Z_n}$ s.t. $ax= 1+a'y\implies ax+(-a')y =1$.
//Am assuming $y\equiv 1$ to match linear diophantine equation form.

Hence $(a,a')=1$.

But, this fails to explain why inverse of element $5=5$ in above table; as $a=5, x=5$, then for $y=1$, have $a'=0$.

Else, if take $y=4$, then fine; as then $(-a')y= -6.4=-24$.

Arturo Magidin
  • 398,050
jiten
  • 4,524

2 Answers2

2

By the lemma of Bézout we know that if $d = (a,b)$ there exist $x,y$ so that $d=xa+yb$. Also we know that $d|xa+yb$ for all $x,y$. Also $a$ is invertible modulo $b$ means that there exists $x$ so that $xa \equiv 1 \mod b$, which means by definition there exists $y$ so that $xa + yb = 1$.

By the previous lemma we get that this is exactly the case if $(a,b) = 1$.

Lazy
  • 4,519
  • Request to link your proof (tried, but failed) to the case for $5$ being its own inverse. – jiten Apr 29 '22 at 20:58
  • 1
    @jiten $5$ being its own inverse is linked to $5=-1$ in $\mathbb Z_6$. Being it’s own inverse means being a solution to $x^2 = 1$. If $n$ is prime we know this has (at most) 2 solutions, being $\pm 1$. If $n$ is $p^k$ for $p$ prime we need to have $x^2=1$ in $\mathbb Z_p$, so $x=\pm 1 + lp$ for some $l$. But $(\pm 1 + lp)^2 = 1 \pm 2lp + (lp)^2$. This is $1$ mod $p^k$ iff. $(lp)^2\pm 2lp = 0$. This implies $p^{k-1}|pl^2\pm 2l$. From this we can conclude that $p^{k-1}|l$ unless $p=2$. So we know the solutions are exactly those of the form $\pm 1 + l'p^k$, so modulo $p^k$ still only $\pm1$. – Lazy Apr 29 '22 at 22:19
  • 1
    @jiten If $p=2$ we can consider: Suppose $x=y+2^l$ with $y<2^l$ odd. Then $x^2 = y^2 + 2y2^l + 2^{2l}$. Now suppose $x > 2^{k-1}$, that is to say, $l=k-1$. Then this becomes $x^2 = y^2$. This means that all solutions are mirrored over $2^{k-1}$, so along with $\pm 1$ we also get $2^{k-1}\pm1$. Finally since $x^2-1 = (x-1)(x+1)$ we know that for a solution $x$ we also get a solution $x+2$ or $x-2$. But suppose solutions $x,x+2$ are both smaller than $2^{k-1}$. Then $(x+2)^2 = x^2+2x+2^2 \neq x^2+2\cdot 2^{k-1} + 2^2 = 1 + 0 + 4 = 5$. – Lazy Apr 29 '22 at 22:19
  • 1
    @jiten So this can only be the case if $5=1$, so if $k=1,2$. This then implies that the only possible cases are those so that $x,(x+2)$ lie in different halves, which implies that $\pm1, \pm1+2^{k-1}$ are the only solutions. – Lazy Apr 29 '22 at 22:20
  • 1
    @jiten Now suppose $n$ is a product of prime powers. Then $x^2=1$ modulo $n$ is by CRT equivalent to having $x^2 = 1$ modulo each prime power. This will have $2$ solutions for $p\neq 2$ or $k=2$, 1 solution for $p^k=2$ and $4$ solutions for $2^k$ with $k>2$. So if $n = 2^k\prod_i^d p_i^{a_i}$ then you get $2^d$ such solutions if $k=0$ or $k=1$, $2^{d+1}$ solutions if $k=2$ and $2^{d+2}$ solutions if $k>2$. – Lazy Apr 29 '22 at 22:20
  • Thanks a lot. Before asking on it, have to work on it. But, in the meantime please tell best source(s) for this. – jiten Apr 30 '22 at 00:04
  • There is an error in your second response. The correct one is: $(x+2)^2=x^2+2.2x+2^2$, instead of: $(x+2)^2=x^2+2x+2^2$. Am even am not able to workout if it is typo (not affects the results) or an error (affects results). Please help. – jiten Apr 30 '22 at 02:00
  • 1
    Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Apr 30 '22 at 07:36
1

You have asked two questions.

The answer to the question in the title is what you suggest when you mention linear Diophantine equations. An element $a$ in $\mathbb{Z}_n^*$ has an inverse if and only if $(a,n) = 1$ if and only if the Diophantine equation $$ ax +ny = 1 $$ has a solution. A proof is the extended Euclidean algorithm.

The answer to the second question (in the last sentence) is that $5$ is its own inverse since $5 \equiv -1 \pmod{6}$ and $-1$ is clearly its own inverse.

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
  • Request a further help on the reason for equality : $ax= 1+a'y$, as was stated from some source as with name : equivalent conditions for congruences. So it must mean the same, though it was just a terse hint there. – jiten Apr 29 '22 at 20:20
  • Also, request elaboration why element $a=3$ doesn't have an inverse above. Should there be simply all elements (including itself) be tried to show that. Say: $31+ny=1, 32+ny=1, 33+ny=1, 34+ny=1, 3*5+ny=1$ be all shown to have no value in set $\mathbb{Z_n}$ for $n,y$? Not clear. – jiten Apr 29 '22 at 20:30
  • 1
    For your first comment: to connect this argument to what you read in "some source" you want to find an $a\prime$ when $y=n$, not some random $y$. For the second comment, the greatest common divisor of $3$ and $6$ is $3$ so you can never have $3a = 1 +6a'$. – Ethan Bolker Apr 29 '22 at 20:38
  • So, in other words as $(3,6)=3$, but $(5,6)=1$, so element $5$ has inverse; as then can get the linear diophantine equation $5x+6y=1$, with $x=-1,y=1$. Also, you equivalently stated this as: $-1=x$ has it's inverse, so $a=5$ too has inverse. – jiten Apr 29 '22 at 20:42
  • 1
    Yes that's right. – Ethan Bolker Apr 29 '22 at 20:51
  • 1
    Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Apr 30 '22 at 07:37