Find all solutions of the following linear congruence $2x+3y≡1\pmod 7$ I've never done one with two variables, I understand that $(2, 3, 7) = 1$ and $1|1$ so there are $1*7$ solutions, and $x=0,1,2,3,4,5,6$. I have no idea how to proceed from here, and any help would be greatly appreciated!
 A: \begin{align}
2x+3y\equiv 1\bmod 7 &\iff 3y\equiv 1-2x\equiv 1+5x\bmod 7\\
&\iff y\equiv5(1+5x)\equiv5+4x \bmod 7
\end{align}
The last step is because $5$ is the inverse of $3\bmod 7$.
So this looks like a function. For every value of $x$ there is exactly one value of $y$ that makes the congruence hold.
A: For congruences involving small coefficients, a bit of familiarity with numbers, a bit of trial and error, and knowledge of basic congruence theorems can save a lot of messing around with inverses.  Here is how I would solve the problem.  First rewrite it as
$$2x\equiv1-3y\pmod7\ .$$
Now the congruence $2x\equiv a\pmod7$ has a unique solution for each $a$, because $2$ and $7$ are coprime.  So the above congruence will be satisfied by one $x$ value for each $y$ value.  To find a solution I would say, wouldn't it be nice if the RHS were even? - then I could just cancel $2$.  So I would write
$$2x\equiv 8+4y\pmod7\quad\Leftrightarrow\quad x\equiv4+2y\pmod7\ ,$$
and this is the solution.
Exercise.  Repeat the working but starting "the other way round", that is,
$$3y\equiv1-2x\pmod7\ .$$
You will probably find that you obtain a solution which looks different, then it would be a good idea to check that it is really the same.
A: This is the same as solving things as usual, note that
$$2x\equiv 1-3y\implies x\equiv 2^{-1}(1-3y)\mod 7$$
modulo $7$, the inverse of $2$ is $4$ since $2\cdot 4\equiv 1\mod 7$, so we get

$$x\equiv 4-12y\equiv 4-5y\mod y$$

So then your solutions are $\{(4-5y,y)\mod 7: 0\le y\le 6)\}$ If you prefer $x$ over $y$, then note $5y\equiv 4-x\mod 7$ by solving the highlighted equation for $x$, and you can as easily do $\{(x,5-3x)\mod 7 : 0\le x\le 6\}$.
A: \begin{align}2x + 3y - 1 = 7k &\Rightarrow  3y = -2x + 1 - 7k = -3(x+2k) + x + 1 - k\\ &\Rightarrow y = -x - 2k + \dfrac{1+x-k}{3}
\end{align}
Since
\begin{align}
y \in \mathbb{Z} &\Rightarrow  3\mid (1+x-k)\\ &\Rightarrow 1+x-k = 3n \\&\Rightarrow x = k-1 +3n\\ &\Rightarrow y = -(k-1+3n) - 2k + n = -3k + 4n + 1$, 
\end{align}
with $n,k \in \mathbb{Z}$.
