# Modular Arithmetic Question mod [duplicate]

I am having problems solving two-variable mod equations.

How would one solve this?

\left\{\begin{aligned} x + 3y &\equiv 1 \pmod{11} \\ 2x + y &\equiv 7 \pmod{11} \end{aligned}\right.

## marked as duplicate by Hurkyl, lhf, user67258, Stahl, Dan RustSep 24 '13 at 1:11

It is much like ordinary systems of equations. We eliminate one of the variables.

We have $x+3y\equiv 1\pmod{11}$ and $2x+y\equiv 7\pmod{11}$. From the first, we get $x\equiv 1-3y\pmod{11}$. Substituting in the second, we get $2(1-3y)+y\equiv 7\pmod{11}$.

Simplify. We get $-5y\equiv 5\pmod{11}$. Got lucky! This gives $y\equiv -1\equiv 10\pmod{11}$.

Thus $x\equiv 1-3y\equiv 1-3(-1)\equiv 4\pmod{11}$.

However, in general it is better to do it another way, by multiplying each side of each congruence by something that lets us eliminate one of the variables.

In our case, we multiply each side of the second congruence by $2$. So we end up with $2x+6y\equiv 2\pmod{11}$, $2x+y\equiv 7\pmod{11}$.

Subtract. We get $5y\equiv -5\pmod{11}$. The rest is as before.