You are on page 1of 275
TORONTO PUBLIC LIBRA WVHA VAHL NT 37131 065 199 390 NY Central CLASSICAL ALGEBRA FOURTH EDITION William J. Gilbert Scott A. Vanstone University of Waterloo Centre for Education in Mathematics and Computing First Edition August 1975 Ss nt Edition . lune Long Third Edition July 1994 Fourth Edition | : fine 2000 Published by the / Centre for Education in Mathematies and Computing University of Waterloo Waterloo, Ontario, Canada, N2L IGT Telephone: $19-885-1211, extension 3030 Fax: §19-746-6592 Canadian Cataloguing in Publication Data Gilbert, William J., 1941- Classical algebra 4% ed. ISBN 0-921418-94-9 1. Algebra. 2. Algebra — Problems, exercises, etc. I. Vanstone, S. A. (Scott Alexander), 1947— II. University of Waterloo. Centre for Education in Mathematics and Computing. III. Title. QAI54.2.G55 2000 512 C00-93 1679-5 Copyright ©2000 by William J, Gilbert and Scott A, Vanstone Faculty of Mathematics, University of Waterloo Waterloo, Ontario, Canada All rights ce art Of thi i ighis re = No part of this publication may be reproduced, a system, or transmitted in any form or by any means, + mechanical, pholocopying, recording or otherwise, without the prior written permissi r u Permission of the Centre for Educati ies and Computing © for Education in Mathemat- Printed by Graphi hic Services, University of Cover by David Barthel UYersily of Waterloo C Preface Q is book is designed fOr @ fist algebra course for unive ily Students This boo! matics OF computer science, ‘The idea behin : i th d this book j ajor in maul C ebra se wi ' ma opis it College Algebra Course will follow from the quest to solve po} use 1 equations over various number systems, + a nomial Molivation to solve equati is precisely the same as that of most of the cla ssical algebraists, and indect Pe a material in the book was known Prior to 1800, ig the rea der the techniques for solving polynomial Cquations and this book will prepare the student for more advanced courses in Linear and Modem Algebra, as well as the Iculus. . . | “ The book starts with the integers, and works it: r is Way up the number Systems until the complex numbers and the solutions of complex polynomials ig Teached. We begin by attacking the solution of Diophantine equations, using greatest common divisors, as this topic gives the students something to get their teeth into that they have not tasted at high school. Diophantine equations naturally lead to ce ‘Ongruences modulo an integer. We then discuss mathematical induction and give a bi icf chapter on rational and real numbers. Functions are introduced so we can talk about inverses, We then give a current application to cryptography; the RSA scheme for encrypting and decrypting Messages relies on Classical Algebra, even though its use is so new that it was not discovered when the first edition of this book was written. This topic ties together ‘many of the ideas from the initial chapters. Itis assumed that the reade Mary is provided in for this book, many who wish to S that all the T has some knowledge of Trigonometry; a brief sum- the Appendix, While a knowledge of Calculus is not necessary students learn a little in high school, so we occasionally use the derivative of a Polynomial to help us sketch a graph. “ete aeample questions for the student to tackle atthe end of each shaper. They are divided into two types; the Exercises are routine applications of the material int e chapter, while the Problems usually require more ingenuity, and range from easy te ne impossible. Answers to the odd numbered questions are given at the back o! the book, iv PREF ep Changes in the Fourth Edition roofs has been added, and Section 3.2 has be to Recursion. The definition of the cco, ane 8 hey from the Well Ordering Property rewritten and it is now defined to be nonnegative. Various theorems and on have been rewritten to make them clearer, We would especially like t lDOFthin, 0 thank ji Geelen, Alfred Menezes, and Paul Schellenberg for their comments and 9, . UEBesting “EEStiony on the revision. Chapter 0 on Logic and P Acknowledgments We are grateful for all the assistance we received fr assisla Tom our colleagues and Students in the first year algebra course at the Universit ) : se a ‘sity of Waterloo, a Eaward Moskal, who edited an earlier set of notes for the cource and especialy frm Finally we would like to thank Andrea V: ot y ; hat anstone for typin; i iti Ru Gilben for typing the original edition. The book Wad tyaewe thet ipaiten ‘ imes Roman font, on a NeXT computer running OPENSTEI ae are in Encapsulated PostScript. and all the figures Contents Preface Introduction 0 Logic and Proofs ol 0.2 0.3 04 05 1 Integers and Diophantine Equations 11 12 1.3 14 15 2 Congruences PROPOSITIONAL LOGIC . . . ; BMS see cece LED ttitirss - 3 QUANTIFIERS vietneeer eee 13 METHODS OF PROOF .. COUNTEREXAMPLES . . EXERCISE SET 0 THE DIVISION ALGORITHM ...------ +--+ ----00> THE EUCLIDEAN ALGORITHM LINEAR DIOPHANTINE EQUATIONS INTEGERS IN DIFFERENT BASES PRIME NUMBERS EXERCISE SET 1 PROBLEM SET 1 CONGRUENCE ..----- TESTS FOR DIVISIBILITY - - EQUIVALENCE RELATIONS - INTEGERS MODULO m LINEAR CONGRUENCES THE CHINESE REMAINDER TE EXERCISE SET 2 PROBLEM SET 2 3. Induction and the Binomial Theorem | MATHEMATICALINDUCTION .... 3. 3.2 RECURSION ...... +++ 005. y 3.3 THEBINOMIAL THEOREM .... : EXERCISE SET 3 7 PROBLEM SET 3 4 4 4 Rational and Real Numbers 4.1 RATIONALNUMBERS ................., 8 4.2 REALNUMBERS .............. “ % 4.3 RATIONAL EXPONENTS : i 4.4 DECIMAL EXPANSIONS . . : in EXERCISE SET 4 “109 PROBLEM SET 4 in Functions and Bijections 113 5.1 FUNCTIONS 0.00.0... 0000 e tee eee neice, 113 52 lis 5.3 COMPOSITION OF FUNCTIONS . 18 5.4 INVERSE FUNCTIONS . 120 5.5 BIJECTIONS AND THE INVERSION THEOREM 1 12 5.6 CARDINALITY ... 0.0.0.0. 00000 cee eee 125 5.7 INVERSE TRIGONOMETRIC FUNCTIONS. ........-- . 19 5.8 EXPONENTIAL AND LOG FUNCTIONS 5.9 PERMUTATIONS EXERCISE SET 5 PROBLEM SET 5 An Introduction to Crypto; 147 6.1 CRYPTOGRAPHY Braphy _ 44 6.2 PRIVATE KEY CRYPTOGRAPHY 149 63 PUBLIC KEY CRYPTOGRAPHY 130 64 THE RSA SCHEME ‘isl EXERCISESET6 |||‘ '*' 6! PROBLEM SET 6 | ue 6 “ comples a wrIc EQUATIONS ...... Qua NUMBERS .......... 2 s OF COMPLEX NUMB 1 AND DIAGRAM . m1 ‘TATION 15 pEMol R EM 16 S OF COMPLEX NUMBERS... . a 37 ROOTS 7 ROE FUNDAMENTAL THEOREM OF ALGEBRA 78 TRERCISE SET7 pROBLEM SET7 polynomial Equations g1 POLYNO (OMIALS AND FACTORING ....... 201 8.2 EQUATIONS OVERAFINITEFIELD ................ 201 33 RATIONAL ROOTS OF A POLYNOMIAL . . - $3 COMPLEX ROOTS OF A POLYNOMIAL . . 85 PROXIMATING REALROOTS ........ i ane fe POLYNOMIAL INEQUALITIES coterrrnsss 2 7 MULTIPLEROOTS ....... eee $8 PARTIALFRACTIONS .........--- EXERCISESET8 ..------ ee ee PROBLEM SET8 ..---- 00 - eee eee a 241 Append ix TRIGONOMETRY INEQUALITIES Answers 247 Glossary of Symbols 2s 261 Index Introduction The most basic problem in mathematics is the solution of s of equ; calving various types, su . ations, solving various tyPes, such as algebraic equations differential ec Mempts at equations. lead to different branches of mathematics, ations and integral The endeavour to solve the general algeby heart of the branch of mathematics called Cl; compasses most of the algebra discovered bef that a precise solution to the general Polynomial equation was im jossible. and work lead to the development of what is known as Modern Alvebrae fe. and this A polynomial equation in the variable 2 is an equation of the form Talc or polynomial equation lies at the assical Algebra. Classical Algebra en- ore 1800. Around that time it was proved n 7 Qn” + One" +--+ aye tay =0. The numbers ay, @n—1,.-.,@1, ao are called the coefficients of the equation, Mathematicians originally searched for an algorithm that would lead to all the numbers that would satisfy such an equation. It soon became clear that some of the number systems, such as the rational numbers, were not broad enough to always give a solution, and various number systems were developed to solve wider classes of poly- nomial equations. . In this book we initially consider equations with integer coefficients and integer solutions; these are called Diophantine equations. We then extend the integers to include the rational and real numbers. Our development of the number systems fal culminates in the complex number system. The Fundamental Teo OS states that every Polynomial equation with complex coefficients has i on However complex numbers, though it gives no algorithm tor finding such a rious number we demonstrate many methods for solving particular equations 1" 0 " > ppreximated systems. Those solutions that cannot be Found precisely ean always Pe 8 to any desired degree of accuracy. Although most of the material in this book, known since 1800, it is presented in a contemporary Nun two centuries of Modern Algebra. phy, has been hindsight of xcept the eryplost aner using the Chapter 0 Logic and Proofs atics Make Mae el i es precise use of language in st se the English langua a ating 3 . i English w . ie AO express our ideas and ary and proving its common words a more precise meaning so Bonen. tat Sto make them unambi hi 1 Good math a writing consists of complete sente: x ;nbols stand for words. Forexample,‘A = B. ness, allowing for the fi 4). the verb is ‘equals’ and the object is ‘B’. , In mathematics, wi Se a eenie ‘ ° tend to use more complicated and compound expressions ih one y ane guage, so this chapter explains some methous for d ve wth for de: pressions. We also introduce the more common types of math soning we use in proofs. “me a sentence in which the a subtest 0.1 PROPOSITIONAL LOGIC Logic is the study of correct reasoning. The rules of logic mathematical statements, and allow us to make correct argum ments. ive precise mewn: nents about these st a statement, oc propesition: > semtence 0.1. 1 Definition. In mathematics. which is either TRUE or FALSE. Fer example, | phe year 2000 is a leap year. 2 3+ 2 = 6. eo we <0. frunlred consecuiNe Vs. The decimal expansion of 7 contains One ! aan ‘ LSE, though you ntences which are ith of the last state are statements, since they are most probably do not know the trath value er TRUE Or FA pent. oo CIC ANT PROG, § However the following sentences are not statements eters 1a © Find the nearest integer to va Is it Friday today? Question it ea statement. it would be a statement ; : Propositional le is that part of logic that deals with combining statement, ; connectives such as AND, OR, NOT, or implies. We use these connect sing 4 I i Kicaci day English. but in mathematics and computer science we tend to use complex combinations. We (and the computers) need to know Precise} combinations mean. For example, the Principle of Mathematical Induction says If P(1) is true and P(k + 1) is true whenever P(K) is true, then P(n) is ositive integers n. , " We can always combine any two statements using AND to form For example never statements. we changed the last sentence 10" ILis Fri¢ AY toe Nay them in More ly what these thar true for sp a third Statemeny Ottawa is the capital of Canada and New York is the capital of the United States If P denotes the statement ‘Ottawa is the capital of Canada.’ and Q denotes the state. ment ‘New York is the capital of the United States.’ then the above statement wil] be denoted by P AND Q. 0.1.2 Definition. P AND @ is called the conjunction of P and Q. The state- ment P AND Q will be TRUE if P is TRUE and Q is TRUE, but will be FALSE otherwise. P OR Q is called the disjunction of P and Q. The statement P OR Q will be TRUE if either P is TRUE or Q is TRUE, or both are TRUE. We can define these relationships in the following truth tables, in which T stands for TRUE and F stands for FALSE, PI QTPANDOQ P[Q|_PORQ T|T T Tr T T|F F Tle T Fl T F pt T FLF F | Ele F uw In everyday En, lish, the word ‘or’ can be u the meaning of ‘or’ . _ sider. : sed in two different ways. Conside in the following two Sentences, * The isite is i Prerequisite for this Course is algebra or trigonometry, © You will be Served tea or coffee, proposttlc INAL LOGIC Iways uses the ‘inclusive OR! whi HP ORS, ich means that A f ) is tr matics 3 his i poth >and G) are ue This is the use of ‘or’ in the first sentence: y, wee the + YOU Can still take the e if you have both algebra and trigonometry. However in th exclusive Wi Ne secre an exclusive way; you should not expeet tea and cof nd sentence Mathe' cours : sor is used in yy staten pen its negation is praties, we are al biconditional statements suchas Sry = ¢ " Vif and only if.¢ = Oory = 6. ent has a negation, For example, if 7 is the statement statement ‘3 4 2 = 6 Evel ‘AL is not true thats 4 2 > 6 at! 5.” or more simply “3 y Rb2 46 ys using. Conditional statemer ‘al statements such as “If a > Dihen in mathe! r s4lor 0.13 Definition. {the statement /? is denoted by NOT P. the conditional statement ‘If P then Q is denoted ternative The negation 0} If P and Q are two statements, by P => Q and is defined by the truth table above. The following are a ways of ex, pressing this conditional statement. . P=Q. « If PthenQ. ° IfP,Q. © QifP. Ponly if Q. « Pissufficient for Q. © Qisnecessary for P. noted by P <=> Q. The that it is often abbrev iated s and We Say The biconditional statement “Pp if and only if Q’ is det _xpression “if and only if” is used so often in mathemati as “iff”. If P = Qis TRUE, then ? and Q have the same truth value: that P and Q are equivalent statements, “The conditional is an extension of everyday consequences because P —r @ is ulways true, ven 2+ 2 = 3. isa tue statement snglish usage, but it urs some unusual Wo >7 if P is false, For example, 0.1.4 Example. Show that the statement P= 2 has the same truth tuble as the statement (P =* Q) AND (Q = P). ‘This example shows that “? if and only if Q" has the same meaning ‘df P then Q) and (if Q then P)- as the state- ment 6 Solution, PIOIPS oa na T i | koh? aa perth 1 eT | The last two columns are the same, 50 the two statements have the PIP Pye CHAPTER 0, Logi HC AND pe Ons Q ANDO =p; r 1 72 F I r F r t same truth h table The symbol ["] denotes the end of a proof or solution 0.1.5 Example. Solution. Show that the statement NOT (Pp table as the statement (NOT ?) OR (NOT Q) AND @) has the Same truth Show that the statement P =Q PANDQ [NOT ND @) | Lele 7 Rina TIF F H F/T F T FIF FE i | zoen| Q || NOTP | NOTQ || WOTP)OR (OTQ) ] Tae. FE F Fi F T T eee er F it alas. T. T ig | is equivalent to the state- Q |_NOTP | QoRNoTP T T F T F F F F I ae 7 Ty F T T T = Qand QORNOT P have the Same truth tables, they are ive Notations for Connecti Prop i Tee positional Logie suthoate Cand Javassyntax ua 0.2 SETS Mathematics not only deals with individual objec i ERAN ction ncolectenalsdag clair ae ee the solutions to an equation. In mathematis, such a collection i cal ee A ser is any well-defined collection of objects, the objects are eae the el of the set. If x is an element of the set S, we say « belongs to S and write a Ze. Ify is notan element of S, we write y ¢ S. The set of real ni i ! , : umbers is denoted by the blackboard bold symbol R, so ‘\/3 € I’ is a true statement. ‘ There are two basic ways of describing a set. One method is to list all its elements. For example, a set $ whose elements are 2, 4, 6 and 8 can be written as S = {2,4,6,8}. We might write the set of letters of the alphabet as {A,B,C,..., X,Y, Z}, where the three dots indicate that all the letters between C and X are also to be included. By abusing this notation, we write the set of positive integers (or natural numbers) as P= {1,2,3,4,-..} and also the set of all integers as Date positive integers, Zero and the negative integers. .d of describing a set is by means ofarule, For example, =1,0,1,2,3)...). The set Z consists of the ‘The other basic metho g = {2|aeRAND1<2<2} ‘areal number and zx is greater lying between 1 is read as “5 is the set of all elements « ich that a is. than 1 and less than 2”, in other words, is the set of real numbers | and 2. » 3 CHAPTER 0. LOGic. The set with no elements is called the empty set or null set anc If and 7’ are sets such that every clement of is also an clement say that Sis contained in T, or that $ is a subset of D and write § € example, {2, 7,5} P but {=1, 5,8} is not a subset of PP, because if Sis any set then SC Sand also C S. ‘The two sets S and Tare equal if S CT and 7’ ¢ S. q ‘The intersection of two sets Sand Tis the set, 517, of all element both S$ and 7; hence sar = {a|xeSANDzeT}, If SAT =, then S and 7 are said to be disjoint. The union of the sets the set, SUT, of all elements that are in either $ or T (or both S and 7), SUT = {x|zeSORzeT}. The Cartesian product of two sets S and T is the set, S x T, of allo (x,y) where x € Sandy € T; hence SxT = {(@,y)|zeSANDy eT}. 0.3 QUANTIFIERS In mathematics we are always using sentences involving variables, such as However, until the value of « is specified, this sentence has no truth. value. (zz) denote the sentence ‘r? > 0. then P(—3) is a true statement and P(0)is Statement. If P(z) is a sentence depending on the variable z, we often want to say tt is true for all values of «, or that it is true for at least one value of x. This by adding quantifiers that convert the sentence P(c) into a statement. 0.3.1 Definition. The universal quantification of P(a) is the state © P(z) is true for all values of a. and is denoted by Va P(a) whe ii ere the symbol Vis called the universal quantifier. Yat) 0.3, QUANTIFIERS This statement Vir7?(:r) can also be expressed in any of the followi © Forall x, P(2). & 7 ae © Forevery x, P(r). Na. Ma © Foreach x, P(r). The values of w are asstimed to fie j i is in a particul cove, Pot example the WHE OF Uleotd ny beh im ia i pers, or the set of all people. Be Oe Oe Eu te Pe With the real numbers, the statement "Vi, > 0. means that ‘For all real numbers 2, 27 > 0! ich ii ft i pn we Which is a false statement. However the statement 0.3.2 Definition. — The existential quantification of P(z) is the statement « There exists an x for which P(x) is true. and is denoted by Br P(e) at where the symbol 3 is called the existential quantifier Again this is interpreted to mean that “There exists an xin the universe of discourse for which P(z) is true.’ This statement 2r-P(z) could also be expressed in any ofthe following ways. There is an x for which P(a). « Forsome x, P(t). For example, if the universe of discourse is the set of real numbers then the fac- (x-1)(? +241) is tue forall x. So Ye —1 = (e-1)@? +241) 6 = O is tue for only certain torization 25 —1 = js a true statement. However the equation ato namely 2 =2 and = —3. So ar a +r-6 = 0 yalues of x, is a true statement. 0.3.3 Example, — Express the statement ‘Every real number has & real square root as a logical expression using quantifiers: se of discourse is the set of real numbers, We Solution, If we assume that the univer can express this statement as Yade «= a oO [tdoes not have to be trues in fact itis not. Note that this is just a statement, i 0 CHAPTER 0. Logic yy, YD PRo 0.3.4 Example. If A and B are sets, then AC B means 1 im that 4 | alee 0.4. ME} B, and this can be defined using a quantifier as 4 Stbse of 0.37 E Ve (v€ A= > me B), followin; If S is.aset and () denotes the emply set, show that $ C Sand @.e g, Solution, The statement $ C $'is equivalent to Va(e € 5 = ¢ €S).if : the statement x € S, then P(x) => P(r) is true for all @. Hence ¢ CSistn Solution. The statement ) C S is equivalent to ed ze S). Now a for all x. However P => Q is always true if P is false, so that the Statement is true. j is true. 7 0.3.5 Example. In Definition 1.1.1 the divisibility relation |b is defined as dq b= qa where the universe of discourse is the set of integers. Determine whether (i) 0/3 and (ii) 0/0. This Iasi Solution. (i). 0|3is equivalent to 3q 3 = gO; thatis, Iq 3 = 0. Since3 = Ois always false, 0/3 is not true. 04 (ii), 0|0 is equivatent to ay 0 = 90; thats, 3y 0 = 0. Since 0 = Ois alwayst ate can choose q as any integer, and so 00 is true, : ree How do we negate quantifiers? For example, the statement ‘All Cana aliuse French, is not true. However we do not have to show that ‘All Canadians do not eobt French. to show that the statement is false, We only have to show that ‘Thé eaten 4 Canadian who does not speak French, Similarly, the statement ‘There exis! result Solution|to the equation 2? = —1, jg false, "To shawithiga we HaveltOnnemtn os all real 2, 2? # —1, We have the following rules for negating quantifiers. mae 0.3.6 Quantifier Negation Rules, ne NOT (V2 P(e) isequivalentio (a NOT-P(e)) a NOT (3z P(a)) is equivalentto (Va NOT P(x) There i i ‘ logical Not everyone has a calculator” has ' “ae © a calculator.” As an example of the These 1 aero Ime meaning as “Everyone does not ht science Tn general, if th baat ae a ae oe awe involving quantifiers will be equivalent if h Mai ac eon ret always, use truth tables to check for equival Q. The check the equivatener ye" 80 a this stage we have to reason inf r implication, 0.4. METHODS OF PROOF MW 0.3.7 Example. Ifthe universe of discourse is the real numbers, what does th statement mean in English? How would you prove it ue or false? ary (r>y). Solution. The statement says that there is a real number x that is greater than or equal to, all real numbers. That is, statement says that there is a largest real number, This is false. To show that itis false, we have to prove that . NOT(GrVy (x>y)) is tre, This is equivalent to the following statements. Va NOT (Wy (> y)). Vey NOT (x>y). Vrsy (@ Q(z). A Theorem will be a major landmark in the mathematical theory, a Proposition a lesser result, while a Lemma will usually be 2 result that is needed to prove a Theorem or Proposition, but is not very interesting on: its own. A Corollary is a result that follows almost immediately froma Theorem. An, Example is not usually a general result, but often a particular case of a Theorem or Proposition. An Algorithm is an explicit procedure for solving a problem ina finite number of steps. There are many methods for proving Theorems, Propositions, and Lemmas, but there is no procedure that will apply to all proofs. It is extremely difficult to get a computer to write a good proof. Proof writing is an art that requires much practice. js, and leaving out ‘There is a delicate balance between writing down too many detal logical steps that cannot easily be filled by the reader, However there are some stan dard strategies for attacking proofs, and we now introduce the most important ‘of these. These methods of proof are not only important in mathematics, but also sa science where, for example, they are used in software specification for verifying p! grams. Many mathematical theorems can be express Q. The statement P is called the assumption or bolically in the form P = sea yrem and the ypothesis of the theo r CHAPTER 0, LOGIC AND pp statement Q is the conclusion. The assumption will consist of one Or More. Statemen 0.4. METI normally involving some variables. The theorem says that if the SSumption jg os then the conclusion is true. ¢, 0.4.1 Direct Method of Proving P => Q. The direct method of proving P => Q is to assume that the ; hypothesis P is try i and use this to proye that the conclusion @ is true, Proposition. Ifa > bande < 0 then ac < be, Proof. Ifa > b then a~b > 0, The positive number a — b times the ie negative number c is negative so For ex: is the state (a—b)e < 0. same thing Hence ac— be < 0 and ac < be. Oo ae This r use this to 0.4.2 Proving P<— Q, Exe This type of result can usually be recognized by the phrase ‘if and only if? or the Pro phrase ‘necessary and sufficient.’ The result “P if and only if Q” can be split up into ca the two cases, the ‘only if? part P > Q, and the “if” part @ => P, and then ea case can be proved separately, The PROPOSITION. Letzbea real number, Then x? + ¢ Qand » " aa ands Oland acer eee is Nona Case (ii), I < 0 and » Teen and +1 > 0 the < Oand@ > 1, Hence PRO We eunrare a0 Se es <2 Otte m fact r of a positive number asin oy > 0. Since © < O and the product ; 2041) <0. Than at pei number is negative, it follows that 4 . ) whe 0.4. METHODS OF PROOF my 0.4.3 Contrapositive Law, P <> Qs equivalentto NOT Q = Nor iE Proof. g P; > @ || NOTQ | Nor? | NOT Q =$ NOT P 5 y + F I F T v 1 " F T im T T We sce from the truth table that P => Q is equivalent to NOT Q = NOT P. fe} For example, the contrapositiv is the statement ‘If I same thing. of the statement ‘If it rained then 1 would be wet. am not wet then it has not rained,’ These statements mean the 0.4.4 Contrapositive Method of Proving P = Q. This method uses the Contrapositive Law above, We assume that @ is false and use this to prove that P is false. PROPOSITION. Let n be an integer, If n® is odd then n is odd. Proof. Suppose that n is not odd; that is, suppose n is even. Then n3 will also be even; that is n° is not odd. Hence we have shown NOT (nis odd) => NOT (n° is odd). The contrapositive is n® is odd => nis odd which is what we had to prove. oO 0.4.5 Proof by Contradiction. In the proof technique called proof by contradiction we assume that the statement We want to prove is false, and then show that this implies a contradiction. For example, suppose we wanted to prove the statement Q. qt we can show that NOT Q leads to a contradiction, then NOT Q must be false; that is, Q must be true, PROPOSITION, There is no real solution to a = Gx + 10=0. Proof, This result can be stated symbolically as NOT (a2 «? —6x+10=0) where the universe of discourse is the set of real numbers. 14 CHAPTER 0. LOGIC AND moe ‘Assume thatthe rest is false} that is, Assume that there iy a number .# with «2 = Gx + 10 = 0. Then, by completing the Square, we 0.5. COU can write this as é Sa (@-374 1 = 01 xaot However (1 — 8)? > 0, $0 the left side of this equation fs greater than 047 1 grequal 1 1. This ives a contradiction. Hence the original statement, The true, oO each cai e we wanted to prove the Q Altematively, suppose we wan I VO P and NOT Q, and show that this leads to a co c AND Not, 05 Hence NOT(P AND NOT Q) is true. T i i P. Example 0.1.6, this is equivalent to P => @ being true, YOR GQ, proposition. If. isa real number such that «* +72? < 9 then show that < 1.1. Proof, Suppose that is a real number such that x9 + 72? < 9, but s r < 1.1 is not true; thatis @ > 1.1, It follow that as 4722 > 11%+7(1.1)? = 13314847 = 9801. a is: However this gives a contradiction to the assumption that 28 + 72? <9, E, Hence the original result is true. o Pl ‘This example could also be proved by using the contrapositive law. Other good examples of proof by contradiction are Proposition 1.5.2, Euclid’s Theorem 1.5.3, and Theorem 4.2.1. 0.4.6 Proving P => (Q OR R). The statement Q is either true or false. If Q is true then P —> (Q OR R) is true, regardless of the truth values of P and R. We therefore only have to prove the result when Q is false. The method of proof therefore consists of assuming that P is true: and NOT Q is true, and using these to prove that Fis true. The theorem is equivalent: to the statement (P AND NOT Q) = R. PROPOSITION. Let m and n be integers. If m® + n® is odd then m is odd or n is odd, Proof. Suppose that m® + n* is odd, and that mis not odd. Therefore mis even and so m* will also be even. Hence m3 +n3 — m3 =n} will be odd: By the result in subsection 0.4.4 it follows that n is odd, and we have shown a (m? +n is odd) AND NOT ( This is equivalent to the stat (m® + n¥ is odd) —s ( mis odd) => (n is odd). tement that was to be K proved, namel: mis odd ) OR (nis odd), ‘ 0.5. COUNTEREXAMPLES Another good example of this type of proof is in Theorem 1.5.4 em 1.5.4, P => (Q AND R). ican be split Up into the two ases, P fl D be proved separately, = Q,and P = R, and then 0.5 COUNTEREXAMPLES Sometimes a conjectured result in mathematics i , be able to prove it. However, we could Feito uianrova Faroe we would not negation is true. If the conjectured result is of the form ¥ Ple\ uae ia habits E_NOT (Wz F(q))) whichJby ite Olen exiyeBatrenlresiee Oe) eeanavateatta o NOT F(a): Hence'to disprovelthe slatement Ve E()iwelenly have rh ae F such that P(zo) is false, This 29 is caled a counterexample the conjecte RoEeN conjecture If the conjectured result is of the form Vz P(x) =} Q(z) then its negat soa or (ie) => OCs) ick area mas aa ment 3r (P(2) AND NOT Q(c)). Hence arp is a counterexample to the conjecture if (zo) is true while Q(t) is false. EXAMPLE. Let a be a real number. Disprove the statement: if? > 9 then > 3. Solution. One counterexample to the statement is obtained by taking 9 = —4, since 23 = 16 > 9and zp < 3. This counterexample disproves the statement. Note that if we wanted to disprove an. existence statement such as Sx P(x) then its negation is NOT (Az P(a)), which is equivalent to Vx NOT P(z). In this case we cannot use a counterexample, because we have to show that P(x) is false for all values of x. [ 16 CHAPTER 0. LOGIC AND PRooy Exercise Set 0 166. Determine which af the following sentences are statements. What are the truth values of those that are statements? LT>5. 3. 185 > 7? 5, Show that V/2 is not an integer: 7 4, J/2is an integer. 6. If 5 is even then 6 bles for each expression. 7. NOT(NOT P) 8. NOT(P OR Q) P= (QORR) 10. (P AND Q) => R . (POR NOT Q) => fe 12, NOT P => (Q => Ry 7-12. Write down the truth ta} Fre 13, P UNLESS Qs defined as (NOT Q) =+ P. Show that this statement has same truth table as P OR Q. Give an example in common English showing equivalence of P UNLESS Q and P OR Q. 14. Write down the truth table for the exclusive or connective XOR. | 15, Write down the truth table for the not or connective NOR. 16, Write down the truth table for the nor and connective NAND- 17-21. Write each statement using P, Q, and connectives. 17. P whenever Q. 18. P is necessary for Q. 19. Pis sufficient for Q. 20. P only if Q. 21. P is necessary and sufficient for Q. 22, Show that the statements P AND (Q AND R) and (P AND Q) AND R have the same truth tables, Th the associative law for AND. 23, Show that the statements ? AND (Q OR R) and (P AND Q) OR (P AND R) have the same truth tables, This is a distributive lav. 44, Is (P AND Q) => R equivalent to P => (Q => R)? Give reasons. 25 - 28, Let P be the statement ‘Wt is ing! ab s is snowing,’ and let Q be the statement ‘It is freezing, Write each statement using P, Q, and connectives. 25, If'itis snowing, then it is freezing, 26, Itis freezing when it is snowing, 27. Itis freezing but not snowing, 28. When it is not freezing it is not Snowing. EXERCISE SETO v7 29-32. Let P be the statement ean wat tk G Jog.’ and R be the statement V take the tree” ivan anneal hae broken my SS CGD sRatiomene at am English 29, Q =+ NOT P 8, a. R= (QORNOTP) 2 Res (an 1 wee Py 33-36, Express each statement as ato 33 gical expr universe of discourse. Tension Maing couaniiers. State the 33. There isa smallest positive integer. 34, There is no smallest positive real number. 35. There exists an integer that is larger th: legers, ran the product of 36, Every pair of integers has a common divisor. a "ae. 37-40. Negate and simplify each expression. 37. Vz (P(z) OR Q(z) 38. ¥z ((P(z) AND Q(z)) = Riz) 39. Sr (P(z) => Q(z) 40. x Yy (P(z) AND Qiy) 41 - 44. If the universe of discourse is the real numbers, what does eacle statement mean in English? Are they true or false? 42, 3r3y (z>y). 41. Vrvy (r>¥)- 44. Vr3y (2>y)- 43. 3y¥r (c>y)- 45-48. Determine whether each pair of statements is equivalent Give reasons (Ar P(z)) OR Gz Qe) 45, 3r (P(z) OR Q(z) 46. 32 (P(z) AND Q(2)) (@r P(z)) AND Ge Qiz)) 47. Vz (P(z) OR Q()) (Ve P(z)) OR (¥z Q=)) 48. ‘Vz (P(z) OR QUy)) (Vr P(z)) OR QW) 49, If A, B and C are sets, the statement A) B.C © can be expressed as, Va ((c € AAND& €B) =r). Express and simplify the negation of this expressions namely ANB E Cin terms of quantifiers. 50, If A and B are sels, the statement A = B canbe expressed as Vic (we Ace vB). f expressing this ) Give different ways 0) sets are not the same? What does A # B mea af fiers, How would you go about showing that two using quanti- po we a 34. uw a 56-60. Write the contrapositive of each statement. The definition of the limit of a function, Tim, f(7) . Show that the statement P => (Q AND R) is equivalent to the st | Show that the statement P AND Q AND RF is equivalent to the si . If Ido my assignments then I will get a good mark in the course. . If > 3 then 2? > 9. . If < —3 then 2? > 9. ). Ifa number is divisible by 2 then it is not prime. ). If > Nandy > 0 then xy > 0. . Leta and) be real numbers, Prove that if ab = 0 then a = 0 orb = 0. , Let A and B be sets, Prove that if « ¢ AM B thenax ¢ A ora ¢ B. CHAPTER 0. LOGIC AND PROOFS LL, can be expressed Usiny quantifiers Yes 0 A> 0 Ve (0<|n=al <6 => If) 1 <6), Use quantifiers to express the negation of this statement, namely Jim Sa) #L. Show that the sta a P =>» (QOR R) is equivalent to the statem (P AND NOT Q) = [This explains the proof aoe 0.4.6 for P =» (Q OR R).) (P = Q) AND (P = 1), [This explains the Sestnalloao 4.7 for P => (Q AND R). Is the statement P => (Q => R) equivalent to SS 0)—an Give reasons. (NOT P AND NOT Q) => R). Chapter 1 Integers and Diophantine Equations Throughout this chapter, all the numbers that are used will be integers. The basic tool in this chapter is the Division Algorithm, We use it to demonstrate the Euclidean aE gorithm, which in turn enables us to solve linear Diophantine equations. The Division Algorithm is also used to represent numbers to different bases. The Unique Factor ization Theorem, which is also called the Fundamental Theorem of Arithmetic, states that any integer can be factored into primes in a unique way, and the proof of this result depends on the Division Algorithm. 1.1 THE DIVISION ALGORITHM subtracted property that any two elements can be added, ill be an integer. However, division of if the quotient is also to be an integer. The set of integers, Z, has the and multiplied together, and the result will st one integer by another is not always possible, 1.1.1 Definition. If a,b € Z, we say that a divides b, and write this symboli- cally as alb, if there exists q € Z such that b = qa. A Alternative ways to express this are t say that a is a factor of 6 or that b is a multiple of a, If no integer q exists such that b = qa we say that a does not divide b and write a { b. Hence —3/12 because 12 = (—A)( be noted that with this definition 0|0 because 0 = q0, where q can becl integer. However 0 { 4 because there is no integer q such that = 40. ; We now prove some elementary properties of this divisibility relation. 19 7) —Tand 4|0. It should —$), Also 5|10, 7|7, ) 4 | hosen to be any 20 CHAPTER 1. INTEGERS AND DIOPHANTINE EQUAT; 1.1.2 Proposition. Leta,b,ce Z. ( Iajb and ble then ale, Gi) Ifa) and ale then al(ba + ey) for any ,y € Z. In particular al(b +e) a\(b—c). (iii) Tfa|b and bla then a = +b, a (iv) Ifa|b, anda and b are positive integers, then a < b. e of Proof, (i). Wf.a|b and b[c then there exist qr € Z such that 6 = qa and ¢ = 1} ef Hence c = rqa and, because rq € Z, it follows that ale. (ii). If a|b and ale then there exist g,r € Z such that b = ga and c= ra. Ne br + cy = (qx + ry)a and, since qx + ry € Z for any x,y € Z, it follows a|(bx + cy). (iii), If ab and bla then there exist g,r € Z such that b = qa and a = rb. Hen ga and 0 = a(rq —1). Ifa £0 then rq must be 1 andr = q = +1. Therefc a= +b, On the other hand, if a = 0 then b = q0 = 0 anda = b. (iy). Ifalb then there exists q € Z such that b = ga. Ifa and b are positive integer so is q. In particular g > 1 and hence b = qa > a. Even if the integer b cannot be exactly divided by the integer a, we can try to divide b by a and obtain a remainder, This familiar process is known as the Division Algorithm. 1.1.3 Division Algorithm. Ifa, € Z where a > 0, then there exist uniq integers q andr such that b = qa+r where O0 0, the element b — 0a = b € 3” and, if <0, the element b= ba = (=1)(a— 1) > Oand belongs to ne One of the properties of the integers is that every nonempty set of nonnegative numbers contains a smallest clement. Let r be the smallest element of $” and let q be the integer such that b — ga =r. Since all the elements of 9! are nonnegative, 7 > 0. Furthermore r < a, otherwise r — a = (b — qa) —a =b — (q+ 1Ja would ‘be a nonnegative integer smaller than r but in the set 9’, We have therefore shown the existence of integers q andr with b= qa+rand0 0, we can find these by ordinary long division with remainder. If < 0, use long division to divide —b by a to obtain =b = datr’ where 0 0, He und r such that Division Algorithm can be applied to ~a.to obtain unique integers 4 & b = g(-a)+r where 0 0; that nm < 4 will yield all the nonnegative (#,u) = (4,9), (9,7), (14,5), (19,3) or (24, 1). Hence the second item could be paid for in exactly in five di i yin five different wa the customer has at least 24 dimes and 9 quarters, ae What do the negative solutions mean in this case? If we put n = —1, we obtain the solution 2 = —1, y = 11, This corresponds to the situation in which the customer offers 11 quarters and receives one dime in change, 1.3.7 Example. A hallway 5 metres long is to be tiled with strips of tile of widths 8 ems and 18 ems. In how many ways can this be done, without cutting some of the tiles to different widths? Solution. If x strips of tile of width 8 cms and y strips of width 18 ems exactly fill the length of the hallway then 8r+18y = 500. Thatis, dividing by the GCD(8, 18) = 2, 4c 4+9y = 250. By inspection, we see that one solution to the equation 4a + 9y = lisa = —2,y = 1. Hence one solution to our desired equation is x = —500,y = 250. This is clearly not a feasible solution because it is impossible to have a negative number of tiles. However, this particular solution will allow us to obtain the general integral solution. This is « = —500 + 9n, y = 250 — 4n, where n € Z. The only workable solutions occur when zr and y are nonnegative. Hence we need —500+9n > 0 and 250—4n > 0; that is Since n must be integral, it follows that 56 1,2 > qo > gi > +++, and the quotients form a strictly decreasing se ‘of nonnegative integers, which must eventually reach zero. Using this list of eqt we can write 2 = gob+ro (abtr)b+ro = ab? +rib+ro (qb +72) +rib+ro = qb? + rab? + rib ro p= tbl tryb8) oe rab? + rib + ro and this is the required expression. To show that the expression if unique, suppose that 2 = Wert Dro = Sinbl boosh sib $0 where 0 < rj . Check. (1406); =1-7° +4-7? +0-7+6 =343 + 196 +6 = 545. (1000100001) = 2° + 2° + 2° = 512 + 324+ 1=545. o Each digit in a number in the base b can be any one of the symbols 0, 1,....5—1 and therefore numbers in base b require b symbols to represent them. If the base is Jarger than 10, new symbols are required to represent some of the numbers. 1.4.3 Example. Using the symbols A for ten and B for eleven, express (1AAB9) » in the decimal system, and express 1511 in base 12. Solution, (1AAB9);. = 1(12)' +10(12)$ + 10(12)? + 11-12+9 20736 + 17280 + 1440 + 132+ 9 = 39597. To express 1511 in base 12, repeatedly divide by 12 to obtain 1511 = 125-12+11 125 10-12+5 10 0-12+10. Hence 1511 = (A5B),2. 38. CHAPTER 1. INTEGERS AND DIOPHANTINE EQUATIOy, Check. 39597 = 3209-1249 3299 = 274-124 11 - Wd = 22-12410 re 22)= 1+12410) ie 1 = 01241, wr (A5B)12 = 10+ 12? 45-124 11 = 1440 +604 14 = 1511, i 1 of Arithmetical calculations can be performed in base b without reference to bas es ifthe addition and multiplication tables for base b are known. The tables for base: as follows. Remember that only the digits 0, 1, 2.and 3 are used in base 4 arith Base 4 Addition Table Base 4 Multiplication Table + On Oi Oh aa oe (Ms | a (ya 1. Qs] Ga (0). 1), 4] Qs (0), (Ba | (10). (11), (12), (3) | Bs _(2)s a f 1.4.4 Example. — Calculate the sum and product of (2031), and (332), base 4. Ee f Solution. (2031), (2031). Z + (632), x_ (832), as (8023); (0122); Tee (122130), (1221300), (2020212), ce heck (2031), = 2-4? + 3-4 +1 = 141 and (832), = 3-44 3-4-2 = (3023), =3- 4942-443 = 209 = 1414.60, Me g (2020212) = 2-49 42-44 42.4? +442 = 8749 = 141.62, s te 1.5 PRIME NUMBERS be n Or Mf the most ij a o pee ino pan class of numb ss of ofa) mute Me Fs pa be clon k lumbers which ea Beer vcled Prime numbers, ‘They form the basic building blocks of us mM, because any other integer can be written as a product of primes. 15.1 Definition, —Aninteperp > 1. ing 7 The first few primes are 2, 3, 5, 7, 11 while 4 < P 5 88,10 = 2-5 are composite, The inewer | a caer 2 8 = 222 a facior 1 i$ of no in, leger | is neither prim i ereSt in any product ne nor composi 1.5, PRIME NUMBERS: PF 1.5.2 Proposition. — Every integer > 1 can be expressed as a product of primes, Proof, Suppose that the result is false and let NV be the ‘smalle; 1, that cannot be written as a product of primes, V cannot be write N = rs where 1 <1 < 8 < N, By our hypothesis, that cannot be written as a product of primes; hence r and. ci of primes. It follows that V = 7 s can also be written contradiction shows that our hypothesis is false and the t St integer, greater than prime itself, so we can N is the smallest integer “an be written as a product aS a product of primes, This fheorem must be true, Ttis natural to wonder whether there are only a finite number of primes or whether the set of primes is infinite, This question was answered by Euclid in about 300 Bc. and the following proof is essentially the same as his, : 1.5.3 Euclid’s Theorem. — There are an infinite number of primes. Proof. Suppose that there are justa finite number of primes, say ps, ‘ a Pa, P3y---sPn- Consider the integer N=pi-Po-Pa--- Ppt] This is not a prime because itis larger than all the primes p1, po, p3,-.-.Pp. On the other hand, V is not divisible by any of the primes pj, for 1 < i < n:if p,|.V then p,\(N — pi - ++ Dp) and so pi|1, which is impossible. Therefore NV cannot be written as a product of primes, contrary to the previous theorem. Hence our original supposition must be false and the theorem is true. Oo There is no known efficient procedure for finding prime numbers. A tedious pro- cess known as the sieve of Eratosthenes will yield all the primes less than any gi number NV. It consists of writing down all the numbers from 2 to N — 1. Leave 2 alone and cross out every second number (that is, composite numbers that are mul- tiples of 2). The next remaining number, namely 3, will be prime; Keep it and cross Out every third number starting from 3 (that is, composite multiples of 3). The next remaining number, namely 5, will be prime; Keep it and cross out every fifth num- ber after 5. If we proceed in this way we will eventually cross out all the composite numbers and all the primes less than N’ will remain, h ‘The following important result shows that if a prime divides a product then it must divide one of the factors, This is not true for composite numbers; for example 6/15 +4 but6 {15 and6 +4, 15.4 Theorem, — Ifpis.a prime and plab then pla or pb. x wee the only) Proof, Suppose that the prime p divides ab but does not divide a. Sin eae Positive divisors of the prime p are 1 and p, the only positive common: is 1; hence GCD(a,p) = 1, It now follows from Theorem 1.2.8 that p[d. aos either pla or plb, |, INTEGERS AND DIOPHANTINE EQUATIONS CHAPTER i. I. apne Lit numbers i i rimes is to enable us to spl i f the reasons for introducing P! aS fe Saar ‘are as small as possible, We shall now eae aa “ca vrtten asa proiactof primes in essentially only one Way. i may apa ob A vr rbilyHeease you Rae never een a number being factored ino pri j 1. eee ways, (This can be seen by looking at the set ol real i nb j : cs bV5 | a,b € Z) instead of the set of integers Z, In 3, a e factoret 4 p EWE. 1) aswell as 2» 2,and the numbers 2, ¥5-+ Land v5 — 1 cannot 5 =l)a s i he set 9.) er factored, and so are “primes” int 7 -" ae multipli commutative, the prime factors in any factorization can be written in different orders; for example, 45 3° b=3+ 5 . 3. Hone i er : the factorization of integers is unique, This Unique Factorization 1e01 ic E itis often referred to as the Fundamental Theorem of Arithmetic, 1.5.5 Unique Factorization Theorem. Every integer, greater than 1, be expressed as a product of primes and, apart from the order of the factors, this expression is unique, E Proof, The existence ofthe factorization was shown in Proposition 1.5.2. fi Now suppose that an integer « can be factored into primes in two ways as. fe & = piparssPn = 4192°''dm where all the p's and q's are primes. Since px, p1|q1q2 +> - @m- By repeated applica: tion of Theorem 1.5.4, it follows that p; divides at least one of the q’s. If necess rearrange the q's so that p:|g1. Since q is prime and py is a nontrivial factor, it foll that p, = q1. Cancelling p; and q, we have P2P3***Pn = 4243 +*" Gm w By continuing in this way, we see that each p must be paired off with one of the q's P Until there are no factors on either side, Hence n = m and, apart from the order of the factors, the two expressions for are the same, th a eo “hat this theorem does not provide an algorithm for finding the prime factors, i fllowingresal shows that we can determine whether an integersr has any factory | Boe 7 lsby checking whether itis divisible by all the primes le 1.5.6 Theorem, i evi. An integer > 1 is either Prime or contains a prime factor Proof, ; ; fret Sayers that p is is Smallest prime factor of 2, Ifa is composite, we eat ere a and b are positive integers b , smallest prime fase “gers between | and a, Since p is th A> p,b> panda =ab > p? a se 2 p*, Hence p pr lenes, we only have to the

You might also like