# Modular Arithmetic

• Oct 15th 2006, 11:54 AM
JaysFan31
Modular Arithmetic
I have the following problem:
If p is prime, prove that the only solutions of (x^2)+x=0 in Zp are 0 and p-1.

Ok I did this:
I re-wrote (x^2)+x=0 in Zp to (x^2)+x=0 (mod p). If this is true, then p divides (x^2)+x. I factored (x^2)+x to x(x+1) and since p is prime, I know that either p divides x or p divides (x+1). I then concluded that x=0 (mod p) or x=-1 (mod p). How do I put these back into terms like 0 and p-1 in the question?

Thanks for any help.
• Oct 15th 2006, 12:24 PM
topsquark
Quote:

Originally Posted by JaysFan31
I have the following problem:
If p is prime, prove that the only solutions of (x^2)+x=0 in Zp are 0 and p-1.

Ok I did this:
I re-wrote (x^2)+x=0 in Zp to (x^2)+x=0 (mod p). If this is true, then p divides (x^2)+x. I factored (x^2)+x to x(x+1) and since p is prime, I know that either p divides x or p divides (x+1). I then concluded that x=0 (mod p) or x=-1 (mod p). How do I put these back into terms like 0 and p-1 in the question?

Thanks for any help.

If x = 0 (mod p) then the only solution in Zp for x will be x = 0, since this is the only x in Zp that is divisible by p.
Similarly, if x = -1 (mod p) then the only solution in Zp for x will be x = p - 1, because this is the only x in Zp that will leave a residue of -1.

-Dan
• Oct 15th 2006, 07:07 PM
ThePerfectHacker
Simpler than that topsquark,
Zp is a field.

Thus, Zp[x] has the property that a polynomial of degree "n" has at most "n" solutions.
Since, 1 and p-1 are solutions there can be no others.