# Find all solutions: x is congruent with 2 (mod 5), x is congruent with 1 (mod 6), x is congruent with 1 (mod 7)

Asked on by svjr

Matthew Fonda | eNotes Employee

Posted on

We must solve the system

(1)` x -= 2 (mod 5)`

(2)` x -= 1 (mod 6)`

(3)` x -= 1 (mod 7)`

We can rewrite (1) as `x = 5k + 2` . We will plug this into (2), giving us

`x -= 1 (mod 6) \implies 5k + 2 -= 1 (mod 6) \implies 5k -= -1 (mod 6)`

Solving `5k -= -1 (mod 6)` , we find that `k -= 1 (mod 6)` . We will rewrite this as `k = 6l + 1` . We know that `x = 5k + 2` , so plugging this in, we get `x = 5(6l + 1) + 2 = 30l + 5 + 2 = 30l + 7` . We will plug `x = 30l + 7` into (3) and solve:

`30l + 7 -= 1 (mod 7) \implies 30l -= -6 (mod 7)`

Solving this, we find ` l -= 4 (mod 7)` . We will rewrite this as ` l = 7m + 4` . We then plug this into `x = 30l + 7` , giving us `x = 30(7m + 4) + 7 = 210m + 127` .

Therefore, all solutions to this system are described by

`x -= 127 (mod 210)`

We’ve answered 319,198 questions. We can answer yours, too.