If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Recognizing prime and composite numbers

Can you recognize the prime numbers in this group of numbers? Which are prime, composite, or neither? Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

  • male robot hal style avatar for user Aaron Burt
    Is infinity a prime number?
    (138 votes)
    Default Khan Academy avatar avatar for user
  • duskpin seed style avatar for user Joel
    How is 17 not divisible by 2, 3, 4, 5, 6, and so on? because 5 / 17, 4 / 17 and so on still has an answer to it so how is it not divisible? and even more numbers like other prime numbers?
    (20 votes)
    Default Khan Academy avatar avatar for user
  • duskpin seedling style avatar for user ikazz1
    I really dont quite get this, 1 isn't a prime number, is it? I looked it up and it didn't show 1 as an example for a prime number, or composite. . .
    (15 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user nianadan5310
    Wouldn't 1 be a prime number because 1 is divisible by 1 and itself?
    (9 votes)
    Default Khan Academy avatar avatar for user
  • blobby blue style avatar for user MINECRAFT!!!!!
    Is 1 the only number that is not prime or compisite? If it is what about infinity is that also not prime and compisite
    (3 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user John
      In the Halls of the Khan Academy, under the sections Math, Pre-Algebra, Factors and Multiples, in the lecture, "Prime and composite numbers intro", section, "The number 1";

      The only factor of 1 is 1.
      A prime number has exactly two factors so 1 isn't prime.
      A composite number has more than 2 factors, so 1 isn't composite.

      And what about infinity, as pointed out by CarlBiologist in the Q&A section of the video, Recognizing prime and composite numbers;

      "A number must be a "natural number" for it to be prime and infinity is not a natural number. Natural numbers are positive integers (1,2,3,4,5,etc...)."

      But even more so, as I recently learned, infinities are usually referred to as the "limit of functions" and not as a "value" or an arbitrarily large number, so not prime or composite.
      (6 votes)
  • leafers tree style avatar for user BraydenBoi
    Is the number 1 a prime, composite, or neutral?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user Akarsan Pakirathan
    Are negative numbers prime, composite, or neither, and can you please explain why?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • male robot donald style avatar for user Alej
    So Technically is -2,-3,etc a prime number
    (3 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam red style avatar for user Marvin Cohen
    Why can't negative numbers be prime?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Damon Parker
      Following this logic, if prime numbers cannot be products of their own negative factors, no numbers are prime using the 'exactly 2 factors' rule. For example 5 is a product of 1 & 5 AND -1 & -5. Therefore it has 4 factors, not 2. If we specify that factors must be positive this would remove negative numbers from the list of prime numbers, but this then seems like we're making rules to fit. Why do prime numbers have to be positive?
      (1 vote)
  • ohnoes default style avatar for user Anthony
    (4 votes)
    Default Khan Academy avatar avatar for user

Video transcript

Determine whether the following numbers are prime, composite, or neither. So just as a bit of review, a prime number is a natural number-- so one of the counting numbers, 1, 2, 3, 4, 5, 6, so on and so forth-- that has exactly two factors. So its factors are 1 and itself. So an example of a prime factor is 3. There's only two natural numbers that are divisible into 3-- 1 and 3. Or another way to think about it is, the only way to get 3 as a product of other natural numbers is 1 times 3. So it only has 1 and itself. A composite number is a natural number that has more than just 1 and itself as factors. And we'll see examples of that and neither-- we'll see an interesting case of that in this problem. So first let's think about 24. So let's think about all of the-- I guess you could think of it as the natural numbers or the whole numbers, although 0 is also included in whole numbers. Let's think of all of the natural counting numbers that we can actually divide into 24 without having any remainder. We'd consider those the factors. Well, clearly it is divisible by 1 and 24. In fact, 1 times 24 is equal to 24. But it's also divisible by 2. 2 times 12 is 24. So it's also divisible by 12. And it is also divisible by 3. 3 times 8 is also equal to 24. And even at this point, we don't actually have to find all of the factors to realize that it's not prime. It clearly has more factors than just 1 and itself. So then it is clearly going to be composite. This is going to be composite. Now, let's just finish factoring it just since we started it. It's also divisible by 4. And 4 times 6-- had just enough space to do that. 4 times 6 is also 24. So these are all of the factors of 24, clearly more than just one and 24. Now let's think about 2. Well, the non-zero whole numbers that are divisible into 2, well, 1 times 2 definitely works, 1 and 2. But there really aren't any others that are divisible into 2. And so it only has two factors, 1 and itself, and that's the definition of a prime number. So 2 is prime. And 2 is interesting because it is the only even prime number. And that might be common sense you. Because by definition, an even number is divisible by 2. So 2 is clearly divisible by 2. That's what makes it even. But it's only divisible by 2 and 1. So that's what makes it prime. But anything else that's even is going to be divisible by 1, itself, and 2. Any other number that is even is going to be divisible by 1, itself, and 2. So by definition, it's going to have 1 and itself and something else. So it's going to be composite. So 2 is prime. Every other even number other than 2 is composite. Now, here is an interesting case. 1-- 1 is only divisible by 1. So it is not prime, technically, because it only has 1 as a factor. It does not have two factors. 1 is itself. But in order to be prime, you have to have exactly two factors. 1 has only one factor. In order to be composite, you have to have more than two factors. You have to have 1, yourself, and some other things. So it's not composite. So 1 is neither prime nor composite. And then finally we get to 17. 17 Is divisible by 1 and 17. It's not divisible by 2, not divisible by 3, 4, 5, 6. 7, 8, 9 10, 11, 12, 13, 14, 15, or 16. So it has exactly two factors-- 1 and itself. So 17 is once again-- 17 is prime.