Docsity

The Fundamental Theorem of Arithmetic: Prime Factorization and Unique Factorization, Exercises of Linear Algebra

Toggle sidebar
bg1
9 The Fundamental Theorem
of Arithmetic
Prime Factorization
In Chapter 8 we looked for a general conjecture about the relation between τ(n)
and n, and failed. Now we look for a pattern in the relation between prime numbers
and composites. Finding such a pattern may illuminate our earlier problem.
Composite numbers have divisors other than themselves and 1. Some of those
divisors are primes, and some may be composite. The divisors of composite divisors
also may be prime or composite. But it looks as if we've got to get to prime divisors
sooner or later. This leads to the conjecture:
CONJECTURE: Any composite number can be represented as a product in which
all of the factors (multiplicands) are primes.
Pick a composite number such as 300. One algorithm for finding the factorization
is to begin with the smallest prime divisor (2) and use it as a factor. We get 300 =
2·150. We look at 150 and find its smallest prime divisor. This is 2 again, so we
replace 150 with 2·75 and write 300 = 2·2·75. 75 is not prime. We find its smallest
prime divisor (3), replace 75 with 3·25, giving 300 = 2·2·3·25. The smallest prime
divisor of 25 is 5, so we get 300 = 2·2·3·5·5. Since 5 is prime, we are done.
Another algorithm for finding the prime factorization of a
number is called the "branching method."1 Select any two
numbers whose product is the number to be factored. If the
factors are not prime numbers, then continue factoring until all
factors are prime. The branching that leads to the prime
factorization of 300 (shown at right) gives 300 = 5·3·5·2·2.
The convention is to write the primes in ascending order, so we
should say 300 = 2·2·3·5·5.
300
15 20
5 3 5 4
2 2
Exercise. Write 57, 117, and 1728 as the products of primes.
By either method, any composite number can be represented as the product of
primes. This leads to the following proof.
1 Angel & Porter, A Survey of Mathematics with Applications, 4th Ed. (Reading, Mass.: Addison-Wesley,
1993), pp. 173-5
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download The Fundamental Theorem of Arithmetic: Prime Factorization and Unique Factorization and more Exercises Linear Algebra in PDF only on Docsity!

9 The Fundamental Theorem

of Arithmetic

Prime Factorization

In Chapter 8 we looked for a general conjecture about the relation between τ (n)

and n , and failed. Now we look for a pattern in the relation between prime numbers

and composites. Finding such a pattern may illuminate our earlier problem.

Composite numbers have divisors other than themselves and 1. Some of those

divisors are primes, and some may be composite. The divisors of composite divisors

also may be prime or composite. But it looks as if we've got to get to prime divisors

sooner or later. This leads to the conjecture:

CONJECTURE : Any composite number can be represented as a product in which

all of the factors (multiplicands) are primes.

Pick a composite number such as 300. One algorithm for finding the factorization

is to begin with the smallest prime divisor (2) and use it as a factor. We get 300 =

2 · 150. We look at 150 and find its smallest prime divisor. This is 2 again, so we

replace 150 with 2· 75 and write 300 = 2 · 2 · 75. 75 is not prime. We find its smallest

prime divisor (3), replace 75 with 3·25, giving 300 = 2 · 2 · 3 · 25. The smallest prime

divisor of 25 is 5, so we get 300 = 2 · 2 · 3 · 5 · 5. Since 5 is prime, we are done.

Another algorithm for finding the prime factorization of a

number is called the "branching method." 1 Select any two

numbers whose product is the number to be factored. If the

factors are not prime numbers, then continue factoring until all

factors are prime. The branching that leads to the prime

factorization of 300 (shown at right) gives 300 = 5 · 3 · 5 · 2 · 2.

The convention is to write the primes in ascending order, so we

should say 300 = 2 · 2 · 3 · 5 · 5.

Exercise. Write 57, 117, and 1728 as the products of primes.

By either method, any composite number can be represented as the product of

primes. This leads to the following proof.

(^1) Angel & Porter, A Survey of Mathematics with Applications, 4th Ed. (Reading, Mass.: Addison-Wesley, 1993), pp. 173-

Proof : Take any natural number n. If n is composite, it can be written as the

product of two smaller natural numbers. If those two natural numbers are both prime,

the conjecture is true. If either of the two is composite, it is in turn the product of

smaller natural numbers. Continuing this process until we meet only primes, we

eventually have n written as the product of primes.„

Many composite numbers can be factored in more than one way. For example, 12

= 2 · 6 = 3 · 4 = 1 · 12. But every number I've tried seemed to have only one prime

factorization. Is that the case for all composite numbers?

Suppose I decide to factor some huge number N. I opt to use the first algorithm,

above, and, after much computer time, I get a list of n primes p 1 , p 2 , p 3 , … , and pn. I

confirm that the pi s really are all prime numbers. I multiply them all together and get

the product p 1 p 2 p 3 …pn = N. Suppose someone else factors the same number N. She

uses a different algorithm, running on a different kind of computer. She discovers a

list of m prime divisors q 1 , q 2 , q 3 , … , and qm. Every one of her qi s is prime, and their

product q 1 q 2 q 3 …qm = N. Is it possible that n is not equal to m and/or that at least one

of my p s is different from at least one of her q s? In how many ways can a composite

number be written as the product of primes? Or is there a unique factorization of any

composite number into primes?

What happens if a number you're trying to factor is prime? How many divisors do

you have to try before you can be sure that the number you're trying to factor is prime?

There are some simple tests that permit quick recognition that a number is not

prime. There is no need to test even numbers, because every even number is divisible

by 2. Any number ending in a 5 or a 0 will be divisible by 5. We can see that a number

like 5,106,843 is divisible by 3 by adding its digits (27) and then adding the digits in

the result (9) until we get a single digit. If that digit is divisible by 3 (it is), the original

number was divisible by 3. Other tests can be performed by converting the original

number to a base other than 10. When the easy tests fail, we just have to try dividing

the number by one prime after another.

If we have tried all the primes smaller than some prime p , and if p^2 > N (where N

is the number we are trying to factor), then we can stop. N must be prime. (Don't just

accept this claim. Satisfy yourself that it is true by figuring out why it must be so.) If N

is a 100-digit number, p could be a 49- or 50-digit number. That means we'd have to

try every prime less than some 49- or 50-digit number. How many primes would that

be? It has been proved that the number of primes less than N is approximately

N

ln(N).

We'd have to check about 10^46 primes. If our computer could try a million primes a

second, it would take about 3× 1024 years (that's 3 followed by 24 zeroes, or 3 million

(^2) By ln( N ) I mean the natural logarithm of N.

Special Numbers

Consider numbers (prime or composite) that do have the special property that,

whenever they divide a product of two multiplicands, they divide at least one of the

multiplicands. Stein calls them "special numbers." 5

DEFINITION: A natural number greater than 1 is special if and only if,

whenever it divides the product of two natural numbers, it divides at least one

of them. Symbolically, x is special ≡ ((x | (a · b)) ⊃ (x | a ∨ x | b)).

If all primes are special, the proof-strategy outlined above will work, because we

would know "that this forces p 1 to divide at least one of the q s." Before we try to

prove that all primes are special, we should assure ourselves that at least some primes

are special.

CONJECTURE : 2 is special.

PROOF : The conjecture is that whenever 2 divides a number a · b (i.e., when

2 | (a · b) ), 2 must divide a or b or both. We use an indirect proof. Suppose that 2

divides a · b but that 2 does not divide either a or b. If 2 does not divide a or b then

both a and b are odd. If they are odd, a can be written as 2d + 1 for some whole

number d , and b can be written as 2e + 1 for some whole number e. Using these forms

of a and b , the product a · b can be written: (2d + 1)(2e + 1) = 4de + 2d + 2e + 1. Clearly,

4de + 2d + 2e is an even number. So 4de + 2d + 2e + 1 (one more than an even number)

must be odd. So a · b must be odd. But since 2 divides a · b , we have a contradiction

( a · b is odd and a · b is not odd). Either a or b must be even. Either 2 must divide a or

2 must divide b. Therefore 2 is special.„

Try to prove that 3 and 5 are special.

You might conjecture that any natural number is special. However, that

conjecture is easily disproved by the fact that 6 divides 12 (= 3 · 4 ), but it divides

neither 3 nor 4, so 6 is not special. That 6 (a composite number) is not special suggests

the conjecture that no composite number is special. We can re-state this conjecture in

the form of its contrapositive,^6 as

CONJECTURE : Every special number is prime.

PROOF : We prove this conjecture by proving that no composite number is

special. Let n be a composite number. Then n is the product of two smaller natural

(^5) Sherman K. Stein, Mathematics: the Man-Made Universe, 2nd^ Ed. (San Francisco: W.H. Freeman and Company, 1969). (^6) The contrapositive of ∀ x(Cx ⊃ ~Sx) (no composite number is special) is ∀ x(~~Sx ⊃ ~Cx). Getting rid of the double-negation and because ~Cx ( x is not composite) is (for x > 1 ) equivalent to Px ( x is prime), this is ∀ x(Sx ⊃ Px) (every special number is prime).

numbers, a and b , which are both greater than 1. Thus n divides the product of a and

b , because every number divides itself. Because a and b are smaller than n , n cannot

divide either a or b. Thus n is not special. Since the only thing we assumed about n

was that it was composite, we have proved that no composite number can be special,

from which it follows that every special number is prime.„

So, ∀ x(Sx ⊃ Px) – every special number is prime. As you should remember, this

does not establish the converse, that every prime is special. To prove the Fundamental

Theorem of Arithmetic we need to prove that every prime is special.

As we saw, if every prime is special, then factorization into primes is unique

(in symbols, S ⊃ U , where S is the statement that all primes are special, and U is the

statement that factorization into primes is unique). To prove S ⊃ U , we assumed

something that we did not know. We said " If we knew that this forces p 1 to divide at

least one of the q s , …" and proved the Fundamental Theorem. That is a Conditional

Proof step. We assume S and tried to prove U. If we succeed it follows that S ⊃ U.

Look back to what led us to define "special numbers" and remind yourself that the

issue then was the question "If a prime divides the product of several natural numbers,

must it divide at least one of them?" We can prove the theorem:

THEOREM 1 : If a special number divides the product of several natural numbers,

then it divides at least one of them.

PROOF : We make the argument for the case in which a special number s divides

the product of three natural numbers a , b , and c. We have to prove that s divides at

least one of a , b , and c.

Our assumed premise is that s is a special number which divides the product abc.

Now bc (the product of two natural numbers) is a natural number. So abc is the

product of two natural numbers – a and bc. Then s must divide either a or bc. If s

divides a , we have shown that it divides at least one of a , b , and c. If s does not divide

a , it must divide bc. If s divides bc , it must divide either b or c. So whenever (if) a

special number divides a product of three natural numbers, it must divide at least one

of them. Using mathematical induction, we could show that when a special number

divides the product of any number of natural numbers, it divides at least one of

them.„

Euclid's Algorithm

A number that is a divisor of two integers a and b is called a common divisor of

a and b. A pair of numbers may have several common divisors (every pair of integers

not both equal to 0 has at least one common divisor, since 1 divides every integer).

The greatest common divisor of two integers a and b – symbolized as (a, b) – is

the largest integer that divides both a and b.

easier way to calculate the greatest common divisor of two natural numbers. The

method is called Euclid's algorithm. To find the greatest common divisor of the

numbers 72 and 20 (i.e., (72, 20) ), we first divide 72 by 20. We get 72 = 3 · 20 + 12.

The remainder is 12. By Lemma 3, (72, 20) = (20, 12). Divide 12 into 20 and find the

remainder. 20 = 1 · 12 + 8 (the remainder is 8), so by Lemma 3, (20, 12) = (12, 8).

Divide 8 into 12. 12 = 1 · 8 + 4 , so (12, 8) = (8, 4). Divide 4 into 8 and find the

remainder. 8 = 2 · 4 + 0 (the remainder is 0). By Lemma 3, (8, 4) = (4, 0). But Lemma

1 asserts that (4, 0) = 4. Combining all the steps, we get (72, 20) = 4.

We repeatedly divide and find remainders until we find a remainder of 0. At each

step the remainder is smaller than the remainder from the previous step. Eventually we

must obtain a remainder of 0. The remainder before 0 is the greatest common divisor.

Exercise on Euclid's Algorithm

1. Use Euclid's Algorithm to find the greatest common divisor of (a) 117 and 51. (b) of

252 and 147. (c) of 176 and 105. (d) of 600 and 398. (e) of 6447 and 5767.

2. Find (433, 144) , (164, 72) , (91, 39) , (6463, 5773) , (1468823, 1456813).

Last Steps in the Proof

LEMMA 4 : For any whole numbers a and b (not both 0) there are integers m and

n such that (a, b) = ma + nb.

PROOF : Lemma 4 is related to the potato-weighing questions discussed in

Chapter 8. Lemma 4 says that a - and b -gram weights can weigh a number of grams as

small as the greatest common divisor of a and b. We can use the Euclidean Algorithm

to find the greatest common divisor of any pair of weights and answer questions we

posed (but did not answer) in the discussion of weights and measures.

In order to find m and n , we "unwind" the Euclidean Algorithm. An example

should make this clearer.

Say a = 945 and b = 219. We will find (a, b) by the Euclidean Algorithm and

then find integers m and n such that (a, b) = ma + nb. The computations for finding

(945, 219) appear on the left, below; the underline identifies the successive a and b in

the relation b = qa + r at each stage. On the right are equations for the remainders at

each stage; these equations will be used for finding m and n.

Euclidean Algorithm Equations for finding m and n

Remember what we're trying to do. We want an equation like (a, b) = ma + nb ,

where a = 945 , b = 219. The Euclidean Algorithm shows that (945, 219) is 3. We

want to find m and n that satisfy the equation 3 = 945 · m + 219 · n. We use the right

column, starting at the bottom and working up (equivalent to finding a way to weigh a

3-gram potato with 945- and 219-gram weights).

The bottom equation on the right ( 3 = (1 · 12 ) − (1 · 9 ) ) expresses 3 in terms of 9's

and 12's. We want to express it in terms of 945's and 219's. The next equation above it

expresses 9 in terms of 69's and 12's ( 9 = (1 · 69 ) − (5 · 12 ) ). Substituting that

expression for 9 in 3 = (1 · 12 ) − (1 · 9 ) , we get 3 = (1 · 12 ) − (1 · ((1 · 69 ) − (5 · 12 ))) which

can be re-written as 3 = (1 · 12 ) − (1 · 69 ) + (5 · 12 ) , or 3 = (6 · 12 ) − (1 · 69 ) , an equation

for 3 in terms of 12's and 69's. To remove the 12, we use 12 = (1 · 219 ) − (3 · 69 ). We

re-write 3 = (6 · 12 ) − (1 · 69 ) as 3 = 6 · ((1 · 219 ) − (3 · 69 )) − (1 · 69 ). Reduce it to 3 =

(6 · 219 ) − (18 · 69) − (1 · 69 ) , or 3 = (6 · 219 ) − (19 · 69 ). This expresses 3 in terms of 69's

and 219's. To get rid of the 69's, we look at the top equation on the right column of our

table, above, and find 69 = (1 · 945 ) − (4 · 219 ). Substituting for 69 in the equation 3 =

(6 · 219 ) − (19 · 69 ) , we get 3 = (6 · 219 ) − (19 · ((1 · 945 ) − (4 · 219 )) , simplified to 3 =

(82 · 219) − (19 · 945). Thus, 3 = (82 · 219) + (( − 19) · 945). We have found m = − 19

and n = 82 that express (945, 219) in the form m · 945 + n · 219.

Since this technique can be applied to any (a, b) , we have proved the lemma.„

THEOREM 2 : Every prime is special.

PROOF : Let a and b be natural numbers, and let p be a prime that divides their

product ab. We wish to prove that p must divide at least one of a and b. To do this, we

prove that if p does not divide a , it must divide b.

If p does not divide a , we have, by Lemma 2, (p, a) = 1. Lemma 4 then promises

that there are integers m and n such that 1 = mp + na. If we multiply both sides of this

equation by b , we obtain b = mpb + nab. p divides mpb. Since p divides ab , it also

divides nab. Hence, p divides the sum mpb + nab. That sum is just b. Therefore p

divides b. So p is special. Since this proof made no assumptions about p except that it

was prime, we have shown that every prime is special.„

THEOREM 3 : If a prime p divides a product q 1 q 2 q 3 …qm it divides at least one of

the q s.

PROOF : Use mathematical induction. If there is only one q (so m = 1 ) then p

divides it. Assume (as an AP ) that the theorem is true for m = n , so whenever p

divides a product N = q 1 q 2 q 3 …qn it divides at least one of the q s. Now look at the

case when m = n + 1 (the product contains one more multiplicand). q 1 q 2 q 3 …qnqn+1 is

the product of two numbers, N and qn+1. By theorem 2, whenever a prime divides the

product of two natural numbers, it divides one of them. So either p divides N or p

divides qn+1. If p divides N , then (since N contains only n factors), the assumed

occurs among the s s, then p divides a. If p is among the t s, then p divides b. This

shows that p is special.„

So the Fundamental Theorem of Arithmetic is equivalent to the statement "every

prime is special."

Exercise on the Fundamental Theorem of Arithmetic

1. Define in your own words "prime number" and "special number." Which is easier:

showing that a number is prime or showing that it is special? Why? Is it easier to

show that every special number is prime or that every prime number is special?

Why? Is "prime" a synonym for "special" in ordinary arithmetic?

2. List all the divisors of 23 · 54. How can one use the Fundamental Theorem in

answering this question?

3. Let a = 33 · 72 and b = 3 · 5 · 73. Use the Fundamental Theorem to show that (a, b)

= 3 · 72. Explain how you used the Fundamental Theorem of Arithmetic.

4. Find (144, 96) in three ways. (a) List all the divisors of 96 and of 144 and find

which is the greatest common divisor. (b) Use the Euclidean Algorithm. (c)

Express 96 and 144 as the product of primes and use the Fundamental Theorem of

Arithmetic.

5. Find the largest number that divides both 25 · 7 and 26 · 5.

The Fundamental Theorem and Irrational Numbers

In Chapter 7 we proved that there is no rational number whose square is 2. The

fundamental theorem allows us to prove that there are infinitely many irrational

numbers.

Imagine a rational number

a

b whose square is^^2 , where^ a^ and^ b^ are coprime.^ Two

natural numbers whose greatest common divisor is 1 are said to be relatively prime or

coprime. Let the number of primes in the prime factorization of a be m , and the

number of primes in the prime factorization of b be n .9^ From

a 2

b 2 = 2 , we get^ a

2 = 2b 2.

Since a is the product of m primes, then a^2 will be the product of 2 · m primes.^10

Similarly, b^2 will be the product of 2 · n primes. But then 2b^2 will be the product of

(2 · n) + 1 primes (Why?). So the number of primes in the prime factorization of a^2 is

even, and the number of primes in the prime factorization of 2b^2 is odd. But a^2 is

equal to 2b^2. If a^2 = 2b^2 , then the same number has two different prime factorizations

(one with an odd, one with an even number of primes). This is impossible, according

(^9) m and/or n could be 1 if one or both of a and b is/are prime. (^10) Figure it out. If a = p 1 · p 2 · p 3 · … · p (^) m , then a · a = p 1 · p 2 · p 3 · … · p (^) m · p 1 · p 2 · p 3 · … · p (^) m , so every one of the m primes occurs twice in a^2 , so we have 2 · m primes.

N AND TAU OF N (AGAIN) 133

to the Fundamental Theorem of Arithmetic. So there is no rational number whose

square is two.„

Any number whose square root is rational must contain an even number of every

prime in its prime factorization. Thus, 8 = 2 · 2 · 2 , so the square root of 8 is irrational.

16 = 2 · 2 · 2 · 2 , so the square root of 16 is rational. Cube roots of numbers whose prime

factorizations don't contain a multiple of 3 of every prime factor are also irrational.

And so on.

Generalizing this further, we can prove

Theorem : If a is an integer, then the n th^ root of a (

n

a ) is either an integer or an

irrational number.

Proof : Using fractional powers,

n

a is just another way to write a1/n. If

n

a is

rational then there are some integers u and v such that

n

a =

u

v , with^ u^ and^ v^ relatively

prime. Then (

n

a)n^ = (

u v)

n , giving (a1/n)n = a = u^

n

v n.^ Multiplying both sides by^ v

n , we

get vna = un. By the fundamental theorem of arithmetic, every prime factor of vna

must be a prime factor of un. The prime factors of un^ are just the prime factors of u

repeated n times, so the prime factors of vna must be prime factors of u.

By definition, if a special number divides the product of two natural numbers,

then it divides at least one of them. Every prime is special. So every prime factor of u

must divide either vn^ or a. But u and v are relatively prime. None of the factors of u

can divide v or any power of v. So every prime factor of u must be a factor of a. Every

prime factor of un^ is a prime factor of u , so every prime factor of un^ is a prime factor

of a. But un^ = vna. So every prime factor of vna is a prime factor of a.

Since every prime factor of vna is a prime factor of a , so there are no prime

factors of vn. So vn^ = v = 1. So

u

v =^ u , and^ a^ =^ u

n. Every prime factor of a must

appear n times in the prime factorization of un. Thus, every prime factor of a must

occur n times in the prime factorization of a. Then a is an n th^ power, and so

n

a is an

integer. So, if

n

a is rational, then

n

a is an integer. Either

n

a is an integer or it is

irrational.„

n and Tau of n (again)

In Chapter 10 we tried to find a pattern in the relations between a number n and

the number of its divisors τ (n). Knowing that each natural number has a unique prime