3
$\begingroup$

Give the solution to the following system of equations using modular arithmetic modulo 5:

$4x + 3y = 0 \pmod{5}$
$2x + y \equiv 3 \pmod{5}$

I multiplied $2x + y \equiv 3 \pmod 5$ by $-2$, getting $-4x - 2y \equiv -6 \pmod{5}$.

$-6 \pmod{5} \equiv 4 \pmod 5$

Then I added the two equations:

$4x + 3y \equiv 0 \pmod{5}$
$-4x - 2y \equiv 4 \pmod{5}$

This simplifies to $y \equiv 4 \pmod{5}$.

I then plug this into the first equation: $4x + 3(4) = 0 \pmod{5}$

Wrong work:

Thus, $x = 3$. But when I plug the values into the first equation, I get $2(3) + 4 \not\equiv 3 \pmod{5}$. What am I doing wrong?

EDIT:

Revised work:

$x = -3 \pmod{5} = 2 \pmod{5}$.
Now when I plug the values into the first equation, I get $2(2) + 4 \equiv 8 \pmod{5} \equiv 3 \pmod{5}$.

$\endgroup$
1
$\begingroup$

Sign error on substitution, it should be $x\equiv -3\pmod{5}$.

You had $4x+(3)(4)\equiv 0$, that is, $4(x+3)\equiv 0$. From this we get $x+3\equiv 0$, so $x\equiv -3\pmod{4}$.

Negative numbers are sometimes troublesome, so we may wish to rewrite as $x\equiv 2\pmod{5}$.

$\endgroup$
  • $\begingroup$ Thank you for the correction! $\endgroup$ – user93172 Sep 5 '13 at 0:36
  • $\begingroup$ You are welcome. Once you have made a thousand more sign errors, you will be eligible to join my club. $\endgroup$ – André Nicolas Sep 5 '13 at 0:38
2
$\begingroup$

There's also a "cheats" method available here. There are only $25$ possible values of $(x,y) \in (\mathbb{Z}_5)^2$. We can just check them one-by-one, and see which ones work.

We could do this by hand, or on a computer. In GAP:

for x in [0..4] do
  for y in [0..4] do
    if((4*x+3*y) mod 5=0 and (2*x+y) mod 5=3) then
      Print([x,y],"\n");
    fi;
  od;
od;

returns the single solution $(x,y)=(2,4)$.

$\endgroup$
  • 1
    $\begingroup$ +Size(SymmetricGroup(IsPermGroup,1)) for using GAP. :-) $\endgroup$ – mrs Sep 5 '13 at 0:58
  • 1
    $\begingroup$ Print(Concatenation([":",")"]),"\n"); $\endgroup$ – Douglas S. Stones Sep 5 '13 at 1:19
  • 2
    $\begingroup$ + Number(Cartesian([0..4],[0..4]),t->((4*t[1]+3*t[2]) mod 5=0 and (2*t[1]+t[2]) mod 5=3)); :-) $\endgroup$ – Alexander Konovalov Sep 5 '13 at 8:40
  • 1
    $\begingroup$ One could also solve the system over $GF(5)$. First call m:=[[4,3],[2,1]]; v:=[0,3]; e:=Z(5)^0; and then List(SolutionMat(TransposedMat(m)*e,v*e),Int); $\endgroup$ – Alexander Konovalov Sep 5 '13 at 8:48
1
$\begingroup$

It's the last step, where you're solving for $x$.

$4x + 12 \equiv 0 \Rightarrow 4x\equiv 3 \Rightarrow x\equiv 2$.

$\endgroup$
  • $\begingroup$ Thank you! I've corrected my mistake. $\endgroup$ – user93172 Sep 5 '13 at 0:33
1
$\begingroup$

You may consult Maple as follows to get that $(2,4)$ is the only solution for the system.

[> msolve({2*x+y = 3, 4*x+3*y = 0}, 5);

                                     {x=2,y=4}
$\endgroup$
  • $\begingroup$ You are becoming a "Maple Finatic" :-p (just teasing!) +1 $\endgroup$ – Namaste Sep 5 '13 at 12:42
  • $\begingroup$ @amWhy: Yes, I am :-) $\endgroup$ – mrs Sep 5 '13 at 13:36
  • $\begingroup$ @amWhy: I have the same one, Amy. :( $\endgroup$ – mrs Sep 5 '13 at 14:54
  • $\begingroup$ @amWhy: That is so kind of you :) $\endgroup$ – mrs Sep 5 '13 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.