1

Calculate $67^{-1} \pmod{119}$.

So I tried this and I got

\begin{align*} x \equiv 67^{-1} \pmod{119} &\implies x \equiv \frac{1}{67} \pmod{119}\\ &\implies 67x \equiv 1 \pmod{119}\\ &\implies 67x = 1\\ &\implies x = \frac{1}{67} \end{align*}

I just stopped after that because I knew I was going wrong can some one please help me with this one.

dunika
  • 433
  • Is there nothing in whatever materials you are learning from that deals with solving $ax\equiv b\pmod n$ and $ax\equiv1\pmod n$? – Gerry Myerson Jan 08 '14 at 01:54
  • Consider the number 2 (mod 7) => 2*4 = 1 (mod 7) so 4 is the multiplicative inverse of 2 (mod 7) meaning 4 = "1/2" (mod 7) if I abuse this notation. 1/something just means the multiplicative inverse so which number multiplied by 67 reduces to 1 (mod 119)? – Fixed Point Jan 08 '14 at 01:54

4 Answers4

6

In modular arithmetic (or more generally, in a group), $a^{-1}$ does not mean $\frac{1}{a}$ in the usual sense of $\mathbb{Q}$, $\mathbb{R}$, $\mathbb{C}$, etc. (i.e. $67^{-1}$ does not mean $1 \div 67 \approx 0.0149$). In modular arithmetic, $a^{-1}$ means the multiplicative inverse of $a$. That is, it is the unique element in $\{1, \dots, 118\}$ such that $aa^{-1} = a^{-1}a \equiv 1 \pmod{119}$; note, the existence of an inverse for any non-zero element relies on the fact that the modulus is prime. If the modulus is not prime, the only non-zero elements which have multiplicative inverses are those which are coprime to the modulus.

Note: As Bill Dubuque outlines in his answer, provided $a$ is coprime to the modulus, you can treat $a^{-1}$ as $\frac{1}{a}$, but it represents a different value than it does in say $\mathbb{R}$.

Let $x$ be the multiplicative inverse of $67$ modulo $119$ (i.e. $x \equiv 67^{-1} \pmod{119}$). Then you are looking to solve $67x \equiv 1 \pmod{119}$. By definition, $67x \equiv 1 \pmod{119}$ means that $119 \mid (67x - 1)$ so there is some integer $y$ such that $67x - 1 = 119y$, or written differently $67x + 119y = 1$. Note, if $67$ and $119$ weren't coprime, this equation would have no integer solutions. This is a diophantine equation that you can solve by using the Euclidean algorithm and back substitution. Have you seen this before?

  • The first paragrah is incorrect. Fractional arithmetic works fine mod $m$ as long as one restricts to denominators coprime to $m.,$ You can find many examples in my posts here, e.g. see my answer to this question. – Bill Dubuque Jan 08 '14 at 05:17
  • Fractional arithmetic mod $m$ by restricting to denominators coprime to $m$ is precisely what I said, except instead of writing a denominator of $a$, you write $a^{-1}$. When I said $a^{-1}$ does not mean $\frac{1}{a}$, I mean that $67$ is a real number, as is $\frac{1}{67} \approx 0.0149$ but this is not what is meant by $67^{-1}$ in this context. From my experience, this is what students have understood $a^{-1}$ to mean, so I was pointing out that this is not the case. – Michael Albanese Jan 08 '14 at 05:21
  • 1
    The first paragraph could easily mislead students. Could you please revise it. Maybe you could say there are subtleties, and refer to the warning in my answer. – Bill Dubuque Jan 08 '14 at 05:25
  • 1
    @BillDubuque: I have edited my answer. Just for the record, I don't think what I said is wrong, though I may not have explained it clearly. I have never seen $a^{-1}$ written as $\frac{1}{a}$ when doing modular arithmetic, though I understand why it is completely legitimate to do so, and why it is appealing to do so if the student is going on to learn about rings. I suppose the difference is pedagogical rather than mathematical. I have no problems with your choice to answer the question using the method you refer to, and now the OP has two ways of looking at such problems. – Michael Albanese Jan 08 '14 at 08:05
0

Think about this. What integer between 0 and 118 would, when multiplied by 67 produce an integer that is one more than some multiple of 119?

Hint: your division is flawed in your example. You are working exclusively with integers and therefore your intended meaning of 1/67 as it is in the real numbers is not allowed.

0

Using Gauss's algorithm, $\rm\,mod\,\ 119\!:\ \dfrac{1}{67}\equiv\dfrac{2}{134}\equiv\dfrac{2}{15}\equiv\dfrac{16}{120}\equiv \dfrac{16}1$

Beware $\ $ The use of fractions in modular arithmetic is valid only when the denominator is invertible. Otherwise the quotient need not be unique, e.g. mod $\rm\:10,\:$ $\rm\:4\,x\equiv 2\:$ has solutions $\rm\:x\equiv 3,8,\:$ so the "fraction" $\rm\:x \equiv 2/4\pmod{10}\,$ cannot designate a unique solution of $\,4x\equiv 2.\,$ Indeed, the solution is $\rm\:x\equiv 1/2\equiv 3\pmod 5,\,$ which requires canceling $\,2\,$ from the modulus too, since $\rm\:10\:|\:4x-2\iff5\:|\:2x-1.\:$

Generally the grade-school rules of fraction arithmetic apply universally (i.e. in all rings) where the denominators are invertible. This fundamental property will be clarified conceptually when one learns in university algebra about the universal properties of fractions rings and localizations.

Bill Dubuque
  • 272,048
  • Could you please elaborate on what you mean by the denominator being invertible? – dunika Jan 09 '14 at 19:45
  • @user1552404 That $\ b,$ is invertible mod $m$ means $,b,x\equiv 1\pmod m,$ has a solution $,x,,$ written $,x \equiv b^{-1}$ or $,x\equiv 1/b.,$ For example, mod $,11!:,\ 4\cdot 3\equiv 1,$ so $,4^{-1}! \equiv 3\equiv 1/4.,$ When the denominator $,b,$ is invertible the fraction $,a/b,$ denotes $,ab^{-1}.,$ For such fractions with invertible denominator, the usual laws of fraction arithmetic remain valid (but they may fail otherwise). – Bill Dubuque Jan 09 '14 at 20:07
0

As $\displaystyle 119=7\cdot17$

$$67\equiv-1\pmod{17}\iff 67^{-1}\equiv-1\ \ \ \ (1)$$

$$67\equiv4\pmod7\equiv2^{-1}\text{ as }4\cdot2=8\equiv1\pmod7$$

$$\iff 67^{-1}\equiv2\ \ \ \ (2)$$

Apply CRT on $(1),(2)$