Create your own
Lesson illustration

Prime Factorization of Positive Integers

Hello. In the previous lesson, you classified numbers within the real-number system and used the convention that natural numbers are the positive integers:

This lesson takes a closer look at the internal structure of those positive integers. Rather than treating a number such as as a single object, we will break it into its indivisible numerical “building blocks”: prime numbers. This is called prime factorisation.

Prime factorisation will soon let you find highest common factors and lowest common multiples systematically. Later, it will also make exact square roots and cube roots much more manageable.


Prime, composite, and the special case of

A factor of a positive integer is a positive integer that divides it exactly. For example, the factors of are:

A prime number is a natural number greater than with exactly two positive factors: and itself.

Examples include:

For instance, is prime because its only positive factors are and .

A composite number is a natural number greater than that has more than two positive factors. For example:

so is composite. It has factors other than and itself.

There is one important exception:

is neither prime nor composite. It has only one positive factor, namely itself. This matters because the definition of prime requires exactly two factors.

A useful summary is:

Type of numberDefinitionExamples
PrimeGreater than ; exactly two positive factors
CompositeGreater than ; more than two positive factors
NeitherThe special number

Two quick observations will make factorisation faster:

  • is the only even prime number. Every other even positive integer is divisible by , so it is composite.
  • If a number ends in or , it is divisible by . It is therefore composite unless it is itself.

Watch this short visual introduction before moving to the method.

How to Use Prime Factor Trees to find Prime Factors

Watch “How to Use Prime Factor Trees to find Prime Factors” from Cognito. It introduces the distinction between prime factors and an incomplete factor list, then demonstrates factor trees clearly.

Watch prime factors to see why listing the distinct prime divisors of a number is not enough: repeated primes must be included. Then watch factor trees, following how the examples of 220 and 112 are reduced until every final number is prime. Notice that different first splits still produce the same final prime factors.


What “product of prime factors” really means

To express a positive integer as a product of prime factors, write it as a multiplication in which every factor is prime.

For example:

It would not be enough to write:

because although and are prime factors of , their product is only , not . Prime factorisation records repeated factors as well.

When a prime repeats, use an index (exponent) to write the answer compactly:

Thus:

Read this as “two squared times three.” The exponent tells you how many copies of the base occur:

The phrase prime factorisation may refer to both:

  1. the final product of primes, such as ; and
  2. the process used to find that product.

For numbers greater than , the result is unique apart from the order in which the primes are written. For example, these are equal:

and

By convention, write prime factors in increasing order:

This uniqueness is called the Fundamental Theorem of Arithmetic: every natural number greater than has one prime factorisation, apart from rearranging the factors.


Building a factor tree

A factor tree is a visual record of repeated factorisation. Start with the original number, split it into any two factors, and continue splitting every composite factor. Stop only when every end point is prime.

The Factor Trees image shows \(24\) split into \(6\) and \(4\), then reduced to the prime leaves \(2,2,2,\) and \(3\). Their product gives \(24=2^3\times3\).

The key rule is simple:

Never stop at a composite number. Stop only at prime numbers.

For instance, suppose you begin with:

This is not a prime factorisation because both and are composite. Continue:

and

Now all the final factors are prime, so:

You could instead begin with a different split:

Then:

Again, the final result is:

The tree’s shape depends on your initial choice of factors; the completed prime factorisation does not.

3.1 Prime and Composite Numbers - Contemporary Mathematics | OpenStax

Read the subsection “Finding the Prime Factorization of Composite Numbers” from OpenStax Contemporary Mathematics. It gives a formal account of why factorisation continues until only primes remain, explains the uniqueness of the final result, and works through both an iterative method and factor trees.

In the subsection “Finding the Prime Factorization of Composite Numbers,” begin at the sentence the definition and rationale. Then read Examples 3.11 through 3.13, including the nested subsection “Factor Trees.” Focus on two ideas: every composite factor must be decomposed further, and the final answer is the product of the prime leaves.


An efficient paper-and-pencil method

Factor trees permit any valid factor pair, but choosing small prime factors usually makes your working faster and easier to check.

Use this routine:

  1. Test whether the number is divisible by .
  2. If not, test divisibility by using the digit sum.
  3. Then consider , followed by other small primes such as , , and so on.
  4. Each time a prime divides exactly, record that prime and factor the quotient further.
  5. Stop when the remaining quotient is prime.

The most useful early divisibility tests are:

PrimeQuick test
The last digit is even.
The digit sum is divisible by .
The last digit is or .
The last digit is .

For example, factorise .

Because is even:

The quotient is still even:

Now is not even. Its digit sum is:

and is divisible by . Therefore:

The quotient also has digit sum , so it is divisible by :

Finally:

Collecting all the prime factors gives:

In index form:

A check is essential:

This multiplication check catches common slips, such as forgetting a repeated factor or copying down the wrong quotient.


Knowing when a remaining factor is prime

In many school-level examples, the final factor is visibly prime, such as , , , or . For a larger remaining number, you need a reliable test rather than a guess.

To establish that a number is prime, test whether it is divisible by any prime number up to .

Why does this work? If were composite, it could be written as:

At least one of or would have to be no greater than . Otherwise both would be larger than , and their product would be larger than , which is impossible.

For example, consider . Since:

only prime divisors less than need to be checked:

The number is not even, its digit sum is , and it does not end in or . Therefore, no prime up to divides it, so is prime.

At this stage, use this test mainly to justify unfamiliar final factors. Do not test every whole number: checking prime divisors is sufficient. For example, once you know a number is not divisible by , you do not need separately to test divisibility by , , , or .


Common errors and a final-quality check

Prime factorisation is simple in principle, but errors often arise from stopping too early or losing repeated factors.

Error 1: stopping at composite factors

This is incomplete:

Both and are composite. Continue:

So:

Error 2: including

This is not standard prime factorisation:

Although the multiplication is correct, is not prime. Write:

Error 3: omitting repeated primes

This is incorrect:

It only gives . The complete prime factorisation is:

Error 4: treating a composite leaf as prime

This is incomplete:

The factor is composite:

Therefore:

Before accepting a final answer, use this checklist:

  • Every listed factor is prime.
  • No factor appears.
  • Repeated prime factors have been included.
  • The factors are written in increasing order.
  • Multiplying the factors reproduces the original integer.

Add any error you make to your notebook’s error log. Label it precisely, for example: “Stopped with as a leaf although is composite,” rather than merely “factorisation mistake.” A precise correction prevents the same pattern from recurring.


Key takeaways

A prime factorisation expresses a natural number greater than as a product of primes.

  • A prime number has exactly two positive factors: and itself.
  • A composite number has more than two positive factors.
  • The number is neither prime nor composite.
  • A factor tree is complete only when all leaves are prime.
  • Prime factors may repeat, so use exponents where helpful.
  • The prime factorisation is unique except for the order of its factors.
  • Always multiply your final factors to verify the result.

For example:

Next, you will use prime factorisations to determine the highest common factor and lowest common multiple of integers.

Can't find a good explanation? Sign up and we'll make it for you

Sign up