-1

This question comes from a multiple choice question that I will provide here:

If $n \in \mathbb{Z}, n \geq 1, a \in \mathbb{Z_n}$ and $\gcd(n;a) \sim D$ then $a$ has an inverse element $a^{-1}$ in the ring $\mathbb{Z_n}(x, +, \cdot)$ when

a)$D \sim 1$ ; b)$D = 1$ ; c) $n$ is a prime number and $D \sim 1$ ; d) $n$ is a prime number and $D = 1$

The correct answer should be a). I would like to ask for a way to approach this problem and what I would need to know to answer it. I know how to use the Extended Euclidian Algorithm and this question surely has something to do with it but I don't know how to apply that knowledge let alone prove this. Thankfully, this test does not require proofs.

  • 2
    What is ${\rm gcd}(a,n)\sim1$ supposed to mean? In other terms, what's the difference between $D\sim1$ and $D=1$ in this context? – Andrea Mori Jun 13 '23 at 15:59
  • 1
    In this context $D \sim 1$ is $D = 1 \lor D = -1$ – Gergely Tóth Jun 13 '23 at 16:20
  • 2
    In general the tilde is used to denote associates. – coffeemath Jun 13 '23 at 16:21
  • 1
    $\Bbb Z_n$ it's not always a field, maybe you mean ring? – Sine of the Time Jun 13 '23 at 16:24
  • @SineoftheTime that's whats's confusing for me too. That's why I picked c) but that turned out to be incorrect – Gergely Tóth Jun 13 '23 at 16:25
  • 1
    @SineoftheTime to the edited comment: I translated this question and this was the word that I found on google. It ought to be a ring then, I will correct it – Gergely Tóth Jun 13 '23 at 16:29
  • What is the difference between a) and b)? – Sine of the Time Jun 13 '23 at 16:29
  • @SineoftheTime a) D can be 1 or -1; b) D can be 1 – Gergely Tóth Jun 13 '23 at 16:30
  • @GergelyTóth since $\sim$ is an equivalence relation, you end up in both cases saying $\gcd(n,a)\sim 1$ – Sine of the Time Jun 13 '23 at 16:33
  • is in the text of the problem that $D=\pm1$? Recall that you're in $\Bbb Z_n$ so $-1=n-1$ – Sine of the Time Jun 13 '23 at 16:34
  • What is your definition of $\gcd$ in $\Bbb Z?\ $ Is it unit normalized to be nonnegative? – Bill Dubuque Jun 13 '23 at 16:38
  • What I wrote above was a statement. The general definition is: if $n|m \land m|n$ then $m \sim n$. I'm sorry for the confusion. – Gergely Tóth Jun 13 '23 at 16:40
  • @BillDubuque I don't think that's relevant here since we are working with $\mathbb{Z_n}$. But I'm just an engineering student, I wouldn't know... – Gergely Tóth Jun 13 '23 at 16:43
  • yes I know the def of associated elements, but I don't know if it's correct saying $D=\pm1$ – Sine of the Time Jun 13 '23 at 16:43
  • @SineoftheTime This is according to my professor so I can't say if it's correct or incorrect. There is an alternate statement for this same thing: If $n;1 \in \mathbb{Z}$ then $n \sim 1$ only when $n|1$ – Gergely Tóth Jun 13 '23 at 16:49
  • Yes that's true because in $\Bbb Z$ $-1|1$. since $1|n$ for all $n\in \Bbb Z$, you just have to verify $n|1$ – Sine of the Time Jun 13 '23 at 16:50
  • @BillDubuque Definition of $gcd$: 1.) $gcd (n_0, n_1) | n_0 \land gcd (n_0, n_1) | n_1$; 2.) $d \in \mathbb{N}, d|n_0 \land d|n_1 \implies d|gcd(n_0, n_1)$; This is for $n_0, n_1 \in \mathbb{Z}$ – Gergely Tóth Jun 13 '23 at 16:54
  • The question actually is sloppy all around. If $a\in\Bbb Z_n$, then $a$ is not an integer but instead an equivalence class. So it does not make sense to talk about $\gcd(a,n)$ (the gcd of two integers). Admittedly, $\gcd(a+kn,n) = \gcd(a,n)$, but this sloppiness leads to serious errors later on. – Ted Shifrin Jun 13 '23 at 16:55
  • @TedShifrin this question was on my exam. I came here to get an explanation of why a) is correct. I'm not pursuing a mathematics degree or anything of the sort. I'm sure you have the best of intentions, though. – Gergely Tóth Jun 13 '23 at 17:01
  • @Gergely It is relevant since as written it is not clear if your gcd operation is in $\Bbb Z$ or $\Bbb Z_n$ nor is it clear how it is defined. The question is poorly posed. The correct answer depends on idiosyncratic matters having to do with choice of defintions - which is a pedagogically poor choice for an exercise. – Bill Dubuque Jun 13 '23 at 17:09
  • @BillDubuque if I'm wrong, I would like to apologize. That was my first time hearing of such a thing. As I said, this question comes from an exam. All the questions are like this. I would have just wanted a way to understand why $a$ would have an inverse element if the greatest common divisor for $n$ and $a$ was associated with 1. When using the Extended Euclidean Algorithm, you would get to 1 or -1 when you are in a field. I think this question had something to do with the particular attributes of rings. – Gergely Tóth Jun 13 '23 at 17:23
  • 1
    The point is that all answers are correct, but a) is the most general answer that is correct. Every nonzero element of $\Bbb Z_n$ will have a multiplicative inverse when $n$ is prime. We are sorry you are the victim of sloppily written exam questions. And please do understand that elements of $\Bbb Z_n$ are NOT integers. – Ted Shifrin Jun 13 '23 at 17:50
  • @TedShifrin I always though that elements of $\mathbb{Z_n}$ are integers but you use special operations for addition and multiplication. $a, b \in \mathbb{Z_n}, a \oplus b = c \iff c \in \mathbb{Z_n} \land a+b \equiv c (mod \space n), a \odot b = d \iff d \in \mathbb{Z_n} \land ab \equiv d (mod \space n)$ – Gergely Tóth Jun 13 '23 at 18:09
  • @Gergely That is one of a few ways to define $\Bbb Z_n,,$ see here. See also here. – Bill Dubuque Jun 13 '23 at 19:22

1 Answers1

1

All your notations are confusing, but most importantly if a and n have a gcd of 1, by Bézout you have r,s such that $$ rn + sa =1$$ On $Z/nZ$ it gives $sa =1$ (for the reciprocity you just need to do the same backwards… Most importantly if the gcd is not 1, you will have b such that $ab =0$ in $Z/nZ$ which is very bad for inversion…