First off, I want to state that this isn't homework. I'm simply getting ready for a quiz regarding linear congruence.
I keep working this one and can't come up with the answer, which is: $7 + 9k$.
Can someone walk me through this problem step by step?
In my notes, I marked down the four basic steps for solving these:
- Check that $\gcd(2,9) = 1$. (which it does)
- Find our $s$ and $t$ variables. (when I tried working it, $s = 1$, $t = -4$)
- Find inverse of $a$. (inverse of my $t$ value, which came out to $4$)
- Multiply by $b$, in my case, $b = 5$.
Overall I don't seem to be getting the correct answer or I'm missing a step to finish it.
Can someone show me what I should be doing?
In step 3 you should find that since you already showed that $$ 1\cdot 9-4\cdot 2=1 $$ the inverse of $a=2$ is $-4$ and not $4$. Multiplying this by $b=5$ you then get $x=-20\equiv 7\ (\mbox{mod }9)$. And with this the solution becomes $x=7+9k$ where the generator of the solutions of the homogeneous congruence $2x\equiv 0\ (\mbox{mod }9)$ namely $x=9k$ has been added to generate ALL solutions. So it works just like it should!