Explanation of $d^{-1}$ in modular arithmetic

149 Views Asked by At

I wasnt quite sure what to name this question, so that's what it is.

I'me working on an encryption system, and I need modulus. I already asked a question on this, here, and I cannot figure out the answer to this, and I was hoping someone could explain it a little better for me? I said that it made sense, because it seemed to, but then I realized I was doing it wrong and it was too late -_-

How does d = $d^{-1} = 103$ BECAUSE $103 \cdot 7 = 721$ and $721 ≡ 1 \pmod{ 120}$?

I understand that $721 ≡ 1 \pmod {120}$ is $6$ remainder $0$, but how does that justify that $d^{-1} = 103$? and in the second part, $103 \times 7$, why is it $\times 7$?

Any help would be appreciated! Please explain this like talking to a ten year old :D

2

There are 2 best solutions below

13
On BEST ANSWER

What is the inverse of a real number. Well...given $x$ the inverse of a real number is the number we will call $x^{-1}$ and has the following property:

$x \times x^{-1} = 1$

Okay...nothing changes in this definition when we go to modulus. If we take $d = 7$ (in mod 120), what is its inverse? It's the number that when multiplied by 7 will give us 1 as an answer. In fact:

$7 \times 103 = 721 = 1 \text{ }(mod\text{ } 120)$

So we have it! We must accept (by the definition of the inverse) that $d^{-1} = 103$, as "strange" as this may seems.

Now...can you prove that when you are dealing with prime number as the module each number will have its inverse?

6
On

The multiplicative inverse of $x$ is, by definition, another thing $x^{-1}$ such that $xx^{-1}=x^{-1}x=1$.

This definition works in the context of modular arithmetic, with modular multiplication.

According to this definition, $103\cdot 7=1\pmod {120}$ implies that $103=7^{-1}$ and $7=103^{-1}$.

While $7\cdot 103=721$ in integer multiplication, modular arithmetic mod 120 says that every multiple of $120$ is "the same thing as zero." So, $720=6\cdot 120=6\cdot 0$ is the same thing as zero, and $1+720$ is the same thing as $1$ mod $120$.