I'm trying to find the inverse of $7$ modulo $11$. From what I understand, the steps are:
\begin{align} &11 = 1(7) + 3 \\ &7 = 2(3) + 1 \\ \end{align}
From here, you work backwards
\begin{align} 1 &= 7 - 2(3) \\ &= 7 - 2(11-7) \\ &= 7 - 2(11) + 2(7) \\ &= -2(11) + 3(7) \end{align}
Now, here I see that $7$'s inverse modulo is $3$ but there can be many more (right?). The answer book says that one of them is $8$. Now, assuming my previous steps are correct; how do I find the others?
Thanks!
EDIT:
\begin{align} 11 &= 1(7) + 4 \\ 7 &= 1(4) + 3 \\ 4 &= 3(1) + 1 \end{align}
Then,
\begin{align} 1 &= 4 - 1(3) \\ &= 4 - 1(7 - 4) \\ &= 4 - 7 + 4 \\ &= -7 + 2(4) \\ &= -7 + 2(11 - 7)\\ &= -7 + 2(11) - 2(7) \\ &= 2(11) - 3(7) \end{align}
I believe, I have figured out how they arrived at $8$. My first mistake was the incorrect euclidean algorithm execution. So, below is the correct one:
\begin{align} 11 &= 1(7) + 4 \\ 7 &= 1(4) + 3 \\ 4 &= 3(1) + 1 \end{align}
Then we work backwards
\begin{align} 1 &= 4 - 1(3) \\ &= 4 - 1(7 - 4) \\ &= 4 - 7 + 4 \\ &= -7 + 2(4) \\ &= -7 + 2(11 - 7)\\ &= -7 + 2(11) - 2(7) \\ &= 2(11) - 3(7) \end{align}
From here, we can use the following:
\begin{align} x &= x_0 + jb \quad\quad j \in \mathbb{Z} \\ y &= y_0 + ka \quad\quad k \in \mathbb{Z} \\ \end{align}
In this case, we have $x = -3 + 11j$ and $y = 2 + 7k$. Ignoring $y$, we can yield $8$ with $j=1$.