This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
1 is neither prime nor composite. It is in its own special category called a "unit".
The definition of a prime number is an integer that has exactly two positive divisors. The definition of a composite number is an integer that has a positive divisor other than 1 and itself. 1 only has one positive divisor (1 itself), so it is not prime, and it doesn't have any positive divisor other than 1 and itself, so it is not composite either.
Common mistakes:
A prime number is an integer that has 1 and itself as its only positive divisors. This is a wrong definition, solely for the fact that 1 shouldn't be prime .
A composite number is an integer that is not prime. This is also a wrong definition because we don't want 1 to be composite. This is more or less the same reason as why we don't want 1 to be prime: just a matter of definition and convenience (so that we can say "a composite number is an integer that can be represented as the product of two or more primes", instead of "...zero or two or more primes"). It is called a unit, having the property that multiplying it to another number doesn't change whether the latter is a prime, composite, or neither; for example, 5 is prime and 1 × 5 = 5 is still prime. (Compare to 5 is prime but 6 × 5 = 3 0 is composite.) When generalizing to rings other than the integers, we can find more units; for example, in the Gaussian integers , the numbers 1 , i , − 1 , − i are units.
A prime number is always positive. For "classic" number theory, this is true! So it's not fully a mistake. When generalizing (such as the Gaussian integers above), though, it's much more convenient to allow negative numbers to be primes as well; that is, − 3 is considered to be prime. We call the result a "prime element". (There's also an "irreducible element", which is similar but not entirely the same, but both of them have no reason not to allow negative numbers to be prime/irreducible.) Nevertheless, if you're working just on the usual integers, it's best to clarify, or in lack of that, assume that only positive integers have prime/composite/unit category.