An element x in a ring is called an idempotent if x2=x. Prove that the only idempotents in an integral domain are 0 and 1. Find a ring with a idempotent x not equal to 0 or 1.
Hint. Suppose that x2=x and x=0. Since R is an integral domain, x=1. To find a nontrivial idempotent, look in M2(R).