0

Some Background

This is from a proof of the existence of inverses modulo m.

Briefly written...

Let $a, m \in \mathbb{Z}$.

Assume $\gcd(a,m)=1$.

By Bezout, $\gcd(a,m)=as+mt=1$ for some $s, t \in \mathbb{Z}$.

Taking$\mod m$ we get

$$ \begin{align} 1 & \equiv as+mt \pmod m && \text{(1)}\\ & \equiv as+0\cdot t \pmod m && \text{(2) since } m\equiv 0 \pmod m \\ & \equiv as && \text{(3)}\\ & \equiv a(s\bmod m) && \text{(4)} \end{align}$$

$\therefore s\bmod m \in \{1,...,m-1\}$ is an inverse of $a$, modulo m.

My Question

My question refers to line (4). How come we are free to replace $s$ by the remainder of $s$ modulo m ($s\bmod m$)? What is the property behind this action?

Thank you.

Bill Dubuque
  • 272,048
  • 1
    Hello and Welcome to Mathematics SE. Does this help? – insipidintegrator Jul 13 '22 at 05:08
  • @insipidintegrator The link you shared makes sense, but I still don't understand how it applies to my problem. In the proof I shared, it seems to me that a substitution was performed ($s=s \bmod m$) –  Jul 13 '22 at 05:15
  • Because when we are doing arithmetic $\mod m$ we don't care about what any integers are equal to. We only care about what they are equal to plus or minus some integer multiple of $m$. So $7\mod 5$ is considered to be the exact same thing as $22\mod 5$ and $7 = 22 - 3\times 5$. So $7 = 22$ minus an integer multiple of $5$. So if $s\mod m$ is $s'$, the remainder of $s$ when divided by $m$ then $s= km + s'$ for some $k$ and $as=a(km+s')= as' +(ak)m= as'$ plus some integer multiple of $m$*. – fleablood Jul 13 '22 at 05:34
  • By the way, was this in a text? A lecturers notes? A web site? I personally would not use $(s \mod m)$ to mean the remainder $\in {1,2,3,....,m-1}$ but I'd say simply that $a \equiv $(not $\equiv$ is NOT an equal sign) $b \pmod m$ means that $m|b-a$ (which is true if and only if $a=b$ plus or minus a multiple of $m$). Line 3 I'd write as $1 \equiv as \pmod m$ (I don't know why the $\pmod m$ was omitted) and I wouldn't bother with line 4. As $as\equiv 1\pmod m$ the the class of all such $s$ is the mult inverse. – fleablood Jul 13 '22 at 05:41
  • @fleablood It is from a lecturer's notes. I believe $s\bmod m$ is explicitly shown to be the mult. inverse of $a$ modulo $m$ because it provides us with a way to find that inverse using the division algorithm as a consequence of Bezout's Theorem. –  Jul 13 '22 at 05:45
  • If we wrote it as (a(s mod m)) mod m, would it make more sense to you? – insipidintegrator Jul 13 '22 at 05:54
  • 1
    $\bmod m!:,\ s\equiv (a\bmod m)\Rightarrow as\equiv a(s\bmod m),$ by the Congruence Product Rule in the linked dupe. – Bill Dubuque Jul 13 '22 at 07:58
  • @BillDubuque How do we know that $s\equiv(a\bmod m)?$ –  Jul 13 '22 at 08:35
  • Oops typo: should say: $\bmod m!:,\ s\equiv (s\bmod m),,$ which is true by definition - viz. the remainder $,s\bmod m$ is the least natural $\equiv s\pmod{m}\ \ $ – Bill Dubuque Jul 13 '22 at 08:45

0 Answers0