{
  "id": "fundamental-theorem-of-arithmetic",
  "title": "Fundamental Theorem of Arithmetic",
  "lang": "en",
  "source_lang": "en",
  "summary": "The fundamental theorem of arithmetic states that every integer greater than one has a unique prime factorization, apart from the order of its factors.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Unique factorization theorem",
    "Prime factorization theorem"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/fundamental-theorem-of-arithmetic/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/fundamental-theorem-of-arithmetic/",
      "json": "https://aiwiki.page/zh/fundamental-theorem-of-arithmetic.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The fundamental theorem of arithmetic is a foundational result in number theory: every integer greater than 1 can be expressed as a product of prime numbers, and that expression is unique except for the order of the factors. It establishes both the existence of prime factorizations and the uniqueness of the primes and their multiplicities. (courses.csail.mit.edu)"
    },
    {
      "heading": "Statement and meaning",
      "text": "For every integer \\(n>1\\), there are distinct primes \\(p_1<p_2<\\cdots<p_r\\) and positive integers \\(a_1,\\ldots,a_r\\) such that\n\n\\[n=p_1^{a_1}p_2^{a_2}\\cdots p_r^{a_r}.\\]\n\nWith the primes placed in increasing order, both the primes and their exponents are uniquely determined by \\(n\\). This expression is called the prime-power decomposition of \\(n\\). (faculty.etsu.edu)\n\nFor example,\n\n\\[360=2^3\\cdot3^2\\cdot5.\\]\n\nThe theorem means that every decomposition of 360 into prime factors contains exactly three factors equal to 2, two equal to 3, and one equal to 5. Different orders of multiplication do not count as different prime factorizations. By contrast, factorizations into arbitrary integers need not be unique: \\(12=2\\cdot6=3\\cdot4\\). These examples illustrate the distinction between prime factorization and unrestricted factorization. (courses.csail.mit.edu)\n\nThe standard statement excludes 1. Under the convention that a product with no factors equals 1, the theorem can also be stated for every positive integer, with 1 represented by the empty product. Negative integers are handled by factoring their absolute values and attaching a minus sign. In the ring of integers, \\(1\\) and \\(-1\\) are units: they possess multiplicative inverses within the ring. Uniqueness for nonzero integers is therefore understood up to order and multiplication by units. (en.wikipedia.org)"
    },
    {
      "heading": "Proof",
      "text": "The two parts of the theorem require different arguments. Existence follows from the fact that composite positive integers split into smaller factors. Uniqueness depends on a stronger property of prime divisibility. (web.stanford.edu)\n\nExistence\n\nA proof by strong mathematical induction establishes existence.\n\nThe integer 2 is prime, so it already has a prime factorization. Suppose every integer between 2 and \\(n-1\\) has a prime factorization. If \\(n\\) is prime, its factorization consists of \\(n\\) alone. Otherwise,\n\n\\[n=ab,\\qquad 1<a<n,\\quad 1<b<n.\\]\n\nBoth \\(a\\) and \\(b\\) have prime factorizations by the induction hypothesis. Multiplying those factorizations gives one for \\(n\\). (web.stanford.edu)\n\nEquivalently, repeated splitting of composite factors must terminate: each split replaces a factor by smaller positive integers, and an indefinitely decreasing sequence of positive integers is impossible. This termination principle is closely connected with the well-ordering principle. (cs.clarku.edu)\n\nEuclid’s lemma\n\nEuclid’s lemma states that if a prime \\(p\\) divides a product \\(ab\\), then \\(p\\) divides at least one of \\(a\\) and \\(b\\):\n\n\\[p\\mid ab\\quad\\Longrightarrow\\quad p\\mid a\\ \\text{or}\\ p\\mid b.\\]\n\nHere \\(p\\mid a\\) means that \\(a\\) is an integer multiple of \\(p\\). To prove the lemma, suppose \\(p\\nmid a\\). Since \\(p\\) is prime, the greatest common divisor of \\(p\\) and \\(a\\) is then 1. Bézout’s identity, obtainable from the Euclidean algorithm, supplies integers \\(x,y\\) satisfying\n\n\\[xp+ya=1.\\]\n\nMultiplying by \\(b\\) gives\n\n\\[xpb+yab=b.\\]\n\nBoth terms on the left are divisible by \\(p\\), so \\(p\\mid b\\). Repeated application extends the lemma to any finite product: a prime dividing the product must divide at least one factor. (courses.csail.mit.edu)\n\nUniqueness\n\nSuppose an integer has two prime factorizations,\n\n\\[n=p_1p_2\\cdots p_k=q_1q_2\\cdots q_m,\\]\n\nwhere repeated primes are written separately. Since \\(p_1\\) divides the product on the right, Euclid’s lemma implies that it divides some \\(q_j\\). Because \\(q_j\\) is prime, \\(p_1=q_j\\). Rearrange the factors and cancel this common prime.\n\nThe same argument applies to the remaining products. Neither side can run out of factors before the other, since a nonempty product of primes is greater than 1. Consequently \\(k=m\\), and the two lists contain exactly the same primes with the same multiplicities. (itamar.web.illinois.edu)"
    },
    {
      "heading": "Historical development",
      "text": "Important ingredients appear in Euclid’s Elements. Book VII, Proposition 30 states the prime-divisibility property now called Euclid’s lemma. Book IX, Proposition 14 gives a related result concerning the least number divisible by specified primes. These propositions provide ancient foundations for unique factorization, although they should not simply be identified with the complete modern statement. (mathcs.clarku.edu)\n\nCarl Friedrich Gauss explicitly stated and proved uniqueness in Article 16 of Disquisitiones Arithmeticae, published in 1801. He treated the existence of prime factorizations as evident rather than presenting a separate proof of it. The historical development thus distinguishes elementary knowledge of prime decomposition from explicit recognition and proof of its uniqueness. (la.wikisource.org)"
    },
    {
      "heading": "Consequences and uses",
      "text": "Divisibility and greatest common divisors\n\nPrime factorization reduces questions of divisibility to comparisons of exponents. Write two positive integers using a common list of primes,\n\n\\[a=\\prod_p p^{\\alpha_p}, \\qquad b=\\prod_p p^{\\beta_p},\\]\n\nwhere absent primes have exponent zero and only finitely many exponents are nonzero. Then\n\n\\[a\\mid b \\quad\\Longleftrightarrow\\quad \\alpha_p\\leq\\beta_p\\text{ for every }p.\\]\n\nIt follows that\n\n\\[\\gcd(a,b)=\\prod_p p^{\\min(\\alpha_p,\\beta_p)}.\\]\n\nThe formula works because a common divisor can contain no more copies of any prime than occur in either integer. (faculty.etsu.edu)\n\nFor instance,\n\n\\[72=2^3\\cdot3^2,\\qquad 120=2^3\\cdot3\\cdot5,\\]\n\nso their greatest common divisor is \\(2^3\\cdot3=24\\). Taking the larger exponent of each prime instead gives their least common multiple, \\(2^3\\cdot3^2\\cdot5=360\\). These are direct applications of the exponent comparison above. (faculty.etsu.edu)\n\nDivisors and perfect powers\n\nFor\n\n\\[n=p_1^{a_1}\\cdots p_r^{a_r},\\]\n\neach positive divisor is obtained uniquely by selecting an exponent between 0 and \\(a_i\\) for each \\(p_i\\). Thus the number of positive divisors is\n\n\\[(a_1+1)(a_2+1)\\cdots(a_r+1).\\]\n\nSimilarly, \\(n\\) is a perfect \\(k\\)-th power, for a positive integer \\(k\\), exactly when every exponent \\(a_i\\) is divisible by \\(k\\). Both conclusions follow directly from uniqueness: divisors select some of the available prime factors, while raising an integer to the \\(k\\)-th power multiplies every prime exponent by \\(k\\). (faculty.etsu.edu)\n\nRational numbers\n\nThe theorem extends to positive rational numbers by permitting negative integer exponents. Factoring the numerator and denominator yields a unique expression\n\n\\[q=\\prod_p p^{e_p}, \\qquad e_p\\in\\mathbb Z,\\]\n\nwith only finitely many nonzero exponents. For example,\n\n\\[\\frac{18}{35}=2\\cdot3^2\\cdot5^{-1}\\cdot7^{-1}.\\]\n\nThis is a direct consequence of applying integer prime factorization to numerator and denominator and subtracting corresponding exponents. (faculty.etsu.edu)"
    },
    {
      "heading": "Generalization and limits",
      "text": "In abstract algebra, the integer theorem is a model for a unique factorization domain. Such a ring has no zero divisors, and every nonzero nonunit factors into irreducible elements uniquely up to order and multiplication by units. An element is irreducible if any factorization of it has a unit among its factors; a prime element satisfies the product-divisibility property used in Euclid’s lemma. These notions agree for integers but need not agree in other rings. (arxiv.org)\n\nA standard counterexample is\n\n\\[\\mathbb Z[\\sqrt{-5}] =\\{a+b\\sqrt{-5}:a,b\\in\\mathbb Z\\}.\\]\n\nIn this ring,\n\n\\[6=2\\cdot3=(1+\\sqrt{-5})(1-\\sqrt{-5}).\\]\n\nAll four displayed factors are irreducible, yet the two factorizations cannot be made identical merely by reordering or multiplying factors by units. Unique factorization of elements therefore fails. This does not contradict the fundamental theorem of arithmetic, whose original domain is the ordinary integers. (arxiv.org)\n\nIn algebraic number theory, factorization of ideals can retain uniqueness even when factorization of elements does not. For example, every nonzero proper ideal of \\(\\mathbb Z[\\sqrt{-5}]\\) has a unique factorization into prime ideals, up to order. The distinction between element factorization and ideal factorization is a central extension of the arithmetic viewpoint. (arxiv.org)"
    }
  ],
  "links": [
    "number-theory",
    "integer",
    "prime-number",
    "ring-mathematics",
    "mathematical-proof",
    "mathematical-induction",
    "greatest-common-divisor",
    "bezouts-identity",
    "euclidean-algorithm",
    "euclid",
    "euclids-elements",
    "carl-friedrich-gauss",
    "least-common-multiple",
    "rational-number",
    "abstract-algebra",
    "unique-factorization-domain",
    "ideal-ring-theory"
  ],
  "sources": [
    {
      "title": "Fundamental Thm. of Arithmetic",
      "url": "https://courses.csail.mit.edu/6.042/pub/unique-factorization.pdf"
    },
    {
      "title": "Section 2. Unique Factorization",
      "url": "https://faculty.etsu.edu/gardnerr/3120/notes-Dudley/Dudley-Section-2.pdf"
    },
    {
      "title": "Math 79SI Notes",
      "url": "https://web.stanford.edu/class/math79si/Math79SINotes_6.pdf"
    },
    {
      "title": "MATH 417: Introduction to abstract algebra — 9/4: Unique factorisation",
      "url": "https://itamar.web.illinois.edu/Teaching/417_FW26/Notes/node-9-4-Unique-factorisation.html"
    },
    {
      "title": "Euclid's Elements, Quick Trip",
      "url": "https://mathcs.clarku.edu/~djoyce/java/elements/trip.html"
    },
    {
      "title": "A Historical Survey of the Fundamental Theorem of Arithmetic",
      "url": "https://www.math.ubc.ca/~steph/FTA.pdf"
    },
    {
      "title": "Disquisitiones arithmeticae/Sectio secunda",
      "url": "https://la.wikisource.org/wiki/Disquisitiones_arithmeticae/Sectio_secunda"
    },
    {
      "title": "How do elements really factor in Z[sqrt(-5)]?",
      "url": "https://arxiv.org/abs/1711.10842"
    },
    {
      "title": "Fundamental theorem of arithmetic",
      "url": "https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}