We have $20x \equiv 49 \ (mod \ 23)$
and I noticed after multiplying $20*22$ or increasing $49$ by $23$ to $440$ emoticon:|. Is there a faster way to calculate x?
Solution $x$ is $22$
Notice I must calculated this by hand
We have $20x \equiv 49 \ (mod \ 23)$
and I noticed after multiplying $20*22$ or increasing $49$ by $23$ to $440$ emoticon:|. Is there a faster way to calculate x?
Solution $x$ is $22$
Notice I must calculated this by hand
\begin{align*} 20x &\equiv 49 &\pmod{23} \\ -3x &\equiv 3 &\pmod{23} \\ x &\equiv -1 &\pmod{23} \\ &\equiv 22 &\pmod{23} \end{align*}
For this specific case, of course it is easiest to notice that $20\equiv -3$ and $49 \equiv +3$, as in the comments.
In the general case, it is useful to first apply Euclid's algorithm on the multiplier of $x$ (here, $23$ and the modulus. So let's say we needed to solve $23x=2\pmod {79}$; we would have $$ 79 = 3(23)+10\\23 = 2(10)+3\\10=3(3)+1 $$ and then $$ 1 = 10 - 3(3) = 10-3(23-2(10))\\ = 7(10)-3(23) = 7(79-3(23))-3(23) \\= 7(79) - 24(23) \equiv -24(23) $$ So $$24(23) \equiv -1 \pmod{79}$$ and $x = 24(-2) \equiv 31 \pmod{79}$.