# Math Help - Algebra Help. How to write answer in modulo 4 manner?

1. ## Algebra Help. How to write answer in modulo 4 manner?

If x ≡ 3 (mod 4) and y ≡ 2 (mod 4), write in the modulo 4 mannner for
(a) x + y
(b) y - x
(c) xy

2. ## Re: Algebra Help. How to write answer in modulo 4 manner?

Hey mous99.

There are things called congruence laws that deal with all of these results. Are you aware of these results?

3. ## Re: Algebra Help. How to write answer in modulo 4 manner?

Originally Posted by mous99
If x ≡ 3 (mod 4) and y ≡ 2 (mod 4), write in the modulo 4 mannner for
(a) x + y
(b) y - x
(c) xy
(a) x≡3 (mod 4)
x = 4p + 3

y ≡ 2 (mod 4)
y = 4q + 2

x + y = ( 4p + 3) + ( 4q + 2)
= 4 ( p+q) + (3 + 2)
= 4 ( p+q) + 5
= 5 (mod 4)

Am I right???

4. ## Re: Algebra Help. How to write answer in modulo 4 manner?

Just one more step: What is 5 (mod 4) in terms of a (mod 4) where a is the principal modulus (between 0 and 3 inclusive)?

5. ## Re: Algebra Help. How to write answer in modulo 4 manner?

Originally Posted by chiro
Just one more step: What is 5 (mod 4) in terms of a (mod 4) where a is the principal modulus (between 0 and 3 inclusive)?
''5 (mod 4) in terms of a (mod 4) where a is the principal modulus (between 0 and 3 inclusive)?''

what does this mean??

6. ## Re: Algebra Help. How to write answer in modulo 4 manner?

5 (mod 4) = 4 + 1 (mod 4) = 1 (mod 4). Principle modulus means the one between 0 and n-1 inclusive (mod n).

7. ## Re: Algebra Help. How to write answer in modulo 4 manner?

Originally Posted by chiro
5 (mod 4) = 4 + 1 (mod 4) = 1 (mod 4). Principle modulus means the one between 0 and n-1 inclusive (mod n).
(a) x≡3 (mod 4)
x = 4p + 3

y ≡ 2 (mod 4)
y = 4q + 2

x + y = ( 4p + 3) + ( 4q + 2)
= 4 ( p+q) + (3 + 2)
= 4 ( p+q) + 5
= 5 (mod 4)
= 4 + 1 (mod 4)
= 1 (mod 4)

Right?

8. ## Re: Algebra Help. How to write answer in modulo 4 manner?

Yeah pretty much.

What you wrote wasn't wrong by the way: it's just that usually answers are written in the principal branch just for future reference.

9. ## Re: Algebra Help. How to write answer in modulo 4 manner?

y-x
= (4q+2) - (4p+3)
= 4(q-p) + (2-3)
= 4(q-p) -1

How to write answer in modulo 4 manner?

10. ## Re: Algebra Help. How to write answer in modulo 4 manner?

Recall that 4x - 1 = 4x + 4 - 4 - 1 = 4(x-1) + 3.

11. ## Re: Algebra Help. How to write answer in modulo 4 manner?

in general:

if x is congruent to a mod n, and y is congruent to b mod n, then:

x+y is congruent to a+b mod n
xy is congruent to ab nod n.

therefore, mod 4:

if x ≡ 3 and y ≡ 2:

x+y ≡ 3+2 ≡ 5 ≡ 1 (mod 4)
x-y ≡ x+(-y) ≡ 3+(-2) ≡ 3+3 ≡ 6 ≡ 2 (mod 4)
xy ≡ (3)(2) ≡ 6 ≡ 1 (mod 4)

one doesn't need the "extra variables p and q" because ultimately we don't care what they are.

these facts about congruences are easy to prove:

x ≡ a (mod n) means: x - a = tn, for some integer t.
y ≡ b (mod n) meaus: x - a = un, for some integer u.

therefore:

x + y = a + tn + b + un = (a + b) + (t + u)n

that is:

(x + y) - (a + b) = (t + u)n, and since t+u is an integer if t and u are:

x + y ≡ a + b (mod n).

similarly:

xy = (a + tn)(b + un) = ab + (au + bt + tun)n, and au+bt+tun is also an integer (since all of a,b,t,u and n are) so:

xy - ab = (au + bt + tun)n and xy ≡ ab (mod n).

often, when one wants to distinguish between an INTEGER x and it's equivalence class modulo n, one writes: [x] instead of x. this lets us define two NEW operations on just the equivalence classes (often denoted by + and *, but these are "addition mod n" and "multiplication mod n" not the usual ones) by:

[x] + [y] = [x+y]
[x]*[y] = [xy]

in a standard abuse of notation, it is frequent to see "a (mod n)" used in place of [a] (or sometimes just "a" itself) but until one is used to it, it can be unsettling to see things like:

2 + 3 = 1 (mod 4), since this is certainly NOT true for the integers 2,3 and 1.