0

How $$ax ≡ ay\ (mod\ n)$$

==> $$x ≡ y\ (mod\ \frac{\ n}{gcd(a,n)})$$

How we got gcd here? Please assume I know nothing about ring theory.

Siddharth
  • 185
  • You can get the proper font and spacing for gcd and mod using \gcd and \bmod, respectively. For operators that don't have a command of their own, you can use \operatorname{name}. There's also a command \pmod as in ax\equiv ay\pmod n, yielding $ax\equiv ay\pmod n$. – joriki Feb 03 '20 at 08:06

1 Answers1

2

You can write $ax\equiv ay\pmod n$ as $ax-ay=kn$ with integer $k$. Thus $a(x-y)=kn$. Now divide by $\gcd(a,n)$ to obtain

$$ \frac a{\gcd(a,n)}(x-y)=k\frac n{\gcd(a,n)}\;. $$

Since $\frac a{\gcd(a,n)}$ has no factors in common with $\frac n{\gcd(a,n)}$, it must divide $k$, so

$$ x-y=\frac{k\gcd(a,n)}a\frac n{\gcd(a,n)}\;. $$

This is

$$ x-y=k'\frac n{\gcd(a,n)} $$

with integer $k'$, so

$$ x\equiv y\,\left(\operatorname{mod}{\frac n{\gcd(a,n)}}\right)\;. $$

joriki
  • 238,052