prove that if p is prime and ab=0 in Zp then a=0 or b=0
Well, if p were not prime, then there would integers r and s such that rs = p Hence if p were not prime and ab = 0, then it would be possible that ab = np = 0 (mod p) and so it could be the case that a and b are not 0. Now, turn this argument around for your case.
I'm as far as saying that p | b or p | a but im not sure how I can go from that to show that one has to be zero
No, if both a and b are not zero, it must be that a | p or b | p and ....
then a and b would be factors of p?
...but this leads to a contradiction as p is prime ...
yeah I've gotten there, but I can't close this out
Write out the whole argument.
wait, can I say that because of this contradiction I already know that they both cannot be zero?
Here, try this: Suppose ab = 0 (mod p) and both a and b are not zero. We want to show this leads to a contradiction. As ab = 0 (mod p), then ab = np for some n. Now as p is prime, it must be that p is a factor of either a or b (as all integers have unique prime factorizations) But if a or b has p as a factor, it must necessarily be the case that a = 0 (mod p) or b = 0 (mod p)
Join our real-time social learning platform and learn together with your friends!