THE FUNDAMENTAL THEOREM OF ARITHMETIC MATH 372. FALL 2005. INSTRUCTOR: PROFESSOR AITKEN This handout considers material covered on September 7th and September 12th. To prove our results we will need the following handy fact (proved earlier in the semester). Lemma 1. Let a, b, c be integers. If a|b and a|c, then a divides any linear combination of b and c. In other words, a|ub + vc for all u, v ∈ Z. We begin with an important application of Bezout’s identity: Proposition 1. If p is a prime number and if p | ab where a, b ∈ Z, then p | a or p | b. Proof. Assume that p is a prime dividing ab. We divide the proof into cases: CASE 1. p|a. Then we are done since the desired conclusion, p | a or p | b, holds. CASE 2. p 6 | a. Claim: the GCD of p and a is 1. To justify this claim observe that the positive divisors of p are p and 1 since p is a prime. The divisor p of p is not a divisor of a by assumption (for case 2), leaving 1 as the only possible common divisor. By Bezout’s identity 1 = up + va for some u, v ∈ Z. Multiply both sides of the equation by b giving the equation b = b(up + va) = (bu)p + v(ab). Since p | p and p | ab, we know p | b by the above lemma. Here is a concise version of the proof: Proof. If p|a we are done, so assume p 6 | a. In this case, p and a are relatively prime so 1 = up + va for some u, v ∈ Z (Bezout). Thus b = (bu)p + v(ab). Since p | ab, we get p | b. The above proposition generalizes from two factors to any finite number: Proposition 2. If p is a prime number and if p | a1 a2 · · · an , where each ai ∈ Z, then p | ai for some i. Proof. (Induction on n). We must first prove the statement when n = 1 (the “basis step”). Well if p|a1 then of course p|ai with i = 1. (“Induction step”). Now we get to assume the statement is true for n = k (the “inductive hypothesis”) and we must prove the statement for n = k + 1. In other words, we must show that if p is a prime number and if p | a1 a2 · · · ak+1 then p | ai for some i ∈ {1, . . . , k + 1}. So assume p | a1 a2 · · · ak ak+1 . In other words, p | bak+1 where b = a1 a2 · · · ak . By the previous proposition, either p|b or p|ak+1 . CASE 1: p|b. So p|a1 a2 · · · ak since b = a1 a2 · · · ak . By the induction hypothesis, this implies that p|ai for some i, and we are done. CASE 2: p|ak+1 . We are done since p|ai with i = k + 1. Here is a concise version of the proof: Date: Fall 2005. Version of October 1, 2005. 1 Proof. (Induction on n). The base case n = 1 is obvious. So assume the result holds for n = k. If p | a1 · · · ak ak+1 then p|a1 · · · ak or p|ak+1 by the previous proposition. The result follows by the induction hypothesis in the first case, and is obvious in the second. The next result will be needed in the proof of the Fundamental Theorem of Arithmetic. Lemma 2. If p|q where p and q are prime numbers, then p = q. Proof. The only positive divisors of q are 1 and q since q is a prime. Since p is also a prime, we have p > 1. So p is a positive divisor of q not equal to 1. Thus p must be q Theorem 1 (Fundamental Theorem of Arithmetic). Let n ≥ 2 be an integer. Then n can be written as the product of one or more primes. If n = p1 · · · ps and n = q1 · · · qt then s = t and, after rearranging the qi ’s, we have pi = qi for each i ∈ {1, . . . , s}. In other words, the factorization is unique up to the order of the prime factors. Proof. EXISTENCE OF FACTORIZATION. We prove this by contradiction. Suppose there is at least one integer n ≥ 2 which is not the product of one or more primes. Let S be the set of such integers. This set is bounded from below (by 0 say), so by the Boundedness Principle, there is a minimum element in S since we are assuming S is not empty. Let n be the minimum element of S: so n is the smallest integer (≥ 2) which is not the product of primes. If n is a prime then n is the product of just one prime: n itself. This gives our contradiction. If n is composite, then n = ab where both a and b are integers strictly greater than 1 and strictly smaller than n. Since n is the smallest integer that is not the product of primes, it follows that a = p1 · · · ps and b = q1 · · · qt where each pi and qi is prime. Thus n = p1 · · · ps q1 · · · qt , a contradiction. UNIQUENESS OF FACTORIZATION. Again we prove this by contradiction. Suppose there is at least one integer n ≥ 2 with two different prime factorizations (in other words, two factorizations such that the second cannot be rearranged to be identical to the first). Let S be the set of such integers. This set is bounded from below (by 0 say), so by the Boundedness Principle, there is a minimum element in S since we are assuming S is not empty. Let n be the minimum element of S. Suppose that n = p1 · · · ps n = q1 · · · qt are two distinct prime factorizations of n (and assume that they remain distinct even after rearranging the order of the product). Since n is a multiple of ps it follows that ps |n. So ps |q1 · · · qt since n = q1 · · · qt . Thus ps |qi for some i by Proposition 2. By the above lemma, ps = qi . By rearranging the prime factors so that qi is moved to the end (and relabeling the qj ’s), we can assume that ps = qt . In other words, n = p1 · · · ps−1 ps = q1 · · · qt−1 ps . We divide into two cases: CASE 1. s > 1 and t > 1. Then let n0 = p1 · · · ps−1 . By the cancellation law applied to the equation p1 · · · ps−1 ps = q1 · · · qt−1 ps we get n0 = p1 · · · ps−1 = q1 · · · qt−1 . 2 Since n0 < n, we know that unique factorization applies to n0 . So t − 1 = s − 1, in other words s = t, and, after rearranging factors, each pi = qi for i ∈ {1, . . . , s − 1}. We also saw that ps = qs above (remember s = t). So the two factorization of n are not distinct: a contradiction. CASE 2. s = 1 or t = 1. In this case, n is prime. Since n is not composite, both s and t are 1. Thus s = t = 1. Of course, this implies that n = p1 = q1 contradicting the assumption that the two factorization were distinct. Here is a concise version of the proof: Proof. Let n ≥ 2 be the smallest integer that is not the product of primes. In particular, n is not itself a prime, so n = ab where 2 < a < n and 2 < b < n. Since a and b are smaller than n, they are both products of primes, so n = ab is also a product of primes. Contradiction. Now we prove uniqueness. Let n ≥ 2 be the smallest integer with a non-unique factorization. Clearly primes satisfy unique factorization, so n is composite. Let n = p1 · · · ps = q1 · · · qt be two distinct prime factorizations of n. Since n is not prime, both s ≥ 2 and t ≥ 2. Observe that ps |q1 · · · qt . Thus ps = qi for some i by Proposition 2 and the above lemma. Rearrange and relabel the qj so that ps = qt . Cancel ps giving us p1 · · · ps−1 = q1 · · · qt−1 . Since p1 · · · ps−1 < n, we have s − 1 = t − 1 and, after rearranging, pi = qi for all i. This contradicts the assumption of two distinct factorizations of n. Remark. This result generalizes easily to negative integers: each negative integer factors as −1 times the product of primes, and the factorization is unique up to the order of the prime factors. It holds also in the case n = 1: the prime factorization is considered to have no primes (and the product of zero factors is considered to be 1, just like the sum of zero terms is considered to be 0). So the Fundamental Theorem of Arithmetic holds for any non-zero integer. In fact, there is an easy generalization to non-zero rational numbers which uses possibly negative powers. Remark. It is common to group together equal primes, and write the prime factorization of an integer n as pe11 pe22 · · · pess . We can even allow ei = 0 when we want to emphasize that pi does not occur in the prime factorization of n. For example, 12 = 22 31 = 22 31 50 45 = 32 51 = 20 32 51 . The use of zero exponents is useful in the calculation of GCDs and LCMS. As we will see, the GCD is obtained by taking the minima of corresponding exponents, and the LCM is obtained by taking the maxima: GCD(12, 45) = 20 31 50 = 3 LCM (12, 45) = 22 32 51 = 180. The use of ei = 0 can be used to give 1 a prime factorization: 1 = 20 = 30 , et cetera. The factorization is unique since in each case the primes truly involved form the empty set. By allowing ei < 0 we can obtain the prime factorization of any non-zero rational number. The prime factorization can be used to determine if an integer is a square: Proposition 3. Let n ≥ 2 be an integer. Then n is a perfect square if and only if each prime p occurring in the prime factorization of n occurs an even number of times. 3 Proof. Suppose n = c2 is a perfect square. (We can assume that c ≥ 2 since if c is negative we replace c with |c|, and |c| cannot be 0 or 1 since n ≥ 2). Write c as the product of primes: c = pe11 pe22 · · · pess . So 2 2es 2 n = c2 = pe11 pe22 · · · pess = p12e1 p2e 2 · · · ps . Thus each prime occurs an even number of times in the prime factorization of n. Conversly, suppose each prime pi occurring in the prime factorization of n occurs an even number of times: 2ei times, say. Then 2 2es 1 2e2 = pe11 pe22 · · · pess . n = p2e 1 p2 · · · ps So n is a perfect square. Dr. Wayne Aitken, Cal. State, San Marcos, CA 92096, USA E-mail address: waitken@csusm.edu 4