# Can we consider set of all composite integers as an ideal? And if yes, why then Z is a PID?

In this wikipedia article it is said that set Z is a principal ideal domain, i.e. each one of its ideals can be generated by a single element. But if we consider set C of all composite integer numbers (Z without primes and 0), wouldn't it be an ideal? If we take arbitrary element from Z and take a product of a composite number and an arbitrary integer we will get a composite, thus an element of C? And, as far as I can understand, C can not be generated by a single element. So it is not a principle ideal.

I would appreciate pointing to my mistake very much.

-
Not closed under addition. – user92843 Jun 21 '11 at 21:16
It is an ideal in the multiplicative semigroup. en.wikipedia.org/wiki/Semigroup#Subsemigroups_and_ideals – Jonas Meyer Jun 21 '11 at 21:21
The set of all nonzero composite numbers is a semigroup ideal of the multiplicative semigroup of the integers, but is not an additive subgroup of the integers, so it's not an ideal in the sense of ring theory. – Arturo Magidin Jun 21 '11 at 21:22
Thanks to all of you guys! I got it now. – ikostia Jun 21 '11 at 21:35

The problem is that the set of all composite integers does not form an ideal. For example if you add $21 - 4$ you get $17$ which is a prime and thus not composite. That's why there's no contradiction.
And the fact that $\mathbb{Z}$ is a principal ideal domain is because you have division with remainder in the set of integers.