-2

I am revisiting Euler's criterion, so I bumped into the following statement which I don't know how to prove.

Let $p$ be some prime number and $a \in \mathbb{Z}$.

How to prove that for every $x \in \{1, 2, ..., p - 1\}$ there exist exactly one $y \in \{1, 2, ..., p - 1\}$ such that $xy \equiv a \pmod p$? (Of course, "exatcly one" in terms of modulo $p$.)

How to generalise this when $p$ is not a prime number?

1b3b
  • 1,276
  • 1
    Uniqueness comes from $p$ being a prime dividing $x(y_1-y_2)$, if both $xy_1$ and $xy_2$ give the same remainder. Note that $p$ doesn't divide $x$ and therefore, must divide $y_1-y_2$. For existence note that $x\cdot 1,x\cdot 2,...,x\cdot(p-1)$, by the argument above, give $p-1$ different non-zero remainders modulo $p$, but there are only $p-1$ such remainders. Therefore, one of the must be the same remainder as $a$. – plop May 31 '21 at 13:52

1 Answers1

1

This is a consequence of Bezout's theorem. If $(a,b)=1$ then there exists integers $x,y$ such that $ax+by=1$. Therefore $ax\equiv 1 \mod b$. Since $p$ is prime, just set $b=p$(b in my notation) and now we know that we can invert $a$(which is $x$ or $y$ in your example).

Lets look at your example again, $xy\equiv a \mod p$. From what I've just said, we know since $(x,p)=1$, the inverse $x^{-1}$ exists thus $$x^{-1}xy\equiv x^{-1}a \mod p$$ $$y\equiv x^{-1}a \mod p$$ so $y$ is unique mod $p$. As I also mentioned, $p$ being prime was never required, we just needed $x$ and $p$ to be coprime.

This can also be interpreted as, for any integer $n$, the integers less than $n$ which are coprime to $n$ form a group, therefore have inverses.