Number Theory. Introduction

Similar documents
Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Chapter 1 A Survey of Divisibility 14

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Cool Results on Primes

22. The Quadratic Sieve and Elliptic Curves. 22.a The Quadratic Sieve

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

= 5 2 and = 13 2 and = (1) = 10 2 and = 15 2 and = 25 2

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

An Introduction to Mathematical Thinking: Algebra and Number Systems. William J. Gilbert and Scott A. Vanstone, Prentice Hall, 2005

Chapter 5. Number Theory. 5.1 Base b representations

Honours Advanced Algebra Unit 2: Polynomial Functions Factors, Zeros, and Roots: Oh My! Learning Task (Task 5) Date: Period:

Commutative Rings and Fields

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

8 Primes and Modular Arithmetic

Finite Mathematics : A Business Approach

Section 4. Quantitative Aptitude

Introduction to Algebra: The First Week

6: Polynomials and Polynomial Functions

IES Parque Lineal - 2º ESO

Math Lecture 18 Notes

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

Factors, Zeros, and Roots

Lecture 4: Number theory

Math Circles - Lesson 2 Linear Diophantine Equations cont.

Divisibility of Natural Numbers

Quadratic Equations Part I

1 Continued Fractions

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Lines and Their Equations

1. multiplication is commutative and associative;

Solving Quadratic & Higher Degree Equations

32 Divisibility Theory in Integral Domains

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

Lesson 5b Solving Quadratic Equations

Homework #2 solutions Due: June 15, 2012

Questionnaire for CSET Mathematics subset 1

Fermat s Last Theorem for Regular Primes

Chapter 2. Divisibility. 2.1 Common Divisors

What is proof? Lesson 1

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Congruences. September 16, 2006

TAYLOR POLYNOMIALS DARYL DEFORD

An Invitation to Mathematics Prof. Sankaran Vishwanath Institute of Mathematical Science, Chennai. Unit - I Polynomials Lecture 1B Long Division

Algebra Year 10. Language

#26: Number Theory, Part I: Divisibility

Math 3 Variable Manipulation Part 3 Polynomials A

The Integers. Peter J. Kahn

Equations. Rational Equations. Example. 2 x. a b c 2a. Examine each denominator to find values that would cause the denominator to equal zero

Honors Advanced Algebra Unit 3: Polynomial Functions October 28, 2016 Task 10: Factors, Zeros, and Roots: Oh My!

Number Sense. Basic Ideas, Shortcuts and Problems #1-20 from the Sequence Chart

Contribution of Problems

Basic elements of number theory

Basic elements of number theory

The Euclidean Algorithm and Diophantine Equations

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

QUADRATIC EQUATIONS M.K. HOME TUITION. Mathematics Revision Guides Level: GCSE Higher Tier

Intermediate Algebra Textbook for Skyline College

Partial Fraction Decomposition Honors Precalculus Mr. Velazquez Rm. 254

Chapter Usual types of questions Tips What can go ugly. and, common denominator will be

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Elementary Properties of the Integers

6.4 Division of Polynomials. (Long Division and Synthetic Division)

then the hard copy will not be correct whenever your instructor modifies the assignments.

Factors, Zeros, and Roots

U7 - Polynomials. Polynomial Functions - In this first section, we will focus on polynomial functions that have a higher degree than 2.

Linear Diophantine Equations

Number Theory in Problem Solving. Konrad Pilch

3 The fundamentals: Algorithms, the integers, and matrices

4 Number Theory and Cryptography

Factoring Algorithms Pollard s p 1 Method. This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors.

Polynomials. This booklet belongs to: Period

Chapter 11 - Sequences and Series

SECTION 2.3: LONG AND SYNTHETIC POLYNOMIAL DIVISION

TESTCRACKER CAT TOPPER s PROGRAM: QUANT. Factorial

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

The Berlekamp algorithm

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Algebra Introduction to Polynomials

Learning Packet. Lesson 5b Solving Quadratic Equations THIS BOX FOR INSTRUCTOR GRADING USE ONLY

1 Overview and revision

Algebra Review. Finding Zeros (Roots) of Quadratics, Cubics, and Quartics. Kasten, Algebra 2. Algebra Review

Math 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS

CPSC 467b: Cryptography and Computer Security

Please bring the task to your first physics lesson and hand it to the teacher.

Chapter 1 Review of Equations and Inequalities

Chapter 3 Basic Number Theory

Fall 2017 Test II review problems

Example: This theorem is the easiest way to test an ideal (or an element) is prime. Z[x] (x)

In this unit we will study exponents, mathematical operations on polynomials, and factoring.

Algebra Review C H A P T E R. To solve an algebraic equation with one variable, find the value of the unknown variable.

1.1.1 Algebraic Operations

2. FUNCTIONS AND ALGEBRA

Rational Numbers CHAPTER. 1.1 Introduction

Transcription:

Number Theory Introduction Number theory is the branch of algebra which studies the properties of the integers. While we may from time to time use real or even complex numbers as tools to help us study the integers, these other number systems are not our primary focus. You might think that the integers are simpler than the real or complex numbers, and so number theory should be an easy thing to study. This is not true. Number theory is one of the deepest and most difficult branches of mathematics. We will barely scratch the surface. We will begin by studying simple equations involving integers, and trying to solve them. Consider an equation like 21x + 45y = 12. We want to find all integer values of x and y that make this equation true. This is a very simple looking equation. If we allowed x and y to take real values, it would give the equation of a line, which we could graph. We could find a formula for y in terms of x, and describe the set of all solutions quite precisely. However if we restrict ourselves to integer solutions only, none of this is any help. Algebraic equations involving the integers which must be solved in the integers are called Diophantine equations after a famous dead Greek bloke called Diophantus, who fiddled around with this kind of thing a lot. The equation above is an example of a linear Diophantine equation. We will find a method of solving such equations completely. Things get a lot harder however when the equations stop being linear. Quadratic or cubic equations involving the integers can be most difficult to solve. Frequently there are no integer solutions to such equations, and the task may be to prove this. Divisibility and the Division process In the integers we may add subtract and multiply freely, however we may not always divide. If we try to divide one integer by another, we are only guaranteed of being able to do the division up to a remainder. We know from primary school how to divide integers leaving a remainder. We know that it is always possible, and that there is only one possible answer, no matter how you do it. Let us sum up what we know. The Division Process If a and b are two integers with b 0, then we may find two other integers q (the quotient) and r (the remainder) with 0 r < b so that a = qb + r 1

Furthermore q and r are unique with this property. (There is only one possible answer). As you read this, make sure you agree that this is what division with remainder does. Also check out what happens when a and b are negative, and make sure that everything works OK. In the case that r = 0, then a = qb and we say that b divides a and write b a to denote this. There are other equivalent phrases in English which describe this relationship. We can say that b is a factor of a, or that a is a multiple of b. If b a then ±b ± a. For the purposes of divisibility, negative signs are irrelevant. Sometimes because of this we may think only about positive numbers, knowing that the negative case is the same. Note that if b a and a 0 then b a. Hence each non-zero number has only a finite number of factors. For example the factors of 14 are { 14, 7, 2, 1, 1, 2, 7, 14}. Every number a has at least the factors { a, 1, 1, a}. Numbers for which these are the only factors are called prime numbers. Note that negative numbers can be prime, and in fact a is prime if and only if a is prime. Zero is clearly not prime. From this definition, 1 and 1 would appear to be prime, however we choose to specifically exclude them from the definition. This is because 1 and 1 have properties quite unlike the other prime numbers, and if we allowed them to be prime, we would be forever mentioning them as special cases. We call these numbers units instead. Note that units are precisely those numbers that divide every other number. If a and b are two integers, then we call another integer c a common factor of a and b if c a and c b. In fact if {a 1, a 2,..., a n } are integers, we call c a common factor of the set {a 1, a 2,..., a n } if c a i for all i = 1, 2,..., n. Since the units are factors of everything, common factors always exist. Consider a Diophantine equation ax + by = k. If c is a common factor of a and b, then c will be a factor of ax + by for any choice of integers for x and y. So the only way we can get solutions to the Diophantine equation is if c k. For example the Diophantine equation 21x + 35y = 12 has no solutions, since 7 will always be a factor of the left hand side, and yet 7 is not a factor of 12. The problem of solving linear Diophantine equations is thus closely tied up with the problem of finding common factors. The Euclidean Algorithm In this section we present a very useful algorithm for finding common factors of two integers a and b. The algorithm is however much more useful than just that. From it, we will be able to (with a little bit of work) read off solutions to all Diophantine equations of 2

the form ax+by = k. Furthermore, the Euclidean algorithm is used in proving many nontrivial properties of the integers. It is our most important algebraic tool when working with the intergers, and has many applications. Let a and b be two given integers with b 0. Divide (with remainder) a by b. We obtain integers q and r with 0 r < b so that a = qb + r Let us look at this equation for a minute. We can even rewrite it as r = a qb. Suppose that c is a common factor of a and b. Then c (a qb) and so c r. Hence c is a common factor of b and r. Conversely, suppose that c is a common factor of b and r. Then c (qb + r) and so c a. Hence c is a common factor of a and b. We see from this, that the common factors of a and b are exactly the same as the common factors of b and r. So instead of looking for common factors of a and b, we can find the common factors of b and r instead. Why bother? you might ask. Well usually r (the remainder) is a lot smaller than a, and hence finding common factors is a lot easier if we use r instead of a. Now the key to the whole thing is the realisation that we need not stop there. If we do it again and again, at each step the numbers will get smaller, but the common factors remain the same. This is essentially all that the Euclidean algorithm involves. a = q 1 b + r 1 0 r 1 < b b = q 2 r 1 + r 2 0 r 2 < r 1 r 1 = q 3 r 2 + r 3 0 r 3 < r 2 r 2 = q 4 r 3 + r 4 0 r 4 < r 3... r n 1 = q n+1 r n + r n+1 0 r n+1 < r n Note that at each step, the quotient is ignored, and the remaining numbers are shifted to the left. Note also that the remainders form a strictly decreasing sequence of positive integers. Thus if we continue the process long enough, at some point we will end up with r n+1 = 0, which is when the process will stop. The last equation will then be r n 1 = q n+1 r n So we see that r n is a factor of r n 1, and hence the common factors of r n and r n 1 will be precisely the factors of r n. We then argue that the factors of r n are the common factors of r n and r n 1, which are the common factors of r n 1 and r n 2, which are the common factors of r n 2 and r n 3, which are... etc, etc... the common factors of a and b. 3

Hence the common factors of a and b will consist of all the factors of r n. Notice that as an important consequence of this, the common factors of two integers a and b are always the factors of a single number. Such a number is called a greatest common divisor, or g.c.d. for short. We call d a g.c.d. of a and b if whenever c a and c b then c d. Each pair of numbers has two greatest common divisors, a positive one and a negative one. The Euclidean algorithm always gives us the positive one. We denote this positive greatest common divisor of a and b by the expression (a, b). It is a bit like the situation with regard to square roots, where x always denotes the positive square root even though two square roots, a positive one and a negative one, exist. It is time for an example. Consider the two integers 10362 and 12397. We apply the Euclidean algorithm below. Note that our two initial numbers and our remainders are underlined. This is to remind us of which numbers we are working with during the calculation. We will see later another reason for this. We thus see that (10362, 12397) = 11. 12397 = 1 10362 + 2035 10362 = 5 2035 + 187 2035 = 10 187 + 165 187 = 1 165 + 22 165 = 7 22 + 11 22 = 2 11 Now consider for a moment the Diophantine equation 10362x + 12397y = k for some fixed constant k. As 11 is always a factor on the left hand side, there will be no solution to the equation unless k is a multiple of 11. Let us consider for a moment the case that k = 11. This is the smallest interesting equation where we might hope to find solutions. It turns out that if we can solve this equation, we can solve all the others. I claim that the Euclidean algorithm not only finds the g.c.d. for us, but gives us a solution to this Diophantine equation as well. To obtain this solution we apply a process of back-substitution to the steps in the Euclidean algorithm. We rearrange the steps in the Euclidean algorithm, (all except for the last one) to make the remainder in each case the subject of the equation. In this case we obtain 2035 = 12397 1 10362 187 = 10362 5 2035 165 = 2035 10 187 22 = 187 1 165 11 = 165 7 22 4

Now we begin with the last equation, and use the other equations working from bottom to top, to substitute for the appropriate underlined expressions. I have performed this calculation below. Note that the underlined numbers are to be regarded as protected, and should not be calculated out at any time. We can and will collect these numbers up as common factors however. And we are free to do any calulations we like with the non-underlined numbers to simplify the resulting expressions. 11 = 165 7 22 = 165 7 (187 1 165) = 8 165 7 187 = 8 (2035 10 187) 7 187 = 8 2035 87 187 = 8 2035 87 (10362 5 2035) = 443 2035 87 10362 = 443 (12397 1 10362) 87 10362 = 443 12397 530 10362 Hence a solution to the Diophantine equation 10362x + 12397y = 11 occurs when x = 530 and y = 443. I hope you will agree that finding such a solution by trial and error without using the Euclidean algorithm would be rather difficult. Let us now sum up what the Euclidean algorithm does for us in a nice concise form. The Euclidean Algorithm Given any two non-zero integers a and b there exist two integers m and n with am + bn = (a, b), and these can be obtained by the Euclidean Algorithm using back-substitution. Linear Diophantine Equations We now have everything we need to solve linear Diophantine equations. Consider the equation ax + by = k We firstly find (a, b) using the Euclidean Algorithm. If k is NOT a multiple of (a, b) then the equation has no integer solutions, and we can just state this fact and stop. If k is a multiple of (a, b) then we can write k = t(a, b) for some integer t. The Euclidean algorithm gives us integers m and n so that am+bn = (a, b). If we multiply both sides of this equation by t we obtain the equation a(tm) + b(tn) = t(a, b) = k 5

So we see that x = tm and y = tn gives a solution to the Diophantine equation. For example, the equation 10362x + 12397y = 13 has no solutions as 13 is not a multiple of 11. On the other hand, the equation 10362x + 12397y = 55 has solutions since 55 = 11 5. We can obtain a solution by simply multiplying the values obtained from the Euclidean algorithm by 5. This gives us a solution when x = 530 5 = 2650 and y = 443 5 = 2215. One more example. Consider the equation 10362x + 12397y = 0 Now clearly this will have solutions, since everything divides 0. In fact you need not even do the Euclidean algorithm in this case as a solution to this equation is obvious, namely x = 0 and y = 0. The case where the constant term is zero is as you can see, very easy. So far we have discovered how to tell if a linear Diophantine equation has solutions, and in the case when solutions exist, we can always find one of them. What we now would like to do is find if there are any more solutions, and if so give a formula to describe all of them. We will do this in a theoretical way first, and then do an example. Suppose we have the Diophantine equation ax + by = k = t(a, b) And that we have discovered (using the Euclidean Algorithm) that this has a solution when x = x 0 and y = y 0. Thus x 0 and y 0 obey the above equation. We write these two equations down, and subtract. We will then obtain We thus have the equation ax + by = k ax 0 + by 0 = k a(x x 0 ) + b(y y 0 ) = 0 a(x x 0 ) = b(y y 0 ) Now we notice that the left hand side is a multiple of a, and the right hand side is a multiple of b. Therefore, since the two sides are equal, the whole thing is divisible by both 6

a and b. Before we can continue, we need to do some work on common multiples. So we will take a break from Diophantine equations for a minute, while we do this. If a and b are two integers, we say that c is a common multiple of a and b if a c and b c. Note that ab is a common multiple of a and b, but there are clearly often smaller common multiples. For example 10 and 45 have common multiple 90, which is smaller than 10 45 = 450. If c and c are two common multiples of a and b then mc + nc will be a common multiple of a and b for every choice of integers m and n. In particular, we can choose m and n via the Euclidean algorithm, and conclude that (c, c ) is a common multiple of a and b. This tells us that we can find a smaller common multiple which divides the given ones. By repeating this process we see that there must exist a least common multiple or l.c.m. of a and b, and that all other common multiples are multiples of the least common multiple. More formally, the LCM is a number c which is positive and which divides every common multiple of a and b. The argument above can be tidied up into a proof that least common multiples always exist. We denote the least common multiple of a and b by the expression [a, b]. Note that ab is a common multiple, hence it must be a multiple of [a, b]. Suppose [a, b]d = ab. Then [a, b] b and since the left hand side is an integer, so is the right hand side and therefore d divides a. Similarly d divides b and so d is a common divisor. So in particular d (a, b). On the other hand ab /(a, b) is a common multiple of a and b, and so is bigger than [a, b]. That is ab /(a, b) [a, b] which implies (since everything is positive) that (a, b) ab /[a, b] = d. We can conclude that = a d ab = (a, b)[a, b] This simple formula allows us to find the l.c.m. from the g.c.d. and vice versa. Now let us return to the question of solving Diophantine equations. We earlier were considering the equation a(x x 0 ) = b(y y 0 ) This quantity is a common multiple of a and b, and hence is a multiple of [a, b]. Thus x x 0 = t[a, b]/a and y y 0 = t[a, b]/b. 7

[a, b] Using the relation [a, b](a, b) = ab we can write = ± b [a, b] and = ± a a (a, b) b (a, b) where the plus or minus sign is the same in each case and depends on whether or not a and b have the same sign. So once we know the gcd, we can work out these numbers without actually having to work out the lcm (which could be quite large) first. Putting all this together we can write the formula for the general solution to the Diophantine equation as ( ) b x = x 0 + t (a, b) ( ) a y = y 0 t (a, b) Where t is an integer. This formula works in all cases of a and b being positive or negative, although in practical terms it is best to write the numbers down and apply a common sense reality check to see that the signs are right for the extra terms to be cancelled in the Diophantine equation. We can obtain any solution we like from this general formula by plugging in different integer values for t. By way of an example, consider the equation 10362x + 12397y = 55 which we had earlier. We then found a particular solution occurred when x = 2650 and y = 2215. And also that the gcd was 11. Putting these values into the formula we have found, we find ( 12397 x = 2650 + 11 ( 10362 y = 2215 11 ) t ) t = 2650 + 1127t = 2215 942t Every solution to the Diophantine equation is described by this formula. To get a particular solution, we merely choose some number for t. In some cases we might be interested later in using the formula to look for certain solutions. For example we might want to find the solution giving the smallest positive value for x. Looking above we see that this will happen when t = 3, and this gives the particular solution x = 731 and y = 611. This completes our investigation of the solution of linear Diophantine equations in two variables using the Euclidean Algorithm. 8