Understanding Modulus: Positive, Negative, and the Result

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 10K views
garyljc
Messages
103
Reaction score
0
hi all,
i was studying modulus when i came across this mod(xy) = modx mod y
we consider 3 cases
whereby both positive , both negative, or positive negative

it reads here if we consider x and y to be negative
it will be something like this

mod xy = xy = - mod x ( - mod y ) = mod x mod y
therefore proven

i do not understand why it is -mod x and -mod y
i know that it says that x and y has to be negative
but isn't -mod x different from mod x ? eg if x is 2 , -mod x will be -2 , and mod x will be 2
correct me if I'm wrong
i'm lost
thanks
 
Mathematics news on Phys.org
If x is negative, then mod(x)=-x. So what you've got there is that we've noted

x = -(-x)
y = -(-y)

Hence

xy = (-(-x))(-(-y)) = (-mod x)(=mod y)

if x,y <0.

And, yes mod(x) and -mod(x) are obviously different, so you're correct there.
 
hey matt ,
but according to the proof
it's mod xy = xy = - mod x ( - mod y ) = mod x mod y

why can't it be
mod xy = xy = mod x mod y
why does it have to have an additional -mod x (-mod y) ?
 
garyljc said:
hey matt ,
but according to the proof
it's mod xy = xy = - mod x ( - mod y ) = mod x mod y

why can't it be
mod xy = xy = mod x mod y
why does it have to have an additional -mod x (-mod y) ?

Because both x and y are negative and not equal to mod x or mod y respectively, but to -mod x and -mod y.
 
garyljc said:
hey matt ,
but according to the proof
it's mod xy = xy = - mod x ( - mod y ) = mod x mod y

why can't it be
mod xy = xy = mod x mod y
why does it have to have an additional -mod x (-mod y) ?

Those equalities many (and indeed do) hold, but you want to *prove* that they do. So you have to use the *definition* of modulus for -ve numbers, rather than just writing what you want to be true, i.e. go the extra mile and make things explicit.

Think of it this way: you know that mod(x)=-x if x<0, now you want to show, using this knowledge, that if x,y<0, then mod(xy)=mod(x)mod(y).

Since x and y are less than 0, xy>0, so mod(xy)=xy.

Now, mod(x)=-x and mod(y)=-y, thus mod(x)mod(y)=(-x)(-y)=xy, so all is fine.

All the proof does is put those things together in one line.