Module 1 Review of Discrete Mathematics 1.1 Proofs by Contradiction Proof by contradiction is proof strategy that proves the truth or the validity of a statement by showing that assuming the statement to be false leads to a contradiction. Proposition 1.1.1. Sum of odd integer and even integer is always an odd integer. Proof. Let š and š be odd and even integers respectively. So, we can write š = 2 · š for some integer š. We have to show that š + š is an odd integer. Suppose otherwise, then š + š is divisible by 2, which implies that š + š = 2 · š for some integer š. Then, š = 2 · š − 2 · š = 2(š − š). Thus, š is an even integer, leading to a contradiction. So, our assumption is wrong. Therefore, š + š is an odd integer Proposition 1.1.2. Sum of two odd integers is always an even integer. Proof. Let š1 and š 2 be two odd integers. We have to show that š 1 + š 2 is an even integer. Suppose not, then š 1 + š 2 is an odd integer. We can write š 1 + š2 = 2 · š + 1 for some integer š. Also, we can write š 2 = 2 · š + 1 for some integer š. So, we have š 1 = 2(š − š) which implies that š 1 is an even integer, leading to a contradiction. This completes the proof. Proposition 1.1.3. The number of all primes is infinite. Proof. Suppose the number of all primes are finite. Let š 1 , š 2 , . . . , š š be the list of all primes. Let š = š 1 · · · š š . Check that š + 1 is also a prime (why), which is not in the list. This is a contradiction. Therefore, the number of all primes are finite. √ Proposition 1.1.4. Show that 2 is irrational. √ √ Proof. Suppose 2 is not irrational. Then, we can write 2 = š/š for some integers š and š with gcd( š, š) = 1. So, we have š 2 = 2 · š 2 =⇒ š 2 is even, which implies š is even integer. So, 4| š 2 =⇒ 4 · š 2 =⇒ 2|š 2 and hence, š 2 is even, implies š is even. So, gcd( š, š) ≠ 1, leading to a contradiction. This completes the proof. Proposition 1.1.5. Let š be an integer. Show that š + 2 is an odd integer if and only if š is an odd integer 1 Proof. If part. Given that š + 2 is an odd integer. We have to show that š is odd. Suppose not, then 2|š =⇒ 2|(š + 2). So, š + 2 is an even integer which is a contradiction. Converse. Given that š is an odd integer. We have to show that š + 2 is odd. Suppose not, then š + 2 is even. That means, 2|š which is a contradiction. Proposition 1.1.6. Let š“ and šµ be two statements. Then š“ =⇒ šµ if and only if ¬šµ =⇒ ¬š“. Proof. If part. We show that if š“ =⇒ šµ, then ¬šµ =⇒ ¬š“. Given š“ =⇒ šµ and assume that ¬šµ is true, that is, šµ is false. We have to show that ¬š“ is true. Suppose otherwise, then š“ is true which implies that šµ is true (using š“ =⇒ šµ). This leads to a contradiction as šµ is false. So, ¬š“ false and hence, ¬šµ =⇒ ¬š“. Converse. We have to show that if ¬šµ =⇒ ¬š“, then š“ =⇒ šµ. In fact, by “if part”, we have ¬(¬š“) =⇒ ¬(¬šµ) . Since ¬(¬š“) (resp. ¬(¬šµ)) is equivalent to š“ (resp. šµ), the proof is done. Exercise 1.1.1. Prove the following using proof by contradiction. 1. Prove that √ 3 is irrational. 2. Prove that for any prime š, √ š is irrational. 3. Let š and š be two positive integers with š > š. Suppose š balls are thrown into š urns in such a way that each ball will get an urn. Prove that at least one urn contains more than one ball. Suppose there are š balls and š urns with š > š. 4. Let š be any vector space over R. Show that any subset (resp. superset) of a linearly independent (resp. dependent) set in š is linearly independent (resp. dependent). 5. Consider the following system of linear equations over R: š“š = š where š“ is an š × š matrix, š is the column vector of unknown variables and š ∈ Rš is a fixed column vector. Suppose the rank of š“ is less than š. Prove that the above system has more than one solution over R. 1.2 Basics of Set Theory A set is some collection of objects. Typically, sets are written within curly braces {, }. For example, {2, 4, 6, . . .} is the set of all positive even integers. Some conventional sets are given below. • R: Set of real numbers • Z = {. . . , −2, −1, 0, 1, 2, . . .} (Set of integers) • N = {1, 2, . . .} (Set of positive integers) • Q = {š„ ∈ R : š„ = š š, with š, š ∈ Z and š ≠ 0} (Set of rational numbers) Let us introduce some conventional notations of mathematics. • for all: ∀ 2 • there exists: ∃ • there exists unique: ∃! • for š ∈ N, define [š] = {1, 2, . . . , š} Membership. Given a set š“ and an element š, the notation “š ∈ š“” means that “š belongs š“” and the notation “š ∉ š“” indicates that “š does not belong to š“”. Subset. We say a set š“ is a subset of šµ (denoted by š“ ⊆ šµ), if every element of š“ is also an element of šµ. That is, š“ ⊆ šµ, if ∀š„ ∈ š“ =⇒ š„ ∈ šµ. When š“ is not a subset of šµ, we write š“ * šµ. That is, š“ * šµ, if ∃š„ ∈ š“ such that š„ ∉ šµ. Equality. For any two sets š“ and šµ, š“ = šµ iff š“ ⊆ šµ and šµ ⊆ š“. Empty set. A set without any element is called empty set and is denoted by ∅. So, ∅ = {}. It is easy to check that ∅ ⊆ š“ for all sets š“. Cardinality. For a set š“, its cardinality, denoted by #š“ or | š“|, is defined to be the number of elements of š“. š“ is called finite set, if #š“ ∈ N, otherwise, called infinite set. We now briefly discuss some basic set operations. 1. Union. For any two sets š“ and šµ, š“ ∪ šµ = {š„ : š„ ∈ š“ or š„ ∈ šµ}. This definition can be extended to any numbers of sets. 2. Intersection. For any two sets š“ and šµ, š“ ∩ šµ = {š„ : š„ ∈ š“ and š„ ∈ šµ}. This definition can be extended to any numbers of sets. 3. Complement. For a set š“, its complement is defined by š“ = {š„ : š„ ∉ š“}. That is, š„ ∈ š“ ⇐⇒ š„ ∉ š“. 4. Set difference/minus. For any two sets š“ and šµ, the set minus of š“ and šµ is defined by š“ \ šµ = š“ ∩ šµ = {š„ : š„ ∈ š“ and š„ ∉ šµ}. 5. Symmetric difference. For any two sets š“ and šµ, their symmetric difference is defined by š“Δšµ = ( š“ \ šµ) ∪ (šµ \ š“). In other words, š“Δšµ = ( š“ ∪ šµ) \ ( š“ ∩ šµ). The Venn diagrams for union, intersection, complement and set and symmetric differences are given below. 3 š“ šµ š“ šµ š“\šµ š“∩šµ šµ\š“ š“ \ šµ, š“ ∩ šµ and šµ \ š“ š“∪šµ š“ šµ š“ š“ š“Δšµ Definition 1.2.1 (Set partition). A partition of a given set š“ is a collections of nonempty sets š“1 , š“2 , . . . , š“ š š for some š ∈ N such that š“ = ∪š=1 š“š and š“š ∩ š“ š = ∅ for any š, š with 1 ≤ š, š ≤ š and š ≠ š. It is easy to see that a set can be partitioned many ways. So, partition of a set is not unique. The above partition is called finite partition. This definition can be extended to infinite partition, if the the given set is infinite. For example, N = ∪∞ š=1 š“š , where š“š = {š}. Next, we describe some universal laws which can be checked easily. Let š“, šµ and š¶ be any sets. • Associative. ( š“ ∪ šµ) ∪ š¶ = š“ ∪ (šµ ∪ š¶) and ( š“ ∩ šµ) ∩ š¶ = š“ ∩ (šµ ∩ š¶). • Commutative. š“ ∪ šµ = šµ ∪ š“ and š“ ∩ šµ = šµ ∩ š“. Note that in general š“ \ šµ ≠ šµ \ š“. • Transitive. If š“ ⊆ šµ and šµ ⊆ š¶, then š“ ⊆ š¶. • Subset. ∅ ⊆ š“ ∩ šµ ⊆ š“. • Complement. š“ ∩ š“ = ∅ and š“ = š“. • Idempotent. š“ ∪ š“ = š“ ∩ š“ = š“. • Dominance. š“ ∩ ∅ = ∅ and š“ ∪ ∅ = š“. • Absorption. If š“ ⊆ šµ, then š“ ∪ šµ = šµ and š“ ∩ šµ = š“. • De Morgan’s law. ( š“ ∪ šµ) = š“ ∩ šµ and ( š“ ∩ šµ) = š“ ∪ šµ. • Distributive law. š“ ∪ (šµ ∩ š¶) = ( š“ ∪ šµ) ∩ ( š“ ∪ š¶) and š“ ∩ (šµ ∪ š¶) = ( š“ ∩ šµ) ∪ ( š“ ∩ š¶). • Partition. š“ ∪ šµ = ( š“ \ šµ) ∪ ( š“ ∩ šµ) ∪ (šµ \ š“). So, š“ \ šµ, š“ ∩ šµ and šµ \ š“ form a partition for š“ ∪ šµ. 4 Exercise 1.2.1. Let š“, šµ and š be three sets such that š“, šµ ⊆ š. Prove that š“∩ šµ = š \ ((š \ š“) ∪ (š \ šµ)) and š“ ∪ šµ = š \ ((š \ š“) ∩ (š \ šµ)). Power set. Let š“ be a set. Then, its power set is defined to be the set of all subsets of š“ (including the empty set ∅ and the set A itself). It is denoted by P ( š“) or 2 š“, but the latter notation carries some meaningful information. Do you know what kind of information the 2nd notation carries? Let š“ = {š, š, š}, then its power set is 2 š“ = {∅, {š}, {š}, {š}, {š, š}, {š, š}, {š, š}, {š, š, š}}. In this example, you might have noticed that |2 š“ | = 8 = 2 | š“| . In fact, it can be shown that in general |2 š“ | = 2 | š“| using different approaches. 1.2.1 Cartesian Product The Cartesian product of two nonempty1 sets š and š is defined as š × š = {(š, š) : š ∈ š and š ∈ š }. Note that here (š, š) is an order pair and (š, š) ∈ š × š does not mean that (š, š) ∈ š × š. Similarly, one can define Cartesian product š1 × · · · × š š of š1 , š2 , . . . , š š . Note that |š1 × · · · × š š | = |š1 | · |š2 | · · · |š š |. Definition 1.2.2 (Binary Relation). A binary relation between two sets š and š is subset š of š × š. For any (š, š) ∈ š × š, we say “š is š-related to š” if (š, š) ∈ š, otherwise “š is not š-related to š”. Here, š is called domain and š is called codomain. When š is š-related to š and š is understood from the context, we write ššš for simplicity. On other hand, if š and š are not related, we write š 6 š š. Example 1.2.2. Let š = {1, 2, 3, 4, 5} and š = {3, 4, 5, 6, 7, 8}. Let š = {(š, š) ∈ š × š : š − š = 5}, that is š = {(1, 6), (2, 7), (3, 8)}. So, we can write 1š6, 2š7, and 3š8, but 1 6 š 2, 1 6 š 3, so on. We are now interested in a special kind of binary relations where domain and codomain are the same. Let the domain and the codomain be denoted by š. We would refer to a binary relation between š and š simply by “a relation on š”. Next, we define an equivalence relation. Definition 1.2.3 (Equivalence Relation). A relation š on š is said to be equivalence relation if the following conditions hold: – Reflexivity: ššš for all š ∈ š. – Symmetry: ššš =⇒ ššš for all š, š ∈ š. – Transitivity: ššš and ššš =⇒ ššš for all š, š, š ∈ š. Example 1.2.3. A relation š on Z defined by ššš if š|(š − š), is an equivalence relation. Exercise 1.2.4. For the following relations, determine whether they are reflexive and/or symmetry and/or transitive. 1. Let š be the collection of all triangles in the real plane. For any š, š ∈ š, we define ššš if Area(š) = Area(š). 2. Let š = R. For any š, š ∈ š, we define ššš if š = š. 3. Let š = R. For any š, š ∈ š, we define ššš if š > š. 4. Let š = R. For any š, š ∈ š, we define ššš if š ≥ š. 5. Let š = R. For any š, š ∈ š, define (š, š) ∈ š if š = š + 1. 1 What happens if any of š and š is empty set? 5 6. Let š = R. For any š, š ∈ š, define (š, š) ∈ š if |š − š| > 0. 7. Let š = {0, 1, 2, 3, 4, 5, 6, 7, 9}. For any š, š ∈ š, define (š, š) ∈ š if 2|(š − š). 8. Let š be the collection of š × š matrices over R. For any two matrices š, š ∈ š, define (š, š) ∈ š if š is the multiplicative inverse of š. 9. Let šŗ = (š, šø) be an undirected graph. For any two vertices š¢, š£ ∈ š, define š¢šš£ if there is a path from š¢ to š£. 10. Let šŗ = (š, šø) be a directed graph. For any two vertices š¢, š£ ∈ š, define š¢šš£ if there is a directed path from š¢ to š£. Exercise 1.2.5. Give an example of a relation š on a set š for each of the following cases. 1. š is reflexive and symmetry, but not transitive. 2. š is reflexive and transitive, but not symmetry. 3. š is symmetry and transitive, but not reflexive. Definition 1.2.4. Let š be an equivalence relation on š. For š ∈ š, we define a class cl(š) := {š„ ∈ š : š„ šš}. The reflexive property says that š ∈ (š) for all š ∈ š. So, we can write š = ∪ cl(š). š ∈š Lemma 1.2.1. For any š, š ∈ š, either cl(š) = cl(š) or cl(š) ∩ cl(š) = ∅. Proof. Exercise. Remark. Lemma 1.2.1 says that an equivalence relation š on š induces a partition on š. That is, š can be written as the union of disjoint classes. If we consider the graph in item 9 to be a forest, then each class represents exactly one tree in the forest. Exercise 1.2.6. Express Z as the union of disjoint classes for the relation defined in Example 1.2.3. 1.3 Mathematical Induction Mathematical induction (or simply induction) is an important tool for proving various mathematical statements š(š) which depend on positive integer š. One of the widely use applications of it is proving formulas. Theorem 1.3.1 (Mathematical induction). Let š(š) be a statement about positive integers such that: 1. š(1) is true. 2. If š(š) happens to be true for some integers š ≥ 1, then š(š + 1) is also true. Then, š(š) is true for all š ≥ 1. Proof. Suppose that the theorem is false. Then, by well-ordering property2 , there exists a least integer š ≥ 1 such that š(š) is not true. Since š(1) is true, so š > 1. Note that 1 ≤ š − 1 < š. So, by choice of š, š(š − 1) is true. By the 2nd property (item 2), š(š) is true, which is a contradiction. This completes the proof. 2 Every non-empty subset of N has least element. 6 The item 1 in Theorem 1.3.1 is called initial/base/basis step3 , whereas the item 2 is called induction step. The first part of the item 2, that is, “š(š) happens to be true for some integers š ≥ 1” is referred to as induction hypothesis. We now see some proofs of statements using mathematical induction. 1. Show that 1 + 2 + · · · + š = š(š + 1)/2. Let š(š) denote the statement 1 + 2 + · · · + š = š(š + 1)/2. It is immediate that š(1) is true. Let us assume that š(š) for some š ∈ N (induction hypothesis). We show that š(š + 1) is true. In fact, 1 + 2 + · · · + š + (š + 1) = (1 + 2 + · · · + š) + (š + 1) š (š + 1) = + (š + 1) [by induction hypothesis: š(š) is true] 2 (š + 1) (š + 2) = . 2 2. Show that 3|(š3 − š) for all š ≥ 1. Let š(š) denote the statement 3|(š3 − š). It is immediate that š(1) is true. Let us assume that š(š) for some š ∈ N (induction hypothesis). We show that š(š + 1) is true. Indeed, (š + 1) 3 − (š + 1) = š 3 + 3 · š 2 + 3 · š + 1 − (š + 1) = š3 + 3 · š2 + 2 · š = š3 − š + 3 · š2 + 3 · š = (š 3 − š) + 3(š 2 + š) (1.1) By induction hypothesis, the first term in the RHS of Equation 1.1 is divisible by 3 and obviously, the 2nd term is also divisible by 3. Therefore, 3|(š + 1) 3 − (š + 1). 3. If š is prime and š|š 1 š 2 · · · š š , then show that š|š š for some š ∈ [š]. Let š(š) denote the statement š|š 1 š 2 · · · š š . Obviously, š(1) is true. Also, š(2) is true. How? Let us assume that š(š) is true for some š. We show that š(š + 1) is true, that is, if š|š 1 š 2 · · · š š š š+1 , then š| š š for some š ∈ [š + 1]. We write š 1 š 2 · · · š š š š+1 = š · š š+1 , where š = š 1 š 2 · · · š š . Now š|š 1 š 2 · · · š š š š+1 =⇒ š|š · š š+1 . Since š(2) is true, we have either š|š or š|š š+1 . If š|š, then š|š š for some š ∈ [š] (as š(š) is true), otherwise, š|š š+1 . This completes this proof. Exercise 1.3.1. Using induction solve the following problems. 1. Prove that 12 + 22 + · · · + š2 = 1 6 · š(š + 1) (2š + 1). 2. Let š and š be two sets with |š| = |š | = š. Then, show that the number injective functions from š to š is š!. 3. Show that the number of arrangements of š objects is š!. 4. Let š“ be s set with | š“| = š. Then, show that P ( š“) = 2š . 5. Prove the binomial theorem, that is, š (š + š) = š Õ š · š š−š · š š š š=0 for all š ≥ 1. 3 In general, the base step can commence from any non-negative integer š, and induction will subsequently ensure that š(š) is true for all š ≥ š. 7 6. Generalize Problem 2. That is, if š is any prime number, then show that š|(š š − š). Hint: binomial theorem. 7. As observed, Theorem 1.3.1 ensures that š(š) is true for all š ≥ 1. Can we extend the theorem to ensure that š(š) is true for all š ≥ š, where š ∈ Z? Justify your answer. Remark 1.3.2. The induction explained in Theorem 1.3.1 is known as weak induction. Additionally, there is the concept of strong induction, which you can explore on your own. 1.4 Basics of Functions Like sets, functions are also fundamental objects in mathematics. In the literature, functions are also know as maps or mappings. Definition 1.4.1 (Function). Let š and š be two nonempty sets. Then a function š from š to š, denoted by š : š → š, is a binary relation on š and š such that for every š ∈ š, ∃! š” ∈ š such that the ordered pair (š , š”) is in š . The unique point š” is called the image of š under š , that is, š” = š (š ). The sets š and š are called domain and codomain of š respectively. Example 1.4.1. (Identity.) Let š be any set. Then, define šš : š → š by š (š ) = š for all š ∈ š. šš is called identity function on S. Example 1.4.2. (Constant.) Let š and š be two nonempty sets and š”0 ∈ š be a fixed element of š. Let a function š : š → š be defined by š (š ) = š”0 for all š ∈ š. This is called constant function. Example 1.4.3. (Projection.) The function š : š × š −→ š defined by š (š , š”) = š for all (š , š”) ∈ š × š is called projection of š × š on š. Example 1.4.4. Let š : Z −→ N ∪ {0} be defined by š (š ) = |š | (absolute value) ∀š ∈ Z. Example 1.4.5. Let š : Z −→ Z be defined by š (š ) = š + 1 ∀š ∈ Z. Example 1.4.6. Let š : N −→ Z be defined by ( š /2 š (š ) = (1 − š )/2 1.4.1 if š is even if š is odd. Injective, Surjective, Bijective, Composition, and Inverse Let š : š −→ š be a function with domain š and codomain š. The range of š is defined by š (š) = { š (š ) : š ∈ š}. Note that š (š) is a subset of š. For an element š” ∈ š, its inverse image is a set defined by š −1 (š”) = {š ∈ š : š (š ) = š”}. Similarly, for an subset š“ ⊆ š, its inverse image set can be defined. In fact, š −1 ( š“) = {š ∈ š : š (š ) ∈ š“}. Definition 1.4.2 (Injective). A function š : š −→ š said to be injective (a.k.a one-one), if for any distinct š 1 , š 2 ∈ š we have š (š 1 ) ≠ š (š 2 ). Exercise 1.4.7. Prove that a function š : š −→ š is injective if and only if ∀š” ∈ š, | š −1 (š”)| ≤ 1. Definition 1.4.3 (Surjective). A function š : š −→ š said to be surjective (a.k.a onto) if š (š) = š. Exercise 1.4.8. Prove that a function š : š −→ š is surjective if and only if ∀š” ∈ š, | š −1 (š”)| ≥ 1. 8 Definition 1.4.4 (Bijective). A function š : š −→ š said to be bijective (a.k.a 1-1 correspondence) if it is both injective and surjective4 . Exercise 1.4.9. Prove that a function š : š −→ š is bijective if and only if ∀š” ∈ š, | š −1 (š”)| = 1. Exercise 1.4.10. Prove or disprove that the functions defined in Examples 1.4.1 to 1.4.6 are bijective. Definition 1.4.5 (Equality). Two functions š1 : š −→ š and š2 : š −→ š are said to be equal, if š1 (š ) = š2 (š ) for all š ∈ š. Definition 1.4.6 (Composition). Let š : š −→ š and š : š −→ š be two functions. Then, the composition of š and š is a function š ā¦ š : š −→ š defined by (š ā¦ š ) (š ) = š( š (š )) for all š ∈ š. Note that in the above definition, we consider Dom(š) = Codom( š ) = š. If we consider š : š −→ š1 and š : š2 −→ š with š1 ≠ š2 , then the basic requirement for defining š ā¦ š : š −→ š is that š (š) ⊆ Dom(š) = š2 . Caveat. In general, š ā¦ š ≠ š ā¦ š . Moreover, š ā¦ š may not be definable. For example, let š : š −→ š and š : š −→ š be defined by š (š ) = 2š for š ∈ š and š(š”) = š” + 1 for š” ∈ š, where š = {1, 2, 3}, š = {2, 4, 6} and š = {3, 5, 7}. It easy to check that š ā¦ š : š −→ š follows the rule: (š ā¦ š ) (š ) = š( š (š )) = š(2š ) = 2š + 1 for š ∈ š. On the other hand, š ā¦ š cannot be defined. Why? Lemma 1.4.1. Let š : š −→ š and š : š −→ š be two functions. Then, prove the following statements. 1. If š and š are surjective, then š ā¦ š : š −→ š is surjective. 2. If š and š are injective, then š ā¦ š : š −→ š is injective. 3. If š ā¦ š : š −→ š is injective, then š is injective. 4. If š ā¦ š : š −→ š is surjective, then š is surjective. Proof. Exercise. Corollary 1.4.2. Let š : š −→ š and š : š −→ š be two functions. Then, the following statements hold. 1. If š and š are bijective, then so is š ā¦ š : š −→ š. 2. If š ā¦ š : š −→ š is bijective, then š is injective and š is surjective. Proof. Immediate! Exercise 1.4.11. Let š : š −→ š and š : š −→ š be two functions. Then, disprove the following statements. 1. If š ā¦ š : š −→ š is surjective, then š is surjective. 2. If š ā¦ š : š −→ š is injective, then š are injective. 3. If š is injective and š is surjective, then š ā¦ š : š −→ š is bijective. 4 Some examples of injective, surjective and bijective functions are given in Figure 1.1. 9 š 1 š 1 š 2 š 2 š 3 š 3 š 4 š 4 5 š Injective, but not surjective Surjective, but not injective š 1 š 1 š 2 š 2 š 3 š 3 š 4 š 4 Neither surjective nor injective Bijective š 1 š 2 š 3 š 4 š −1 (1) = {š, š, š}, š −1 (2) = š −1 (4) = ∅ and š −1 (3) = {š} Figure 1.1: Illustration of injective, surjective and bijective functions and inverse image. Typically, in mathematics we talk about inverse of an object. For example, inverse of 2 is 1/2 (w.r.t multiplication), because (1/2) · 2 = 1 = 2 · (1/2). Notice that a function š : š −→ š associates each element of its domain š to an unique element from its codomain š. The very first question is what is the sense of inverse of a function? Note that composition of functions can be thought of multiplication. Can we formally define the inverse of š : š −→ š w.r.t composition of functions? Definition 1.4.7 (Inverse). A function š : š −→ š is said to be invertible if there exists an function š : š −→ š such that š ā¦ š = šš and š ā¦ š = šš . 10 In the definition, š is called inverse of š , that is š = š −1 and vice verse. Always remember that š is the inverse of š w.r.t composition of functions. You might wonder why do we consider two conditions š ā¦ š = šš and š ā¦ š = šš ? Why not consider only one of them? Look at the following example. Let š = {1} and š = {1, 2}. Let š : š −→ š and š : š −→ š be defined as š (1) = 1 and š(1) = š(2) = 1. Now, check that š ā¦ š = šš , in fact, š( š (1)) = 1. But, š ā¦ š ≠ šš because š (š(2)) = 1 ≠ 2. Example 1.4.12. Let š : R −→ R be defined by š (š„) = 3š„ + 1 for š„ ∈ R. Then the function š : R −→ R defined by š(š¦) = (š¦ − 1)/3 for š¦ ∈ R is the inverse of š . In fact, š( š (š„)) = š(3š„ + 1) = š„ ∀š„ ∈ R. Similarly, š (š(š¦)) = š¦ ∀š¦ ∈ R. Lemma 1.4.3. A function š : š −→ š is bijective iff it is invertible. Proof. Exercise. Exercise 1.4.13. Find the inverses of the functions defined in Examples 1.4.5 and 1.4.6. Lemma 1.4.4. Let š : š −→ š, where š and š are nonempty finite sets. Then, prove the following statements. 1. š is one-one =⇒ |š| ≤ |š |. 2. š is onto =⇒ |š | ≤ |š|. 3. š is one-one and |š| = |š | =⇒ š is bijection. 4. š is onto and |š| = |š | =⇒ š is bijection. Proof. Exercise. Note that items 1 and 2 are also true for any sets (not necessarily finite). 11