* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download The Nature of Mathematics
Foundations of mathematics wikipedia , lookup
List of important publications in mathematics wikipedia , lookup
Turing's proof wikipedia , lookup
Big O notation wikipedia , lookup
Abuse of notation wikipedia , lookup
History of the function concept wikipedia , lookup
List of first-order theories wikipedia , lookup
Brouwer–Hilbert controversy wikipedia , lookup
Brouwer fixed-point theorem wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Collatz conjecture wikipedia , lookup
Laws of Form wikipedia , lookup
Non-standard calculus wikipedia , lookup
Elementary mathematics wikipedia , lookup
Principia Mathematica wikipedia , lookup
Four color theorem wikipedia , lookup
Wiles's proof of Fermat's Last Theorem wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
The Nature of Mathematics Lecture notes by: Khim R Shrestha, Ph. D. Assistant Professor of Mathematics University of Great Falls Great Falls, Montana Contents 1 Sets 1.1 Describing a Set . . . . . . 1.2 Subsets . . . . . . . . . . . 1.3 Set Operations . . . . . . 1.4 Indexed Collection of Sets 1.5 Partition of Sets . . . . . . 1.6 Cartesian Products of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Logic 2.1 Statements . . . . . . . . . . . . . . 2.2 The Negation of a Statement . . . . 2.3 The Disjunction and Conjunction of 2.4 The Implication (Conditional) . . . 2.5 More on Implications . . . . . . . . 2.6 The Biconditional . . . . . . . . . . 2.7 Tautologies and Contradictions . . 2.8 Logical equivalence . . . . . . . . . 2.9 Quantified Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Direct Proof and Proof by Contrapositive 3.1 Trivial and Vacuous Proofs . . . . . . . . . 3.2 Direct Proofs . . . . . . . . . . . . . . . . 3.3 Proof by Contrapositive . . . . . . . . . . 3.4 Proof by Cases . . . . . . . . . . . . . . . 3.5 Proof Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 1 1 1 1 1 . . . . . . . . . 2 2 2 3 3 3 4 4 4 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 7 8 8 9 4 More on Direct Proof and Proof by Contrapositive 4.1 Proofs Involving Divisibility of Integers . . . . . . . . 4.2 Proofs Involving Congruence of Integers . . . . . . . 4.3 Proofs Involving Real Numbers . . . . . . . . . . . . 4.4 Proofs Involving Sets . . . . . . . . . . . . . . . . . . 4.5 Fundamental Properties of Set Operations . . . . . . 4.6 Proofs involving Cartesian Products of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 10 12 12 13 14 15 ii . . . . . . . . . . . . . . . . . . . . . . . . . CONTENTS iii 5 Existence and Proof by Contradiction 5.1 Counterexamples . . . . . . . . . . . . 5.2 Proof by Contradiction . . . . . . . . . 5.3 A Review of Three Proof Techniques . 5.4 Existence Proofs . . . . . . . . . . . . 5.5 Disproving Existence Statements . . . . . . . . 16 16 17 19 19 20 6 Mathematical Induction 6.1 The Principle of Mathematical Induction . . . . . . . . . . . . . . . . 6.2 A More General Principle of Mathematical Induction . . . . . . . . . 6.3 Proof by Minimum Counterexample . . . . . . . . . . . . . . . . . . . 21 21 23 25 7 Prove or Disprove 7.1 Conjectures in Mathematics . . . . . . . . . . . . . . . . . . . . . . . 7.2 Revisiting Quantified Statements . . . . . . . . . . . . . . . . . . . . 7.3 Testing Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 26 27 27 8 Equivalence Relations 8.1 Relations . . . . . . . . . . . . . . 8.2 Properties of Relations . . . . . . 8.3 Equivalence Relations . . . . . . . 8.4 Properties of Equivalence Classes 8.5 Congruence Modulo n . . . . . . 8.6 The Integer Modulo n . . . . . . . . . . . . 29 29 29 30 31 32 34 . . . . . . 35 35 36 37 38 40 41 . . . . . . 9 Functions 9.1 The Definition of Function . . . . . 9.2 The Set of All Functions From A to 9.3 One-to-One and Onto Functions . . 9.4 Bijective Functions . . . . . . . . . 9.5 Composition of Functions . . . . . 9.6 Inverse Functions . . . . . . . . . . . . . . . . . . . . . . . . B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collection of Sets 1.5 Partition of Sets 1.6 Cartesian Products of Sets 1 Chapter 2 Logic 2.1 Statements Statement - a declarative sentence or assertion that is true of false (but not both). 1. Examples of true and false statements. 2. Notations P, Q, R etc. are used to denote statements. 3. Examples of sentences that are not statements. Open sentence -a declarative sentence that contains one or more variables. 1. Example of open sentence (e.g. 2x = 6) 2. Domain of the variable 3. Notation for open sentence - P (x), Q(x), R(x) etc. 2.2 The Negation of a Statement 1. Negation of a statement P is written “not P ” in symbol “∼ P ” 2. ∼ P – It is not the case that P . Table 2.1: Truth tables for two statements P Q T T T F F T F F 2 CHAPTER 2. LOGIC 3 3. Example 2.2 or similar example. 4. Truth table for negation. 2.3 The Disjunction and Conjunction of Statements Disjunction - or 1. Disjunction of P and Q - “P or Q”; in notation “P ∨ Q” 2. Truth table ( P ∨ Q is true if at lest one of P and Q is true, that is, P ∨ Q is false only if P and Q both are false.) 3. Examples each case (include “P : 5 is even”, “Q: 5 is odd”) Conjunction 1. “P and Q”, in notation P ∧ Q 2. Truth table (P ∧ Q is true only when both P and Q are true.) 3. Example of each case 2.4 The Implication (Conditional) This type of statements are very common in math. 1. If P , then Q, in notation “P ⇒ Q” read as P implies Q. P – hypothesis, Q – conclusion. 2. Truth table (P ⇒ Q is false only when P is true and Q is false, true otherwise) 3. Discuss example 2.6 or similar one. 2.5 More on Implications We are often interested in declarative sentences containing variables and whose truth value is only known once we have assigned values to the variables. We might want to know for what values of the variable is the open sentence a true statements. Discuss example 2.9. Example 2.1. Open sentences P (x) : x = −3 and Q(x) : |x| = 3, x ∈ R. 1. Discuss ∼ P (x), P (x) ∨ Q(x), P (x) ∧ Q(x), P (x) ⇒ Q(x). 2. For what values of x is P (x) ⇒ Q(x) true? Example 2.2. For what type of triangles P (T ) : T is equilateral ⇒ Q(T ) : T is isosceles a true statement? CHAPTER 2. LOGIC 2.6 4 The Biconditional 1. P ⇔ Q – (P ⇒ Q) ∧ (Q ⇒ P ) – P if and only if Q – P is necessary and sufficient for Q. 2. P ⇔ Q is true when P and Q have the same truth values. Construct truth table. 3. P (T ) : T is equilateral ⇔ Q(T ) : T is isosceles is false. 4. Example 2.15. 2.7 Tautologies and Contradictions 1. Compound statement – composed of one or more given statements and at least one logical connective (∼, ∨, ∧, ⇒, ⇔). 2. Tautology - a compound statement that is always true, e.g. P ∨ ∼ P . 3. Contradiction - a compound statement that is always false, e.g. P ∧ ∼ P . 4. Discuss that (∼ Q) ∨ (P ⇒ Q) is a tautology. 5. Discuss that (P ∧ Q) ∧ (Q ⇒∼ P ) is a contradiction. 2.8 Logical equivalence P ⇒ Q and ∼ P ∨ Q have same truth values, they are logically equivalent. 2.9 Quantified Statements Introduce statements that contain ∀ and ∃. Discuss their negation. Example 2.3. For all x ∈ R we have x2 ≤ 0 is false. Its negation - there exists an x ∈ R such that x2 > 0 is true. Example 2.4. ∃x ∈ R such that x2 = 3 is true. Its negation - ∀x ∈ R, false. x2 6= 3 is Example 2.5. ∀x, y ∈ R, x2 + y 2 ≥ 0 is true. Its negation - ∃x, y ∈ R such that x2 + y 2 < 0 is false. Example 2.6. ∀a, b ∈ Z if ab is even, then a is even and b is even is false because ∃a, b ∈ Z such that ab is even and a or b is odd. Sep 2015 6, CHAPTER 2. LOGIC Exercises #3, 5, 13, 17, 19, 21, 23, 31c, 40a, 53, 68, 70. 5 Chapter 3 Direct Proof and Proof by Contrapositive Axiom A true mathematical statement whose truth is accepted without proof. Theorem A true mathematical statement whose truth can be verified is often referred to as a theorem. Corollary A mathematical result that can be deduced from some earlier result. Lemma A mathematical result that is useful in establishing the truth of some other result. 3.1 Trivial and Vacuous Proofs Let P (x) and Q(x) be two (quantified) statements where x ∈ S. Consider the statement For every x ∈ S, if P (x) then Q(x). If Q(x) is true for all x ∈ S then this proves that the above statement is true. This is called the trivial proof. And, if P (x) is false for all x ∈ S then this proves that the above statement is true. This is called the vacuous proof. Result 3.1. Let x ∈ R. If x < 0, then x2 + 1 > 0. Result 3.2. Let x ∈ R. If x2 − 2x + 2 ≤ 0, then x3 ≥ 8. Exercises #5, 6 CHAPTER 3. DIRECT PROOF AND PROOF BY CONTRAPOSITIVE 7 Question 1 (# 7). Prove that if x, y, z ∈ R such that x2 + y 2 + z 2 < xy + yz + zx, then x + y + z > 0. Proof. We have (x − y)2 + (y − z)2 + (z − x)2 ≥ 0 2x2 + 2y 2 + 2z 2 − 2xy − 2yz − 2zx ≥ 0 x2 + y 2 + z 2 ≥ xy + yz + zx. The statement is vacuously true. 3.2 Direct Proofs 1. We want to prove the statement of the form - For every x ∈ S, P (x) ⇒ Q(x). Since for every x ∈ S for which P (x) is false, P (x) ⇒ Q(x) is true, we just need to show that P (x) ⇒ Q(x) is true for all x ∈ S for which P (x) is true. In another words, we have to show that - if P (x) is true for some x ∈ S then Q(x) is also true. P (x) Q(x) P (x) ⇒ Q(x) T T T T F F F T T F F T This is what we want. We show this is not the case. 2. Set of even integerts: {2k : k ∈ Z}. 3. Set of odd integers: {2k + 1 : k ∈ Z}. Exercises 1. Prove that if x is an even integer, then 5x − 3 is an odd integer. 2. If n is an odd integer, then 4n3 + 2n − 1 is odd. 3. Let n ∈ Z. Prove that if 1 − n2 > 0, then 3n − 2 is an even integer. 4. Let S = {0, 1, 2} and let n ∈ S. Prove that if (n + 1)2 (n + 2)2 /4 is even, then (n + 2)2 (n + 3)2 /4 is even. CHAPTER 3. DIRECT PROOF AND PROOF BY CONTRAPOSITIVE 3.3 8 Proof by Contrapositive 1. P ⇒ Q and (∼ Q) ⇒ (∼ P ) are logically equivalent. P Q ∼ P ∼ Q P ⇒ Q (∼ Q) ⇒ (∼ P ) T T F F T T T F F T F F F T T F T T T T T T F F Exercises 1. Let x ∈ Z. If 5x − 7 is even, then x is odd. (Result 3.10) 2. Let x ∈ Z. Then (x + 1)2 − 1 is even if and only if x is even. (3.21) 3. Theorem 3.3 (3.12). Let x ∈ Z. Then x2 is even if and only if x is even. 4. Let x ∈ Z. If 7x + 4 is even, then 3x − 11 is odd. (3.19) (Hint. Prove a lemma: If 7x + 4 is even x is even.) 3.4 Proof by Cases Discuss the cases in terms of partition of domain, for instance Z. Exercises 1. Prove that if n ∈ Z, then n3 − n is even. (3.27) 2. Theorem 3.4 (3.16). Let x, y ∈ Z. Then x and y are of the same parity if and only if x + y is even. 3. Theorem 3.5 (3.17). Let a and b be integers. Then ab is even if and only if a is even or b is even. CHAPTER 3. DIRECT PROOF AND PROOF BY CONTRAPOSITIVE 3.5 9 Proof Evaluation Discuss problems 3.19 and 3.20 and exercise 3.39. Theorem 3.6 (Theorem 3.17). Let a and b be integers. Then ab is even if and only if a is even of b is even. Sep 20, 2015 Chapter 4 More on Direct Proof and Proof by Contrapositive 4.1 Proofs Involving Divisibility of Integers For integers m and n with m 6= 0 we say that m divides n, written m|n, if n = mp for some integer p. For example 3|6 because 6 = 3 · 2. If m is an even integer then 2|m. So the above theorem can be restated as 2|ab if and only if 2|a or 2|b. If m|n then we say that n is a multiple of m and m is a divisor of n. If m does not divide n then we write m - n. Exercises 1. (Result 4.1) Let m, n and p be integers with m 6= 0 and n 6= 0. If m|n and n|p, then m|p. Proof. m|n =⇒ n = mx for some x ∈ Z and n|p =⇒ p = ny for some y ∈ Z. Then p = m(xy). Thus m|p. 2. (Result 4.3) Let m, n and p be integers. If m|n and m|p, then m|(nx + py) for any x, y ∈ Z. Proof. m|n and m|p =⇒ n = mr and p = ms for some r, s ∈ Z. Then, nx + py = mrx + msy = m(rx + sy). 3. (4.9a) Let x ∈ Z. If 2|(x2 − 5) , then 4|(x2 − 5). 10 CHAPTER 4. MORE ON DIRECT PROOF AND PROOF BY CONTRAPOSITIVE11 Proof. Assume that 2|(x2 − 5). ⇒ x2 − 5 is even ⇒ x2 is odd ⇒ x is odd ⇒ x = 2k + 1 for some k ∈ Z. Now, x2 − 5 = 4k 2 + 4k − 4 = 4(k 2 + k − 1) ⇒ 4|(x2 − 5). 4. (4.5) Let a, b, c ∈ Z, where a 6= 0. Prove that if a - bc, then a - b and a - c. Proof. Assume that a|b or a|c. Without loss of generality we may assume that a|b. Then b = ax for some x ∈ Z. So bc = (ax)c = a(cx) ⇒ a|bc. 5. (4.7) Let n ∈ Z. Prove that 3|(2n2 + 1) if and only if 3 - n. Proof. Assume that 3|(2n2 + 1). To prove 3 - n. Assume that 3|n. Then n = 3x, x ∈ Z. Now, 2n2 + 1 = 18x2 + 1. Since 3|18x2 , 3 - (18x2 + 1), that is, 3 - (2n2 + 1). Conversely, suppose that 3 - n. Then we have the following two cases: I. n = 3x + 1, x ∈ Z. Now, 2n2 + 1 = 18x2 + 12x + 3 = 3(6x2 + 4x + 1). Thus 3|(2n2 + 1). II. n = 3x + 2, x ∈ Z. 6. (Result 4.7) Let x, y ∈ Z. Then 4|(x2 − y 2 ) if and only if x and y are of the same parity. Proof. Assume that x and y are of the same parity. Case I. x = 2k, y = 2l for some k, l ∈ Z. Case II. x = 2k + 1, y = 2l + 1 for some k, l ∈ Z. Conversely suppose that 4|(x2 − y 2 ). Case I. x even, y odd. Case II. x odd, y even. (Similar to Case I) 7. (Result 4.8) For every integer n ≥ 7, there esist positive integers a and b such that n = 2a + 3b. CHAPTER 4. MORE ON DIRECT PROOF AND PROOF BY CONTRAPOSITIVE12 4.2 Proofs Involving Congruence of Integers Let a, b, n ∈ Z where n ≥ 2. We say that a is congruent to b modulo n, written a ≡ b (mod n). 4.3 Proofs Involving Real Numbers Let a ∈ R. If n is a positive even integer, then an ≥ 0. If a < 0 and n is a positive odd integer then an < 0. If a ≥ b and c ≥ 0, then ac ≥ bc. If a > b and c > 0, then ac > bc and a/c > b/c. If a > b and c < 0, then ac < bc and a/c < b/c. Exercises 1. (Theorem 4.13) Let x, y ∈ R. If xy = 0, then x = 0 or y = 0. Proof. Assume that xy = 0. Two cases Case I x = 0. Then there is nothing to prove. Case II x 6= 0. Then x1 (xy) = 1 x · 0 ⇒ y = 0. 2. (4.25) Let x, y ∈ R. Prove that if x2 − 4x = y 2 − 4y and x 6= y, then x + y = 4. Proof. x2 − 4x − y 2 + 4y = 0 (x − y)(x + y − 4) = 0 Since x 6= y, x + y = 4. 3. (4.27) Let x ∈ R. Prove that if 3x4 + 1 ≤ x7 + x3 , then x > 0. Proof. Prove by contrapositive. Case I. x = 0. Case II. x < 0. CHAPTER 4. MORE ON DIRECT PROOF AND PROOF BY CONTRAPOSITIVE13 4. (4.29) Prove that if r is a real number such that |r − 1| < 1, then 4 r(4−r) ≥ 1. Proof. |r − 1| < 1 ⇒ 0 < r < 2. Now start with (r − 2)2 > 0. 5. (Theorem 4.17) The Triangle Inequality. For every two real numbers x and y, |x + y| ≤ |x| + |y|. (Reading Assignment) Proof. Case I. x = 0 or y = 0. Case II. x > 0 and y > 0. Case III. x < 0 and y < 0 Case IV. x > 0 and y < 0 (x < 0 and y > 0). Then we have following two subcases Subcase I. x + y > 0 Subcase II. x + y < 0 4.4 Proofs Involving Sets Define union, intersection, difference and complement. Exercises 1. (Result 4.19) For every two sets A and B, A − B = A ∩ B. Proof. We show A − B ⊆ A ∩ B and A − B ⊇ A ∩ B. 2. (Result 4.21) Let A and B be sets. Then A ∪ B = A if and only if B ⊆ A. Proof. Suppose that A ∪ B = A. Take x ∈ B ⇒ x ∈ A ∪ B = A ⇒ B ⊆ A. Conversely, suppose that A ∪ B 6= A ⇒ A ⊂ A ∪ B ⇒ ∃x ∈ A ∪ B and x∈ / A ⇒ x ∈ B and x ∈ / A ⇒ B * A. (For different proof see book) 3. (4.43 a.) Let A, B, C be sets. Prove that if A ∩ B = A ∩ C and A ∪ B = A ∪ C, then B = C. Proof. Suppose that B 6= C. Then we have one or both of the following two cases CHAPTER 4. MORE ON DIRECT PROOF AND PROOF BY CONTRAPOSITIVE14 Case I. There is b ∈ B and b ∈ / C. Case II. There is c ∈ C and c ∈ / B. Without loss of generality we may assume Case I. Then consider two cases b ∈ A and b ∈ / A. 4. (4.49) Prove for every two sets A and B that A = (A − B) ∪ (A ∩ B). Proof. Take x ∈ A. Case I, x ∈ B. Case II, x ∈ / B. Show A ⊆ (A−B)∪(A∩B). Take x ∈ (A − B) ∪ (A ∩ B). Case I, x ∈ B. Case II, x ∈ / B. Show (A − B) ∪ (A ∩ B) ⊆ A. 4.5 Fundamental Properties of Set Operations Theorem 4.1 (Distributive law). For sets A, B and C, prove that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C). Proof. Let x ∈ A ∩ (B ∪ C). Then x ∈ A and x ∈ B ∪ C. Case I. Let x ∈ B. Then x ∈ A ∩ B =⇒ x ∈ (A ∩ B) ∪ (A ∩ C). Case II. Let x ∈ C. Then x ∈ A ∩ C =⇒ x ∈ (A ∩ B) ∪ (A ∩ C). Thus A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C). Let x ∈ (A ∩ B) ∪ (A ∩ C). Then x ∈ A ∩ B or x ∈ A ∩ C. Case I. x ∈ A ∩ B. Then x ∈ A and x ∈ B. =⇒ x ∈ A and x ∈ B ∪ C. =⇒ x ∈ A ∩ (B ∪ C). Case II. Same as Case I. Theorem 4.2 (De Morgan’s Laws). For sets A and B, 1. A ∪ B = A ∩ B. 2. A ∩ B = A ∪ B. Proof. Let x ∈ A ∩ B. =⇒ x ∈ / A ∩ B =⇒ x ∈ / A or x ∈ / B =⇒ x ∈ A ∪ B. Next, let x ∈ A ∪ B. =⇒ x ∈ A or x ∈ B =⇒ x ∈ / A or x ∈ / B =⇒ x ∈ / A ∩ B =⇒ x ∈ A ∩ B. Example 4.1 (4.55). Prove that (A − B) ∩ (A − C) = A − (B ∪ C). CHAPTER 4. MORE ON DIRECT PROOF AND PROOF BY CONTRAPOSITIVE15 Proof. x ∈ (A − B) ∩ (A − C) =⇒ x ∈ A − B and x ∈ A − C =⇒ x ∈ A and x ∈ / B and x ∈ / C =⇒ x ∈ A and x ∈ / B ∪ C =⇒ x ∈ A − (B ∪ C). Hence (A − B) ∩ (A − C) ⊆ A − (B ∪ C). x ∈ A − (B ∪ C) =⇒ x ∈ A and x ∈ / B ∪ C. x ∈ / B =⇒ x ∈ A − B and x∈ / C =⇒ x ∈ A − C =⇒ x ∈ (A − B) ∩ (A − C). Hence A − (B ∪ C) ⊆ (A − B) ∩ (A − C). 4.6 Proofs involving Cartesian Products of Sets Definition 4.1. A × B = {(a, b) : a ∈ A and b ∈ B}. If A = ∅ or B = ∅, then A × B = ∅. Example 4.2 (Result 4.67). For sets A, B and C, A × (B ∩ C) = (A × B) ∩ (A × C) Proof. (x, y) ∈ A × (B ∩ C) =⇒ x ∈ A and y ∈ B ∩ C. Since y ∈ B ∩ C, y ∈ B and y ∈ C. Then (x, y) ∈ A×B and (x, y) ∈ A×C.Thus (x, y) ∈ (A×B)∩(A×C). Next, let (x, y) ∈ (A × B) ∩ (A × C) =⇒ (x, y) ∈ A × B and (x, y) ∈ A × C =⇒ x ∈ A, y ∈ B and y ∈ C =⇒ x ∈ A and y ∈ B ∩ C =⇒ (x, y) ∈ A × (B ∩ C). Chapter 5 Existence and Proof by Contradiction 5.1 Counterexamples Suppose we want to prove that the statement ∀x ∈ S, P (x) is false. In that case it is equivalent to prove that its negation ∼ (∀x ∈ S, P (x)) ≡ ∃x ∈ S, ∼ P (x) is true. Such an element x is called a conterexample. Example 5.1. Disprove the statement: If x ∈ R, then (x2 − 1)2 > 0. Proof. Take x = 1. Then we get (x2 − 1)2 = 0. Thus x = 1 is a counterexample. Example 5.2. Give a counterexample. For every positive integers a, b, (a + b)3 = a3 + 2a2 b + 2ab + 2ab2 + b3 . Proof. Take a = 1 and b = 2. Read Example 5.2 in book. Example 5.3. Prove or disprove the statement: ∀x ∈ R, (x − 1)2 x−1 = . 2 x −1 x+1 Proof. x = 1 is the counterexample. To prove that ∀x ∈ S, P (x) =⇒ Q(x) is false, we show that ∃x ∈ S such that P (x) is true and Q(x) is false. 16 CHAPTER 5. EXISTENCE AND PROOF BY CONTRADICTION Example 5.4. Prove or disprove: If r ∈ R is a rational number, then number. 17 1 r is a rational Proof. r = 0 is a counterexample. Example 5.5. Disprove the statement. Let x ∈ Z. If x2 + 2x is odd, then x is even. Proof. x = 1 is a counterexample. Example 5.6. Show that the following statement is false: Let a and b be nonzero real numbers. Then for all x, y ∈ R+ , a2 2 b 2 2 x + 2 y > 2xy. b2 a Proof. If the statement is true then we have to have a4 x2 + b4 y 2 > 2xya2 b2 (a2 x − b2 y)2 > 0. But for x = a12 and y = counterexample. 5.2 1 , b2 (a2 x − b2 y)2 = 0. Hence x = 1 a2 and y = 1 b2 is a Proof by Contradiction We want to prove that ∀x ∈ S, P (x). One way of proving this is to assume that it is false and derive a contradiction. A contradiction is a statement that contradicts with a established fact and therefore is always false. Since ∼ (∀x ∈ S, P (x)) =⇒ a contradiction is true if ∼ (∀x ∈ S, P (x)) is false, ∀x ∈ S, P (x) is true in that case. To give a proof by contradiction we start by assuming ∼ (∀x ∈ S, P (x)), that is, ∃x ∈ S such that P (x) is false. Example 5.7. There is no smallest/largest number in the open interval (0, 1). Proof. Assume, to the contrary, that there is a largest number in (0, 1), it is r. Then < 1. there should be no number greater than r in (0, 1). But, for instance, r < 1+r 2 This is a contradiction. Example 5.8. No odd integer can be expressed as the sum of three even integers. Proof. Assume, to the contrary, that there is an odd integer n which can be expressed as the sum of three even integers. Then for some integers a, b, c we have n = 2a + 2b + 2c = 2(a + b + c). This shows that n is even. This is a contradiction. CHAPTER 5. EXISTENCE AND PROOF BY CONTRADICTION 18 Example 5.9. Prove that if a and b are odd integers, then 4 - (a2 + b2 ). Proof. Assume, to the contrary, that for some odd integers a and b, 4 | (a2 + b2 ). Since a = 2m + 1 and b = 2n + 1 for some integers m and n, a2 + b2 = 4(m2 + n2 + m + n) + 2. Since m2 + n2 + m + n is an integer 4 | (a2 + b2 − 2). This is a contradiction. Observe that a direct proof would work in above example. Example 5.10. Prove that the product of an irrational number an a nonzero rational number is irrational. Proof. Assume, to the contrary, that there is an irrational r number and a rational , n 6= 0, m, n ∈ Z . Since s is number s 6= 0 such that rs is rational. Then rs = m n rational s = pq , q 6= 0, p, q ∈ Z. Now, r= m mq = . ns np This shows that r is rational, which is a contradiction. √ Theorem 5.1. 2 is irrational. √ Proof. If possible assume that 2 = m , n 6= 0, m, n ∈ Z. n √ Example 5.11. Prove that 2 + 2 is irrational. Proof. Assume, to the contrary, that it is rational, say r = 2 + √ r− 2=2 √ =⇒ (r − 2)2 = 4 √ =⇒ r2 − 2r 2 + 2 = 4 √ 2 − r2 =⇒ 2 = . 2r √ This shows that 2 is rational, producing a contradiction. Exclude # 32 from homework. √ 2. Then CHAPTER 5. EXISTENCE AND PROOF BY CONTRADICTION 5.3 19 A Review of Three Proof Techniques Example 5.12. Let x ∈ Z. If 5x + 3 is odd then x is even. Proof. 1. (Direct Proof). Let 5x + 3 be odd. =⇒ 5x + 3 = 2k + 1, k ∈ Z. Thus x = (5x + 3) − (4x + 3) = 2k + 1 − 4x − 3 = 2(k − 2x − 1) which is even. 2. (Contrapositive). Assume that x is odd. Then show that 5x + 3 is even. 3. (Contradiction). Assume, to the contrary, that there is an integer x such that 5x + 3 is odd and x is odd. x is odd implies that 5x + 3 is even, a contradiction. Example 5.13. Let x be a positive real number. Prove that if x − x3 < 2, then x < 3. Proof. 1. (Direct) 3 <2 x =⇒ x2 − 2x − 3 < 0 =⇒ (x − 3)(x + 1) < 0 =⇒ x < 3. x− 2. (Contrapositive) Assume that x ≥ 3. =⇒ x2 − 2x − 3 = (x − 3)(x + 1) ≥ 0. It follows that x − x3 ≥ 2. 3. (Contradiction) Assume on the contrary that there is a positive real number x such that x − x3 < 2 and x ≥ 3. Then we get x − x3 ≥ 2, a contradiction. 5.4 Existence Proofs Example 5.14. There exist real numbers a and b such that (a + b)2 = a2 + b2 . Proof. Take a = 1 and b = 0. Proof. (a + b)2 = a2 + b2 =⇒ 2ab = 0 =⇒ either a = 0 or b = 0. So take a = 0 and b = 0 or any other combinations. Example 5.15. There exist irrational numbers a and b such that ab is rational. √ √2 √ √2 √ Proof. Consider the number √2 . If 2 is irrational then take a = b = 2. If √ 2 √ √2 √ 2 √ √2 √ 2 is rational then 2 = 2 is rational. Take a = 2 and b = 2. CHAPTER 5. EXISTENCE AND PROOF BY CONTRADICTION 20 Example 5.16. The equation x5 + 2x − 5 = 0 has a real number solution between x = 1 and x = 2. Proof. Use Intermediate Value Theorem. 5.5 Disproving Existence Statements Example 5.17. Disprove that there exists an odd integer n such that n2 + 2n + 3 is odd. Proof. n = 2k + 1, k ∈ Z. Example 5.18. Disprove that there is a real number x such that x6 +2x4 +x2 +2 = 0. Proof. x6 , x4 , x2 are all ≥ 0. Chapter 6 Mathematical Induction 6.1 The Principle of Mathematical Induction Theorem 6.1. If a set A of real numbers has a least element, then the least element is unique. Proof. Let A has two least elements x and y. Since x is a least element, y ≥ x. Also, since y is a least element x ≥ y. Therefore, x = y. Definition 6.1. A nonempty set S of real numbers is said to be well-ordered if every nonempty subset of S has a least element. The set S = {2, 4, 9, 11} is well-ordered. In fact, any finite subset of R is wellordered. The sets Z, Q, R do not have least element. So they are not well-ordered whereas the set of natural numbers N is well-ordered. The intervals (0, 1) and [0, 1] both are not well-ordered. Example 6.1. Prove that every nonempty set of negative integers has a largest element. Proof. Let S ⊂ {· · · , −3, −2, −1} be a nonempty subset. Then Ŝ = {x : −x ∈ S} ⊂ N. Since N is well-ordered, Ŝ has a least element s. Then x ≥ s for all x ∈ Ŝ. This implies −x ≤ −s for all x ∈ Ŝ. Thus −s is a largest element in S. Theorem 6.2 (The Principle of Mathematical Induction). For each positive integer n, let P (n) be a statement. If 1. P (1) is true and 2. P (k) =⇒ P (k + 1) is true ∀k ∈ N then P (n) is true ∀n ∈ N. 21 CHAPTER 6. MATHEMATICAL INDUCTION 22 Proof. Assume, to the contrary, that P (n) is not true for every n ∈ N. Let S = {n ∈ N : P (n) is false}. Since S 6= ∅ and N is well-ordered, S has a least element s. Hence P (s) is false. Since P (1) is true, s ≥ 2. Since s is a least element, P (s − 1) is true. Then hypothesis 2 implies P (s) is true. This is a contradiction. The proof using the Principle of Mathematical Induction is called an induction proof or proof by induction. Example 6.2. For every n ∈ N, 1 + 2 + 3 + ··· + n = Proof. For n = 1, 1 = 1·2 . 2 n(n + 1) . 2 So the statement if true for n = 1. Assume that 1 + 2 + 3 + ··· + k = k(k + 1) 2 for any k ∈ N. Then, 1 + 2 + 3 + · · · + k + (k + 1) = (k + 1)(k + 2) . 2 Thus by the Principle of Mathematical Induction, 1 + 2 + 3 + ··· + n = n(n + 1) 2 for every n ∈ N. We can derive this formula using the following way. S=1 S=n 2S = (n + 1) n(n + 1) S= . 2 +2 +(n − 1) +3 +(n − 2) +··· +··· +n +1 +(n + 1) +(n + 1) +··· +(n + 1) (n terms) Example 6.3. For every positive integer n, 12 + 22 + · · · + n2 = n(n + 1)(2n + 1) . 6 CHAPTER 6. MATHEMATICAL INDUCTION 23 Proof. This is true for n = 1. Suppose that k(k + 1)(2k + 1) 6 for any k ∈ N. Now we prove that the statement is true for k + 1. 12 + 22 + · · · + k 2 = 12 + 22 + · · · + (k + 1)2 = (k + 1)(k + 2)(2k + 3) . 6 Question 2. How do we know that 12 + 22 + · · · + n2 = n(n + 1)(2n + 1) ? 6 Answer: (k + 1)3 = k 3 + 3k 2 + 3k + 1 1 1 =⇒ k 2 = [(k + 1)3 − k 3 ] − k − . 3 3 Summing over k n X 1 n(n + 1) n k 2 = [(n + 1)63 − 13 ] − − 3 2 3 k=1 n3 + 3n2 + 3n n2 + n n − − 3 2 3 3 2 2n + 3n + n = 6 n(n + 1)(2n + 1) = . 6 = Example 6.4. Prove that 1 · 1! + 2 · 2! + · · · + n · n! = (n + 1)! − 1 for every positive integer n. Proof. (k + 1)! − 1 + (k + 1) · (k + 1)! = (k + 1)!(k + 2) − 1 = (k + 2)! − 1. 6.2 A More General Principle of Mathematical Induction Theorem 6.3. For each integer m, the set S = {i ∈ Z : i ≥ m} is well-ordered. CHAPTER 6. MATHEMATICAL INDUCTION 24 Proof. Let A ⊂ S. If A ⊂ N then since N is well-ordered, A has a smallest element. If A 6⊂ N then the set {x ∈ A : x ≤ 0} is not empty and it is finite. Hence has a smallest element, which is also a smallest element of A. Theorem 6.4 (The Principle of Mathematical Induction). For a fixed integer m, let S = {i ∈ Z : i ≥ m}. For each integer n ∈ S, let P (n) be a statement. If 1. P (m) is true and 2. ∀k ∈ S, P (k) =⇒ P (k + 1) is true then P (n) is true ∀n ∈ S. Example 6.5. For every nonnegative integer n, 2n > n. Proof. The inequality holds for n = 0. Assume that (induction hypothesis) 2k > k for nonnegative integer k. When k = 0, 2k+1 = 2 > 1 = k + 1 and when k ≥ 1, 2k+1 = 2 · 2k > 2k = k + k ≥ k + 1. Thus by the Principle of Mathematical Induction 2n > n for every nonnegative integer n. Example 6.6. For every integer n ≥ 5, 2n > n2 . Proof. We use induction. The statement is true for n = 5. Assume that 2k > k 2 for k ≥ 5. 2k+1 = 2 · 2k > 2k 2 = k 2 + k 2 ≥ k 2 + 5k = k 2 + 2k + 3k > k 2 + 2k + 1 = (k + 1)2 . Example 6.7. Prove that 7|(32n − 2n ) for every non-negative integer n. Proof. We prove by induction. For n = 0, 7|0. Assume that 7|(32k − 2k ), where k is a nonnegative integer. Then 32k = 7m + 2k for some m ∈ Z. Now, 32k+2 − 2k+1 = 9(7m + 2k ) − 2 · 2k = 7(9m) + 7 · 2k = 7(9m + 2k ). Thus 7|((32(k+1) − 2k+1 ). Example 6.8. Prove that n! > 2n for every integer n ≥ 4. Proof. (k + 1)! = k!(k + 1) > 2k (k + 1) > 2k · 2 = 2k+1 . CHAPTER 6. MATHEMATICAL INDUCTION 6.3 25 Proof by Minimum Counterexample Example 6.9. Use proof by minimum counterexample to prove that 6|7n(n2 − 1) for every positive integer n. Proof. Assume, to the contrary, that there exist positive integers n such that 6 7n(n2 − 1). Then there is a smallest positive integer m such that 6 - 7m(m2 − 1). Since 6|7n(n2 − 1) when n = 1, m ≥ 2. Write m = k + 1. Observe that k ≥ 1 and 6|7k(k 2 − 1) (why?). Now, 7m(m2 − 1) = 7(k + 1)(k 2 + 2k) = 7k 3 + 21k 2 + 14k = (7k 3 − 7k) + 21k 2 + 21k = 7k(k 2 − 1) + 7 · 3k(k + 1). Since either k or k + 1 is even, 6|3k(k + 1). We already know that 6|7k(k 2 − 1). Hence 6|7m(m2 − 1). A contradiction. Chapter 7 Prove or Disprove HW: Exclude #7.12, 7.1 Conjectures in Mathematics The Four Color Conjecture: Every map can be colored with four or fewer colors. - First occured in 1852 to a British student Francis Guthrie. - Many attempted to settle this conjecture. - In 1879, Alfred Kempe gave a proof and Peter Guthrie Tait in 1880. - In 1890 Percy Heawood showed Kempe’s proof was incorrect. - In 1891 Tait’s proof was shown incorrect by Julius Petersen. - In 1976 Kenneth Appel and Wolfgang Haken gave the actual proof. Fermat’s Last Theorem: For each integer n ≥ 3, there are no nonzero integers x, y and z such that xn + y n = z n . - Conjectured by Pierre Fermat (A French lawyer) in 17th century. - Remained unanswered for approximately 350 years. - In 1993, British mathematician Andrew Wiles gave a proof. t Fermat’s Conjecture: A Fermat number is of the form Ft = 22 + 1, where t is a nonnegative integer. The conjecture says: Every Fermat number is a prime. - Conjectured in 1640 by Fermat. - Disproved by Leonhard Euler in 1739. F5 = 4, 294, 967, 297 is divisible by 641. 26 CHAPTER 7. PROVE OR DISPROVE 27 Goldbach’s conjecture: Every even integer ≥ 4 is the sum of two primes. - Conjectured by a German mathematician Christian Goldbach in 1742. - This conjecture is not resolved yet. 7.2 Revisiting Quantified Statements Example 7.1. For every positive integer n, the integer nn−1 is even. Solution: For n = 3, nn−1 = 32 = 9 an odd integer. Example 7.2. For every integer n ≥ 2, there exists an integer m such that n < m < 2n. Solution: m = n + 1. 7.3 Testing Statements Example 7.3. Prove or disprove that there is a real number solution to the equation 3x4 + x2 + 5 = 0. Solution: It is false. Example 7.4. Prove of disprove: There exists a real number x such that x2 < x < x3 . Solution: It is false. Example 7.5. Prove or disprove: There is an irrational number between any two rational numbers. Solution: Let r and s be any two rational numbers. Assume that r < s.Then √ < s. The number r + s−r √ is irrational. If it were rational, then r < r + s−r 2 2 s−r r+ √ =t 2 √ s−r =⇒ 2 = . t−r which is a contradiction. for some rational number t. Example 7.6. For every odd integer p there exist integers a and b such that p = a2 − b 2 . CHAPTER 7. PROVE OR DISPROVE 28 Solution: p = 2k + 1, k ∈ Z. Take a = k + 1 and b = k. Then a2 − b2 = (k + 1)2 − k 2 = 2k + 1 = p. Example 7.7. Prove or disprove: Let A, B and C be sets. If A × C = B × C, then A = B. Solution: False. If C = ∅, then for any sets A and B we have A × C = B × C. Chapter 8 Equivalence Relations 8.1 Relations Definition 8.1. Let A and B be two sets. A relation R from A to B is a subset of A × B. If (a, b) ∈ R then we say that a is related to b by R and write a R b. Example 8.1. A = {1, 2, 3} and B = {a, b}. Then R = {(2, a), (3, a), (1, b)} is a relation from A to B because R ⊂ A × B. Example 8.2. Let’s look at more concrete example. Take A = {1, 2, 3} and B = {1, 3, 5}. Let R be a relation “is less than” from A to B. Then a R b means “a is less than b”. Then R = {(1, 3), (1, 5), (2, 3), (2, 5), (3, 5)}. Definition 8.2. Let R be a relation from A to B. Then domain of R is dom(R) = {a ∈ A : (a, b) ∈ R for some b ∈ B} and the range of R is range(R) = {b ∈ B : (a, b) ∈ R for some a ∈ A}. Observe that dom(R) ⊂ A and range(R) ⊂ B. Definition 8.3. The inverse relation of R from A to B, denoted by R−1 , is a relation from B to A defined by R−1 = {(b, a) : (a, b) ∈ R}. Definition 8.4. If a relation is from a set A to itself, we call it a relation on A. 8.2 Properties of Relations We will be interested in only particular type of relations. In fact, the ones with the following properties. A relation R on a set A is 29 CHAPTER 8. EQUIVALENCE RELATIONS 30 1. reflexive if a R a for every a ∈ A. 2. symmetric if a R b =⇒ b R a for all a, b ∈ A. 3. transitive if a R b and b R c =⇒ a R c for all a, b, c ∈ A. Example 8.3. Let S = {a, b, c}. Then determine if R = {(a, a), (b, b), (c, c), (a, b), (b, a), (b, c), (c, b), (a, c), (c, a)} is a relation on S. Answer: Yes. Example 8.4. The relation R on Z defined by a R b if a ≤ b is reflexive and transitive but not symmetric. For instance, 2 ≤ 3 =⇒ 6 3 ≤ 2. Example 8.5. The relation R on R defined by x R y if |x − y| ≤ 1 is reflexive and symmetric but not transitive. For instance |1−2| ≤ 1 and |2−3| ≤ 1 =⇒ 6 |1−3| ≤ 1. Example 8.6. The relation R on Z defined by a R b if a = b is reflexive, symmetric and transitive. 8.3 Equivalence Relations Definition 8.5. A relation R on a set A is called an equivalence relation if it is reflexive, symmetric and transitive. So the relation R on Z defined by a R b if a = b is an equivalence relation. Definition 8.6. Let R be an equivalence relation on a set A. Then for a ∈ A, the set [a] = {x ∈ A : x R a} is called an equivalence class containing a. A better notation would be [a]R . Example 8.7. Let S = {1, 2, 3, 4} and an equivalence relation R = {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 1), (2, 3), (3, 2), (1, 3), (3, 1)}. Then the equivalence classes for R are [1] = {1, 2, 3} = [2] = [3], [4] = {4}. Example 8.8. The equivalence classes for the relation R on Z defined by a R b if a = b consist of only one element. For instance, [2] = {x ∈ Z : x = 2} = {2}. Example 8.9. Let L be a set of straight lines on a plane. Discuss the relation “is parallel to” and its equivalence classes. CHAPTER 8. EQUIVALENCE RELATIONS 8.4 31 Properties of Equivalence Classes Theorem 8.1. Let R be an equivalence relation on a nonempty set A and let a, b ∈ A. Then [a] = [b] if and only if a R b. Proof. Assume that [a] = [b]. Then a ∈ [a] =⇒ a ∈ [b] =⇒ a R b. Conversely, assume that a R b. We want to show that [a] = [b]. Let x ∈ [a]. Then x R a. Since R is transitive x R a and a R b =⇒ x R b =⇒ x ∈ [b] =⇒ [a] ⊂ [b]. Next, let y ∈ [b]. Then y R b. Since R is symmetric a R b =⇒ b R a. Again by transitivity of R, y R b and b R a =⇒ y R a =⇒ y ∈ [a] =⇒ [b] ⊂ [a]. Thus [a] = [b]. Recall that a partition of a nonempty set S is a collection of nonempty mutually disjoint subsets whose union is S. So every element of S belongs to exactly one of these subsets. Theorem 8.2. Let R be an equivalence relation on a nonempty set A. Then S 1. a∈A [a] = A, that is, the union of all equivalence classes is A. 2. Distinct equivalence classes are disjoint, that is, for a, b ∈ A if [a] 6= [b], then [a] ∩ [b] = ∅. Proof. S 1. For every S a ∈ A, a ∈ [a] =⇒ AS⊂ a∈A [a]. Next, for every a ∈ A, [a] ⊂ A =⇒ a∈A [a] ⊂ A. Hence A = a∈A [a]. 2. Let a, b ∈ A be such that [a] ∩ [b] 6= ∅. Then ∃x ∈ A such that x ∈ [a] ∩ [b] =⇒ x R a and x R b =⇒ a R b =⇒ [a] = [b]. As a consequence of this theorem the equivalence classes form a partition of the set A. The converse is also true. Theorem 8.3. Let P = {Aα : α ∈ I} be a partition of a nonempty set A. Then there exists an equivalence relation R on A such that the set of equivalence classes determined by R is exactly P . Proof. Define a relation R on A by a R b if a, b ∈ Aα for some α. We show that R is an equivalence relation on A. 1. R is reflexive because a ∈ A =⇒ a R a. 2. Assume that a R b. symmetric. =⇒ a, b ∈ Aα for some α. =⇒ b R a. Hence R is CHAPTER 8. EQUIVALENCE RELATIONS 32 3. Assume that a R b and b R c. =⇒ a, b ∈ Aα for some α ∈ I and b, c ∈ Aβ for some β ∈ I. Since b ∈ Aα and b ∈ Aβ , Aα = Aβ . Therefore a, c ∈ Aα . =⇒ a R c. Thus R is transitive. Now we show that the the equivalence classes are just the sets in P . Let a ∈ A. Then a ∈ Aα for some α ∈ I. By the definition of R [a] = {x ∈ A : x R a} = {x ∈ A : x, a ∈ Aα } = Aα . Example 8.10. A relation R on N is defined by a R b if a2 + b2 is even. Prove that R is an equivalence relation. Determine the distinct equivalence classes. Solution: 1. For every a ∈ N, a R a because a2 + a2 = 2a2 is even. Hence R is reflexive. 2. If a R b then a2 + b2 is even. symmetric. =⇒ b2 + a2 is even. =⇒ b R a. Hence R is 3. Let a R b and b R c. =⇒ a2 + b2 is even and b2 + c2 is even. Then a2 + c2 = (a2 + b2 ) + (b2 + c2 ) − 2b2 which is even. =⇒ a R c. Hence R is transitive. Now let us determine the equivalence classes for R. Let’s begin with the equivalence class containing 1. [1] = {x ∈ N : x R 1} = {x ∈ N : 12 + x2 is even} = {1, 3, 5, · · · }. For the next equivalence class we chose an element that is not in [1]. Since 2 6∈ [1], [2] is distinct from [1]. [2] = {x ∈ N : x R 2} = {x ∈ N : x2 + 22 is even} = {2, 4, 6, · · · }. Since [1] ∪ [2] = N, these are the only equivalence classes. 8.5 Congruence Modulo n Recall that, for integers a and b, where a 6= 0, we say a|b if there is some integer c such that b = ac. For integers a, b and n ≥ 2 we say a is congruent to b modulo n, written a ≡ b (mod n) if n|(a − b). CHAPTER 8. EQUIVALENCE RELATIONS 33 Theorem 8.4. Let n ∈ Z, n ≥ 2. The relation R defined on Z by a R b if a ≡ b (mod n) is an equivalence relation. This relation is called congruence module n. Proof. 1. For every a ∈ Z, n|(a − a) =⇒ a ≡ a (mod n) =⇒ a R a =⇒ R is reflexive. 2. Let a R b, that is, a ≡ b (mod n). =⇒ n|(a − b) =⇒ n| − (a − b) =⇒ n|(b − a) =⇒ b ≡ a (mod n) =⇒ b R a =⇒ R is symmetric. 3. Let a R b and b R c, that is, a ≡ b (mod n) and b ≡ c (mod n). =⇒ a − b = nx for some x ∈ Z b − c = ny for some y ∈ Z a − c = n(x + y) =⇒ a R c. Hence R is transitive. We are done. Example 8.11. Determine the equivalence classes for the equivalence relation R on Z defined by a R b if a ≡ b (mod 2). Solution: By definition [a] = {x ∈ Z : x R a} = {x ∈ Z : x ≡ a (mod 2)} = {x ∈ Z : 2|(x − a)}. Therefore [0] = {0, ±2, ±4, ±6, · · · } = {2n : n ∈ Z} [1] = {±1, ±3, ±5, ±7, · · · } = {2n + 1 : n ∈ Z}. Example 8.12. What are the equivalence classes for the equivalence relation congruence modulo 5 on Z? Solution: By definition [a] = {x ∈ Z : x ≡ a (mod 5)} = {x ∈ Z : 5|(x − a)}. Therefore [0] = {· · · [1] = {· · · [2] = {· · · [3] = {· · · [4] = {· · · , −20, −15, −10, −5, 0, 5, 10, 15, · · · } = {5n : n ∈ Z} , −19, −14, −9, −4, 1, 6, 11, 16, · · · } = {5n + 1 : n ∈ Z} , −18, −13, −8, −3, 2, 7, 12, 15, · · · } = {5n + 2 : n ∈ Z} , −17, −12, −7, −2, 3, 8, 13, 18, · · · } = {5n + 3 : n ∈ Z} , −16, −11, −6, −1, 4, 9, 14, 19, · · · } = {5n + 4 : n ∈ Z}. CHAPTER 8. EQUIVALENCE RELATIONS 34 Example 8.13. Prove that the relation R on Z defined by a R b if 2a + 3b ≡ 0 (mod 5) is an equivalence relation and determine the distinct equivalence classes. Proof. Let us prove that the relation R is an equivalence relation. 1. For every a ∈ Z, 5|(2a + 3a) =⇒ 2a + 3a ≡ 0 (mod 5) =⇒ a R a. R is reflexive. 2. Let a R b. Then 2a + 3b ≡ 0 (mod 5) =⇒ 5|(2a + 3b) =⇒ 2a = 5x − 3b for some x ∈ Z. Now, 2b + 3a = 2b + 5a − 2a = 2b + 5a − 5x + 3b = 5(b + a − x). Thus 5|(2b + 3a) =⇒ 2b + 3a ≡ 0 (mod 5) =⇒ b R a =⇒ R is symmetric. 3. Let a R b and b R c. Then 2a + 3b ≡ 0 (mod 5) and 2b + 3c ≡ 0 (mod 5). This implies 2a + 3b = 5x and 2b + 3c = 5y for some x, y ∈ Z. Now, 2a + 3c = 5x − 3b + 5y − 2b = 5(x + y − b) =⇒ 5|(2a + 3c) =⇒ 2a + 3c ≡ 0 (mod 5) =⇒ a R c =⇒ R is transitive. The equivalence classes are: [0] = {x ∈ Z : x R 0} = {x ∈ Z : 5|2x} = {5n : n ∈ Z} [1] = {x ∈ Z : x R 1} = {x ∈ Z : 5|2x + 3} = {5n + 1 : n ∈ Z} [2] = {x ∈ Z : x R 2} = {x ∈ Z : 5|2x + 6} = {5n + 2 : n ∈ Z} [3] = {x ∈ Z : x R 3} = {x ∈ Z : 5|2x + 9} = {5n + 3 : n ∈ Z} [4] = {x ∈ Z : x R 4} = {x ∈ Z : 5|2x + 12} = {5n + 4 : n ∈ Z}. 8.6 The Integer Modulo n In last Section we saw that congruence modulo n, n ≥ 2 is an equivalence relation on Z and any equivalence class for this equivalence relation is identified with one of the classes [0], [1], [2], · · · , [n − 1]. We denote the set of these equivalence classes by Zn . Therefore, Zn = {[0], [1], [2], · · · , [n − 1]}. We define the addition and multiplication on Zn as follows. Let [a], [b] ∈ Z. Then [a] + [b] = [a + b] and [a] · [b] = [ab]. Example 8.14. Identify the following equivalence classes, sums and products in Z7 with one of the classes {[0], [1], [2], [3], [4], [5], [6], [7]}. (i) [12] = [5]. (ii) [158] = [4]. (iii) [6] + [11] = [6 + 11] = [17] = [3]. (iv) [3] · [16] = [48] = [6]. Chapter 9 Functions 9.1 The Definition of Function We usually use a letter f to denote a function. Definition 9.1. Let A and B be nonempty sets. A function f from a set A to B, written f : A → B, is a relation from A to B with the property that every element a ∈ A is related to exactly one element of B. We will not use relation anymore other than to define a function. The set A is called the domain of f , dom(f ) and B is called the codomain of f . Question 3. Can (a, b) and (a, c) ∈ f ? Answer: No, if b 6= c. Yes, if b = c. It’s uncommon to write (a, b) ∈ f . It’s rather written f (a) = b and we say f maps a into b or b is an image of a under f . A function sometimes is also called a mapping. Definition 9.2. The range of a function f : A → B is the set range(f ) = {b ∈ B : b = f (a) for some a ∈ A} = {f (a) : a ∈ A}. Definition 9.3. Two functions f : A → B and g : A → B are equal, written f = g if f (a) = g(a) for all a ∈ A. Example 9.1. Some examples of functions and diagrams. Example 9.2. Consider a function f (x) = x2 . The function is defined from R to R, that is, f : R → R. dom(f ) = R, range(f ) = [0, ∞) = R+ . In our context the function f is the set f = {(x, f (x)) : x ∈ R} f (x) is the image of x under f . 35 CHAPTER 9. FUNCTIONS 36 Definition 9.4. Let f : A → B be a function and C ⊂ A. Then the image of C under f is written f (C) and is defined as f (C) = {f (x) : x ∈ C} Example 9.3. Let A = {a, b, c, d, e} and B = {1, 2, 3, 4, 5}. Let f = {(a, 2), (b, 1), (c, 2), (d, 5), (e, 5)}. Then f ({a, c, d}) = {2, 5} and f (A) = {1, 2, 5} = range(f ). Definition 9.5. Let f : A → B and D ⊂ B. Then the inverse image f −1 (D) of D is the set f −1 (D) = {a ∈ A : f (a) ∈ D} and for b ∈ B f −1 ({b}) = {a ∈ A : f (a) = b} We usually write f −1 (b) instead of f −1 ({b}). Example 9.4. In Example 9.3 i. f −1 ({1}) = {b}. We rather write f −1 (1) = b. ii. f −1 (2) = {a, c}. iii. f −1 ({1, 2}) = {a, b, c}. iv. f −1 (4) = ∅. v. f −1 (B) = A. 9.2 The Set of All Functions From A to B Let A and B be nonempty sets. We denote the set of all functions from A to B by B A . So B A = {f : f is a function from A → B} = {f : f : A → B} Question 4. How many functions are there in B A ? We will consider A and B are finite sets. Answer: |B A | = |B||A| . Example 9.5. Let A = {a, b, c} and B = {x, y}. Then how many functions from A to B can be defined? And, how many from B to A? CHAPTER 9. FUNCTIONS 37 Solution: From A to B |B A | = 23 = 8 and from B to A, |AB | = 32 = 9. Let us write the functions from A to B explicitly. 1. f1 (a) = x, f1 (b) = x, f1 (c) = x, that is, f = {(a, x), (b, x), (c, x)} 2. f1 (a) = y, f1 (b) = y, f1 (c) = y, that is, f = {(a, y), (b, y), (c, y)} 3. f1 (a) = x, f1 (b) = x, f1 (c) = y, that is, f = {(a, x), (b, x), (c, y)} 4. f1 (a) = y, f1 (b) = y, f1 (c) = x, that is, f = {(a, y), (b, y), (c, x)} 5. f1 (a) = y, f1 (b) = x, f1 (c) = x, that is, f = {(a, y), (b, x), (c, x)} 6. f1 (a) = x, f1 (b) = y, f1 (c) = y, that is, f = {(a, x), (b, y), (c, y)} 7. f1 (a) = x, f1 (b) = y, f1 (c) = x, that is, f = {(a, x), (b, y), (c, x)} 8. f1 (a) = y, f1 (b) = x, f1 (c) = y, that is, f = {(a, y), (b, x), (c, y)} 9.3 One-to-One and Onto Functions Definition 9.6. A function f : A → B is called one-to-one if, for a, b ∈ A, a 6= b =⇒ f (a) 6= f (b). Equivalently, f is one-to-one if f (a) = f (b) for a, b ∈ A =⇒ a = b. The one-to-one function is also called an injective function. Definition 9.7. A function f : A → B is called onto if for every b ∈ B there is an element a ∈ A such that f (a) = b. Equivalently, f is onto if f (A) = B. The onto function is also called surjective. Demonstrate these functions using diagrams. Example 9.6. Prove that the function f : R → R defined by f (x) = 5x + 3 is one-to-one and onto. Solution: 1. Let f (x) = f (y), where x, y ∈ R. Then, 5x + 3 = 5y + 3 =⇒ x = y. Therefore f is one-to-one. 2. To show that f is onto, we want to show that for every y ∈ R there is an x ∈ R such that f (x) = y. Let y ∈ R. Then take x = y−3 . Then 5 y−3 f (x) = 5x + 3 = 5 + 3 = y. 5 Therefore f is onto. CHAPTER 9. FUNCTIONS 38 Example 9.7. Let a function f : Z → Z be defined by f (n) = 5n + 3. Determine if f is one-to-one and onto. Solution: i. Let, for m, n ∈ Z, f (m) = f (n) =⇒ 5m + 3 = 5n + 3 =⇒ m = n. Therefore f is one-to-one. ii. To show f is onto we have to show that for every n ∈ Z there is m ∈ Z such that f (m) = n. But this is not true. For instance, there is no integer m ∈ Z such that f (m) = 0. Hence f is not onto. Also f (Z) = {· · · , −12, −7, −2, 3, 8, 13, · · · } = 6 Z. Therefore f is not onto. Example 9.8. The function f : R → R defined by f (x) = x2 is neither one-to-one nor onto because f (−1) = f (1) and f (R) = [0, ∞) 6= R. 9.4 Bijective Functions Definition 9.8. A function f : A → B is called bijective if it is both injective and surjective, that is, f is both one-to-one and onto. Bijective function is also called one-to-one correspondence. Question 5. Let A and B be finite sets with |A| 6= |B|. Can there be a bijective function from A to B? Answer: Never. Question 6. Let A and B be finite sets with |A| = |B| = n. How many bijective functions from A to B are there? Answer: There are n! bijective functions from A to B. To see this, let A = {a1 , · · · , an }. f (a1 ) = n possible images f (a2 ) = n − 1 possible images .. . f (an−1 ) = 2 possible images f (an ) = 1 possible image CHAPTER 9. FUNCTIONS 39 Thus we can define a bijective function f : A → B in n(n − 1) · · · 2 · 1 = n! ways. Here there are n! bijective functions. An alternative way to look at this is, in how many way we can match the elements in the following two columns. A a1 a2 .. . B b1 b2 .. . an bn Theorem 9.1. Let f : A → B, where A and B are finite sets with |A| = |B|. Then f is one-to-one if and only if f is onto. Proof. Assume that f is one-to-one. Then |f (A)| = n. Since f (A) ⊂ B and |f (A)| = |B| we have to have f (A) = B. Hence f is onto. Conversely, assume that f is onto. Then f (A) = B. If f is not one-to-one then there exist a, b ∈ A, a 6= b such that f (a) = f (b). This implies that |f (A)| < n and hence f (A) 6= B, a contradiction. Definition 9.9. Let A be a nonempty set. The function iA : A → A defined by iA (a) = a for each a ∈ A is called the identity function on A. The identity function is always bijective. Example 9.9. The function f : R − {2} → R − {3} defined by f (x) = 3x x−2 is bijective. Proof. 1. Assume that f (x) = f (y) for some x, y ∈ R − {2}. 3x 3y = x−2 y−2 =⇒ 3x(y − 2) = 3y(x − 2) =⇒ 3xy − 6x = 3xy − 6y =⇒ x = y. Hence f is one-to-one. CHAPTER 9. FUNCTIONS 40 2. Let y ∈ R − {3}. We want to find an x ∈ R − {2} such that f (x) = y. Take 2y x = y−3 . Then 2y 3 y−3 6y 3x = 2y = = y. f (x) = x−2 6 − 2 y−3 Hence f is onto. Example 9.10. The function f : Z → Z defined by f [x] = [3x + 1] is a well defined function. Moreover, f is bijective. Solution: Let [a] = [b]. Then a ≡ b (mod 4) =⇒ 4|(a − b). Now (3a + 1) − (3b + 1) = 3(a − b) Since 4|(a − b), 4|((3a + 1) − (3b + 1)). Hence [3a + 1] = [3b + 1] =⇒ [f (a)] = [f (b)]. Show f is bijective now. 9.5 Composition of Functions Definition 9.10. Let f : A → B and g : B → C. Then the composition of f and g is the function g ◦ f : A → C defined by (g ◦ f )(a) = g(f (a)) Example 9.11. To illustrate the definition, take A = {a, b, c, d}, B = {w, x, y, z}, C = {1, 2, 3}. Let f : A → B and g : B → C be the functions f = {(a, w), (b, x), (c, x), (d, z)} g = {(w, 2), (x, 1), (y, 2), (z, 3)} Then g ◦ f = {(a, 2), (b, 1), (c, 1), (d, 3)} Illustrate this by a diagram. Theorem 9.2. Let f : A → B and g : B → C be two functions. Then 1. If f and g are injective, then so is g ◦ f . 2. If f and g are surjective, then so is g ◦ f . Proof. CHAPTER 9. FUNCTIONS 41 1. Assume that (g ◦ f )(x) = (g ◦ f )(y), x, y ∈ A =⇒ g(f (x)) = g(f (y)). Since g is injective, f (x) = f (y). Since f is injective, x = y. Hence g ◦ f is injective. 2. Let c ∈ C. Since g is surjective, there is b ∈ B such that g(b) = c. Since f is surjective, there is a ∈ A such that f (a) = b. Hence, (g ◦ f )(a) = g(f (a)) = g(b) = c =⇒ g ◦ f is surjective. Theorem 9.3. Let f : A → B, g : B → C and h : C → D. Then (h◦g)◦f = h◦(g◦f ). Example 9.12. Let f (x) = x + 1) and g(x) = x2 . Find g ◦ f and f ◦ g. 9.6 Inverse Functions Theorem 9.4. Let f : A → B be a function. Then the inverse relation f −1 is a function from B → A if and only if f is bijective. Furthermore, f −1 is bijective. Proof. Suppose f is bijective. We show that f −1 is a function from B to A. 1. First, we show that for every b ∈ B, f −1 (b) ∈ A. Let b ∈ B. Since f is onto, there is a ∈ A such that f (a) = b =⇒ f −1 (b) = a ∈ A. 2. Second, we show that f is well-defined, that is, b1 = b2 , where b1 , b2 ∈ B =⇒ f −1 (b1 ) = f −1 (b2 ). There are a1 , a2 ∈ A such that f (a1 ) = b1 and f (a2 ) = b2 . Since f is injective f (a1 ) = f (a2 ) =⇒ a1 = a2 . Hence f −1 (b1 ) = f −1 (b2 ).