Mod question: $2^{-1} \bmod 5 = 3$

69 Views Asked by At

According to Wolfie:

$2^{-1} \bmod 5 = 3$

http://www.wolframalpha.com/input/?i=2%5E-1+mod+5

Why is that?

3

There are 3 best solutions below

0
On

You need to think by yourself what inverses mean, without thinking about mod 5 first. The multiplicative inverse of $a$ -if it exists- is some element $b$ such that $a\cdot b = 1$.

Now work mod 5. The inverse of $2$ is an element $b\in\mathbb{Z}/(5)$ such that 2*b=1. It shouldn't be too hard to verify that $b=3$ does the trick, i.e. $2\cdot3\equiv 1\mod 5$. If you don't know that inverses are unique yet, it may be a good exercise to establish that result first.

0
On

The result says that the (multiplicative) inverse of $2$ modulo $5$ is $3$. This is another way of saying that $3\cdot 2= 1\bmod{5}$.

In general, if $p$ is a prime, and $a$ is a number between $1$ and $p-1$, we can say that $a*{-1}\bmod{p}$ is the number $b$, between $1$ and $p$, such that $ba=1\bmod{p}$.

So $b$, in the "mod $p$" arithmetic, behaves structurally like reciprocal does in ordinary arithmetic.

More generally, let $m$ be a positive integer, and let $a$ be a number relatively prime to $m$ and between $1$ and $m$. Then there is a unique $b$ between $1$ and $m$ such that $ba\bmod{m}=1$.

This number $b$ can be called $a^{-1}\bmod{m}$. The notation $a^{-1}$ comes from Group Theory.

0
On

Because $2\cdot3=1\pmod5$ - in this sense, $3$ is the multiplicative inverse of $2$ modulo $5$, and this is formally expressed as $2^{-1}=3\pmod5$