# How to solve a system of $2$ linear equations modulo n for $3$ variable?

$$2x + 2y - z = 2\pmod {3}$$

$$-x - 4y - 2z= 4\pmod {3}$$ I am lost in this... For simple equations I used Euclidean Algorithm. But in this problem I dont really know how to use this algorithm...

• A general strategy for solving linear Diophantine systems is to compute the Smith normal form of the system. See en.m.wikipedia.org/wiki/Diophantine_equation – Teddan the Terran Oct 19 at 9:42
• Exactly the way you solve it over rationals. – metamorphy Oct 19 at 10:01
• Multiply the first equation by $2$ and subtract it from the second. – The Demonix _ Hermit Oct 19 at 10:11