First of all, according to the textbook that I use, there are some theorems about maximal and prime ideals.

(a) If R is a commutative ring such that R^{2}=R, then every maximal ideal M in R is prime.

(b) In a commutative ring R with identity maximal ideals always exist.

(c) In a commutative ring R with identity 1_{R}, which is not equal to 0, an ideal P is prime iff the quotient ring R/P is an integral domain.

It seems all right, but the contradiction happens when I think about Z_{m}, the integers modulo m with m not prime.

This is my reasoning:

First, Z_{m}is a commutative ring with identity 1_{R}, which is not equal to 0. And since the identity exists in this ring, Z_{m}^{2}=Z_{m}, so maximal ideals exist and they are prime.

On the other hand, since m is not prime, Z_{m}has zero divisors, say xy=m, 1<x,y<m, then for all ideals I in Z_{m}, Z_{m}/I has zero divisors because (x+I)(y+I)=xy+I=I where x+I and y+I are not equal to I. This means Z_{m}/I is not an integral domain for all ideals I in Z_{m}. By (c), all ideals are not prime. But what about the maximal ideals? They do exist and they're prime.

Can anyone tell me what's wrong with my thought?