Uploaded by tushar.garg.applications

Review discrete math 2

advertisement
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
Download