Maths WorkshopMaths problems with full solutions
Exercise 911Number theory › Divisibility and gcdHigh schoolAdded 3 Nov 2026

The fundamental theorem of arithmetic

#fundamental theorem#prime factorization#uniqueness

Statement

State the fundamental theorem of arithmetic and prove uniqueness of the prime factorization.

Hint

Existence by strong induction; uniqueness by Euclid's lemma.

Show solutionHide solution

Solution

Statement. Every integer n≥2n\ge2 can be written uniquely as a product of primes (up to order).

Existence. By strong induction: nn has a prime divisor pp (previous exercise), n=p⋅mn=p\cdot m with m<nm<n; if m=1m=1 done, else mm factors by induction.

Uniqueness. Suppose n=p1⋯pr=q1⋯qsn=p_1\cdots p_r=q_1\cdots q_s. Since p1∣q1⋯qsp_1\mid q_1\cdots q_s, Euclid's lemma gives p1=qjp_1=q_j for some jj. Cancel and repeat by induction.

Conclusion. The prime factorization exists and is unique.