is not prime. In a commutative ring with at least two elements, if every proper ideal is prime, then the ring is a field. (If the ideal is prime, then the ring is an integral domain. If is any non-zero element of and the ideal is prime, then it contains and then is invertible.) A nonzero principal ideal is prime if and only if it is generated by a prime element. In a UFD, every nonzero prime ideal contains a prime element. Uses One use of prime ideals occurs in algebraic geometry, where varieties are defined as the zero sets of ideals in polynomial rings. It turns out that the irreducible varieties correspond to prime ideals. In the modern abstract approach, one starts with an arbitrary commutative ring and turns the set of its prime ideals, also called its spectrum, into a topological space and can thus define generalizations of varieties called schemes, which find applications not only in geometry, but also in number theory. The introduction of prime ideals in algebraic number theory was a major step forward: it was realized that the important property of unique factorisation expressed in the fundamental theorem of arithmetic does not hold in every ring of algebraic integers, but a substitute was found when Richard Dedekind replaced elements by ideals and prime elements by prime ideals; see Dedekind domain. Prime ideals for noncommutative rings The notion of a prime ideal can be generalized to noncommutative rings by using the commutative definition "ideal-wise". Wolfgang Krull advanced this idea in 1928. The following content can be found in texts such as Goodearl's and Lam's. If is a (possibly noncommutative) ring and is a proper ideal of , we say that is prime if for any two ideals and of : If the product of ideals is contained in , then at least one of and is contained in . It can be shown that this definition is equivalent to the commutative one in commutative rings. It is readily verified that if an ideal of a noncommutative ring satisfies the commutative definition of prime, then it also satisfies the noncommutative version. An ideal satisfying the commutative definition of prime is sometimes called a completely prime ideal to distinguish it from other merely prime ideals in the ring. Completely prime ideals are prime ideals, but the converse is not true. For example, the zero ideal in the