7

Here I am trying to find the multiplicative inverse of 19 respect to 29.

$$19x \equiv 1 \pmod{29} $$

What I tried

\begin{align*} 29 &= 1(19) + 10\\\ 19 &= 1(10) + 9\\\ 10 &= 1(9) + 1. \end{align*}

From backtracking, I came up with the

\begin{align*} 1 &= 2(29) - 3(19)\\\ \end{align*}

However, 3 is not a multiplicative inverse of the 29. Where am I making a mistake?

I looked many answers including this answer; however, couldn't figure out my mistake.

  • 3
    The inerse is $-3$ here, which is congruent to $26$ – Peter Oct 12 '19 at 14:02
  • Instead of rote rule application to the Bezout identity you should remember its genesis, viz. reducing $, a n + b m = 1,$ modulo $n$ yields $,bm\equiv 1,$ so $, m\equiv b^{-1}\pmod{!n}.,$ In your case $, b = -3,$ (you forgot to include the sign). Generally one should always strive to remember the conceptual heart of the matter vs. rote rules. – Bill Dubuque Oct 12 '19 at 14:17
  • 1
    Btw, it is easier and far less error-prone to forward propagate the equations, e.g. see here and here. – Bill Dubuque Oct 12 '19 at 15:26
  • @BillDubuque Do you agree with my suggested choice of duplicate? – Jyrki Lahtonen Oct 13 '19 at 09:23
  • FWIW I haven't downvoted on the answers here even though I am tempted, and encourage the practice. A site this age has certainly covered all the nooks and corners of Euclid, so it behooves 20k+ users to search first. When they obviously don't, a downvote is A) a reminder, B) a gesture of strong disproval. – Jyrki Lahtonen Oct 13 '19 at 09:25
  • @JyrkiLahtonen No, I don't agree (and I have reopened it) because the essence of the question ("figure out my mistake") has to do not with the mechanics of the extended Euclidean algorithm but rather with the inference mentioned in my comment above. That is probably a dupe but I don't have time to search for it now (probably not easy to locate). I don't think that we should lower our standards for quality of dupe targets simply because the question is very elementary (or because one is frustrated with certain classes of questions). – Bill Dubuque Oct 13 '19 at 13:56
  • @BillDubuque I'm not going to challenge your decision. But I don't think the purpose of the site is to collect "answers" to minor confusions like this. I get the impression that a quick comment would have cleared up the matter for this asker. It is fine to explain it in the comment, but the material does not add anything new to the site. The level of the question is, of course, irrelevant for purposes other than the abundance of related threads. For example, this could have been adequately handled in the main chatroom, where a lot of teaching takes place. – Jyrki Lahtonen Oct 14 '19 at 04:39

3 Answers3

3

What you have found indeed is that $-3\equiv 26$ is the multiplicative inverse of $19$ $\mod 29$.

user
  • 154,566
3

Reducing your backtracking result modulo $29$, it becomes $$ 1\equiv -3\cdot 19\pmod{29} $$ Which is to say, the multiplicative inverse of $19$ is $-3$.

Arthur
  • 199,419
  • 1
    This is a correct explanation, so why was it downvoted? – Bill Dubuque Oct 12 '19 at 14:07
  • @BillDubuque The ways of the downvote fairies are ineffable. But yeah, I'm wondering that too. I mean, there are other correct answers here, but I feel my approach is at least a tiny bit distinct. – Arthur Oct 12 '19 at 14:08
3

You're almost there! Multiply both sides by $-3$ and you have $$-57x\equiv -3\pmod {29}\\x\equiv-3\equiv26\pmod{29}$$