1

If b = 0, then the result immediately follows. If $b \neq 0$, as $a$ is not coprime with $n$, $ab$ is not coprime with $n$ as they share a divisor. Therefore, there is no $b \in \mathbb{Z}$ such that $ab \equiv 1 \: mod \: n$ as $1$ is coprime with $n$ for all $n$.

I just saw this statement and my solution looked quite a bit different from the one given, so I am not sure if it is correct. Thanks for the feedback.

Yar
  • 31
  • 1
    You could maybe add why for a number $m = ab$ not being coprime with $n$ it’s impossible that $m \equiv n \bmod 1$. Other than that, your solution is just fine. – k.stm Oct 13 '20 at 06:03
  • 1
    Not sure I follow why $n$ being coprime with $n$ and $ab$ not being means $ab \not \equiv 1 \pmod n$. If $k\equiv j \pmod n$ would that mean either $n$ is coprime to both $k,j$ or coprime to neither? Why? I think you need to prove that (at least just for the case where one of the values is $1$). – fleablood Oct 13 '20 at 06:08
  • 1
    saying if $b=0$ the result follows, doesn't mean what you think it does. It doesn't make sense and is wrong. $b$ is the number you must solve for, and if there is not solution there is no $b$ and $b$ can't be $0$. To say "if $b=0$" is to claim that $0$ is a solution, and if $0$ is a solution then the statement is true (but it's not). What you trying to say is if we consider whether $b=0$ is a solution we see immediately that it is not (or in other words "$b$ is not a solution"). But there is absolutely no need to point that out. – fleablood Oct 13 '20 at 06:16
  • 2
    There's no need to separate the case $b=0$: the rest of the argument works perfectly well if $b=0$. Your argument seems to be using the fact "if $x$ is not coprime to $n$ then $x\not\equiv 1\pmod n$", which could well need justification. – Greg Martin Oct 13 '20 at 06:21
  • 1
    By Bezout $a$ is invertible $\bmod m\iff \gcd(a,m) = 1,,$ see the prroof in the linked dupe (of which there are many on this site) – Bill Dubuque Oct 13 '20 at 10:26
  • 1
    Your argument is not complete since you don't say how "$1$ is not coprime with $n$" allows you to make the deduction that there is no $,b,$ with $,ab\equiv 1\pmod{n}$. Perhaps you have in mind this: $,ab\equiv 1\pmod n\Rightarrow \gcd(ab,n) = \gcd(1,n) = 1,$ by Euclid' algorithm. You need to be explicit about how you finish the proof, since without such it is impossible to judge the correctness of the argument. – Bill Dubuque Oct 13 '20 at 10:56

3 Answers3

1

If $\gcd(a,n)=d$, $$d=\min\{ax+ny\mid x,y\in\Bbb Z,ax+ny>0\}$$

Thus for any $b$, $ab\equiv s(\bmod n)$, where $d\mid s$. Since $a$ and $n$ are not coprime, $d>1$, and hence it cannot divide $s=1$.

Alternatively, assume for some $b$ $,ab\equiv1(\bmod n)$, then there exists $k$ such that $ab-1=nk$, or $ab-nk=1$. If $d=\gcd(a,n)$, then $d\mid ab-nk=1$, i.e. $d$ has to be 1.

QED
  • 12,644
1

While you didn't ask for other solutions, here is a direct congruence proof of the contrapositive "if there exists $b\in\Bbb Z$ such that $ab\equiv1\pmod n$, then $a$ is coprime to $n$":

Write $d=\gcd(a,n)$. Then $ab\equiv1\pmod n$ implies $ab\equiv1\pmod d$ since $d\mid n$. But $d\mid a$ also implies $1\equiv ab\equiv 0b\equiv 0\pmod d$. Therefore $d\mid(1-0)$, proving that $d=1$.

Greg Martin
  • 78,820
0

What do you mean if $b$ is zero?

I think your solution is correct.

The contrapositive would be $ab\cong1\bmod n\implies (a,n)=1$ and follows pretty immediately from the fact that if we have $ax+by=1$, then $(a,b)=1$.

  • 1
    You write “$\cong$” deliberately or did you mean to use “$\equiv$”? That’d be \equiv – k.stm Oct 13 '20 at 06:02
  • @k.stm yeah, I do it deliberately. It reminds me of the way I learned it. Plus it's \cong, which makes sense to me. But thanks, you're not the first to ask. –  Oct 13 '20 at 06:04
  • 1
    Okay, I get your reasoning. It looks weird to me, though. Maybe we’re getting too sternly socialized in reading “$\cong$” as “isomorphic”. In any case, I have a good argument for you to change: It’s not only the common usage, Gauß himself used the symbol in his original Disquisitiones Arithmeticae. I just looked it up, see here, right at the top. – k.stm Oct 13 '20 at 06:13
  • @k.stm Wow! That is a persuasive argument. That's probably the closest anyone is going to be able to come to getting me to switch. It just seems to me that I learned that $a$ and $b$ can be "congruent $\bmod m$", and the lingo even matches. I learned from someone I considered a great master, John Stallings at Berkeley. But as we know, there's never been a greater master than Gauss. Let me think on it. And thanks! –  Oct 13 '20 at 06:19