Find an inverse of $a$ modulo $m$ for each of these pairs of relatively prime integers

5.7k Views Asked by At

How would I find the inverse of a given number $a$ modulo $m$, given that $\gcd(a,m)=1$?

a) $a = 2$, $m = 17$

  1. $17 = 2 \cdot 8 + 1$
  2. $2 = 1 \cdot 2 + 0$

$1 = 17 - 8 \cdot 2$

<-How do I know which one is the inverse by using back substitution?