mm5 Logic and Set Theory
mm5 Logic and Set Theory
Learning Module in
MM5 - Logic and Set Theory
Title: 1 Logic and Proof
Topics: Statement and Open Sentences; Composite Statement; Truth Tables and Logical Equiv-
alence; Quantifiers
Introduction:
Our goal in this section is to understand truth values of statements and how statements
can be combined using logical connectives. Most sentences, such as and “Earth is the closest
planet to the sun, have a truth value. That is, they are either true or false. We call these
sentences statements. Other sentences, such as What time is it? and Look out! are interrogatory
or exclamatory; they express complete thoughts but have no truth value.
Objectives:
Pretest:
Name: Score:
Course/Year/Section: Date:
Determine which of the following are open sentences, true or false statements.
1. 7 + 1 = 8
2. 5 − 3 = 10
Learning Activities:
Example 1.1.2 The first 3 sentences below are statements while the rest are not.
3. 3 + 2 ≥ 7
4. Is it a sunny day?
5. x − 2 > 3
Definition 1.1.3 The truth or falsity of a statement is called its truth value.
In Example 1.1.2, statements (1), (2), (3) have truth values T, T, F, respectively.
Definition 1.1.4 A variable is a symbol in a statement which may be replaced by any element
of a given universal set U . A constant is a fixed element of a set.
Open sentences are usually denoted by px , qx , rx , etc. In Example 1.1.2, (5) is an open
sentence. When x is replaced by any real number greater than 5, (5) becomes a true statement.
Otherwise, it becomes a false statement.
Definition 1.1.6 The truth set of an open sentence is the set of elements of the universal set
U whose substitution to the variable converts the sentence into a true statement.
In Example 1.1.2, the truth set of (5) is the set {x ∈ R : x5}or the open interval (5, +∞).
Example 1.2.2 Here are four negations of the statement “Melai is a girl ”.
d. Melai is a boy.
Definition 1.2.3 Any two statements p and q combined by the word “and ” (or its equivalent:
but, yet, while, etc.) form a composite statement called the conjunction of p and q, and is
denoted by p ∧ q.
Example 1.2.4
1. p: Ali is a Maranao.
q: Ali lives in Metro Manila.
p ∧ q : Ali is a Maranao, but he lives in Metro Manila
3. Cory Aquino is a president of the Philippines while Kris Aquino is a Miss Philippines
winner.
4. 4 < π < 7
The conjunction p ∧ q is true precisely when p and q are both true. Otherwise, p ∧ q is
false. In Example 1.2.4, statement (2) is true; (3) and (4) are false.
Definition 1.2.5 Any two statements p and q combined by the word “or ” forms a composite
statement called the disjunction of p and q, and is denoted by p ∨ q.
Example 1.2.6
1. p: Alvin studies calculus.
q: Alvin studies psychology.
r Alvin likes history.
p ∨ r : Either Alvin studies calculus, or he likes history.
p ∨ q : Alvin either studies calculus, or he studies psychology.
2. 3 ≤ 5
The disjunction p ∨ q is false precisely when p and q are both false. Otherwise, p ∨ g is
true. In Example 1.2.6, statement (3) is false; (2),(4) and (5) are true.
Definition 1.2.7 A composite statement of the form “if p, then q” is called a conditional
statement and is denoted by p → q.
2. p implies q.
3. p only if q.
1. If 2 + 3 = 5, then 5 − 3 = 2
In Example 1.2.8 statement (4) is false; all the others are true.
Definition 1.2.9 A composite statement of the form ”p if and only if q”is called a bicondi-
tional statement and is denoted by p ↔ q.
1. 2 · 6 = 12 if and only if 12 ÷ 2 = 6
3. 32 + 3 = 12 if and only if 33 = 9
√ √ √ √ √
4. 3 27 + 9 = 5 36 if and only if 3 27 + 9 = 6
In Example 1.2.10, statements (1) and (2) are true while (3) and (4) are false.
As a summary, the truth values of the composite statements which involve two substate-
ments p and q in different cases are shown in the table below.
Converse of p → q : q→p
Inverse of p → q : ¬p → −q
Contrapositive of p → q : ¬q → ¬p
Exercise Determine the contrapositive, converse and inverse of the following statements:
The table above is a truth table for the different composite statements involving 2 simple
statements p and q with 4 truth value combinations or cases as shown in the 4 rows.
Hence, a truth table with n simple statements has 2n rows. The next definition deals
with logical equivalence where the term logic means “correct reasoning”.
Definition 1.4.2 Two statements P (p, q, r, . . .) and Q(p, q, r, . . .) are said to be logically equiv-
alent, denoted by
P (p, q, r, . . .) ≡ Q(p, q, r, . . .)
if their truth tables are identical.
Example 1.4.3 One mat verify using truth tables that the following laws hold:
1. (p → q) ∧ (q → p) ≡ (p ↔ q)
2. (p → q) ≡ (¬p ∨ q)
3. p → (q ∧ r) ≡ (p → q) ∧ (p → r)
4. ¬(p → q) ≡ (p ∧ ¬q)
To appreciate the logical equivalence in Example 1.4.3 (4) and (5), the negation of the
different composite statements may be restated as shown in what follows:
Example 1.4.4
2. It is false that San Miguel team won or Danny Siegel scored 40 points.
Restatement: The San Miguel team lost, and Danny Siegel did not score 40 points.
3. It is not true that if Claudine studies hard, then she passes MM5.
Restatement: Claudine studies hard, but she does not pass MM5 anyway.
Definition 1.4.5 A statement that is always true a tautology. On the other hand, a statement
that is always false is called a contradiction.
Example 1.4.6 Verify using truth tables that the following statements are tautologies:
Name Tautology
1. p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
4. (p → q) ≡ (¬p ∨ q)
1.5 Quantifiers
Definition 1.5.1 Let px be an open statement on the universal set U whose truth set is P .
Then (∀x ∈ U, px ) or (∀x, px )is a statement which reads “for every element x in U , px is true.”
The quantified statement (∀x ∈ U, px ) is true if the truth set P = U , that is, its truth set
is the universal set. The symbol ∀, which reads for all or for every, is called the universal
quantifier.
Note: An open statement px does not have a truth value. But px with a quantifier is a statement
and has a truth value.
Example 1.5.6 How do we prove that an assertion like (∀x ∈ R, x> 0) is false? According
to I, we need to find one x for which it is not true that x2 > 0. This element x is called a
counterexample. Here, 0 is a counterexample.
Exercise
I. Find the negation of the following statements
1. ∀x, x + 2 = x.
2. ∀n ∈ N, n + 4 > 3.
3. ∃n ∈ N, n + 4 < 7.
1. ∀x ∈ N, |2x + 4| ≥ 8
√
2. ∃x ∈ R, 3x2 − 26 = 7
Self Evaluation:
Name: Score:
Course/Year/Section: Date:
Let p be ”Ganddalf the Grev is the white wizard.”, and let q be ”Frodo is the ring bearer.” .
Give a simple verbal description of each of the following statements.
1. q ∨ ¬p
2. p ↔ −q
3. (p ∧ −q) → p
Let p be ”He is rich”, q be ”He is happy”, and r be ”He is healthy”. Write each statement in
symbolic form using p, q, and r.
4. He is happy if and only if he is rich and healthy.
Review of Concepts:
• A statement is an ordinary declarative sentence which is so precisely stated it is either
true (T) or false (F) but not both.
• The negation of a statement p is a statement whose truth value is precisely the opposite
of the truth value of p, and is denoted by ¬p.
• Any two statements p and q combined by the word “and ” (or its equivalent: but, yet, while,
etc.) form a composite statement called the conjunction of p and q, and is denoted by
p ∧ q.
• Any two statements p and q combined by the word “or ” forms a composite statement
called the disjunction of p and q, and is denoted by p ∨ q.
• A composite statement of the form “if p, then q” is called a conditional statement and
is denoted by p → q.
• A composite statement of the form ”p if and only if q”is called a biconditional statement
and is denoted by p ↔ q.
• Summary of truth values of the composite statements which involve two substatements p
and q in different cases:
Posttest:
Name: Score:
Course/Year/Section: Date:
2. p → (q ↔ r) ≡ ¬p ∨ [(q → r) ∧ (r → q)]
Let S = {1, 2, 3, 4, 5}. Determine the truth value of the following statements:
3. ∃x ∈ S, x + 2 > 5
4. ∀x ∈ S, x + 4 ≤ 2
5. ∃x ∈ S, 5x + 7 ≥ 12
5x − 3
6. ∃x ∈ Z : = −9
2
Determine the truth value of each of the following composite statements.
References:
Learning Module in
MM5 - Logic and Set Theory
Title: 2 METHODS OF PROOF
Introduction:
You wont find truth tables displayed or referred to in proofs that you encounter in
mathematics: It is expected that readers are familiar with the rules of logic and correct forms
of proof. As a general rule, when you write a step in a proof, ask yourself if deducing that step
is valid in the sense that it uses the rules of logic. If the step follows as a result of the use of
a tautology, it is not necessary to cite the tautology in your proof. In fact, with practice you
should eventually come to write proofs without purposefully thinking about tautologies. What
is necessary is that every step be justifiable.
Objectives:
1. Prove different kinds of statements using the appropriate method of proof.
2. Perform the different kinds of methods of proofs.
Pretest:
Name: Score:
Course/Year/Section: Date:
Definition 2.1.1 Definition A direct proof is a procedure for proving the truth of P → Q.
First we assume that P is true. Then we build an argument, using a chain of implications,
leading directly to the conclusion that Q is a true statement.
Since P → Q is false only when P is true and Q is false, it suffices to show that this
situation cannot happen. The direct way to proceed is to assume that P is true and show
(deduce) that Q is also true. A direct proof of P → Q will have the following form:
Proof : (The theorem has the form P → Q, where P is “ x is odd” and Q is “ x + 1 is even.”
) Let x be an integer. (We may assume this hypothesis since it is given in the statement of the
theorem.) Suppose x is odd. (We assume that the antecedent P is true. The goal is to derive
the consequent Q as our last step.) From the definition of odd, x = 2k + 1 for some integer k.
(This deduction is the replacement of P by an equivalent statement-the definition of ”odd.” We
now have an equation to use.) Then x + 1 = (2k + 1) + 1 for some integer k. (This is another
replacement using an algebraic property of N.) Since (2k + 1) + 1 = 2k + 2 = 2(k + 1), x + 1 is
the product of 2 and an integer. ( Another equivalent using algebra.) Thus x + 1 is even. (We
have deduced Q.)
Therefore, if x is an odd integer, then x + 1 is even. ( We conclude that P → Q.) 2
In this example, we did not worry about what would happen if x were not odd. Remember
that it is appropriate to assume P is true when giving a direct proof of P → Q. (If P is false, it
does not matter what the truth of Q is; the statement we are trying to prove, P → Q, will be
true.) The process of assuming that the antecedent is true and proceeding step by step to show
the consequent is true is what makes this type of proof direct.
This example also includes parenthetical comments offset by (. . .) and in italics to
explain how and why a proof is proceeding as it is. Such comments are not a requisite part of
the proof, but are inserted to help clarify the workings of the proof. The proof above would
stand alone as correct with all the comments deleted, or it could be written in shorter form, as
follows.
Proof : Let x be an integer. Suppose x is odd. Then x = 2k + 1 for some integer k Then
Example 2.1.4 Prove that if n and m are integers and 3 is a factor of both n and m, then 3 is
a factor of nx + my where x and y are integers.
Proof : Let n and m be integers such that 3 is a factor of both n and m. Then n = 3k and
m = 3l for some integers k and l. Thus, for any integers x and y
Definition 2.2.1 A proof by contrapositive uses the fact that an implication and its contra-
positive are equivalent. So. if we can prove that the contrapositive is true, then we may conclude
that the original implication is also true
Proof : Suppose that the integer m is not even. (Suppose ¬Q.) Then m is odd so m = 2k + 1
for some integer k. Then
m2 = (2k + 1)2 = 4k 2 + 4k + 1 = 2 2k 2 + 2k + 1
Proof : Assume that x ≤ 0 and y ≤ 0. (We are assuming that the conclusion is false.) Then
x + y ≤ x + 0 = x ≤ 0. Thus, x + y ≤ 0, which means that the hypothesis is false. This proves
the contrapositive, hence the assertion is true. 2
Proof : Suppose that x is odd and x2 is even. (We are assuming that the hypothesis is true, and
the conclusion is false.) Then x = 2a + 1 and x2 = 2b for some integers a and b. Thus,
Hence,
1 = 2b − 2(2a2 + 2a) = 2[b − (2a2 + 2a)].
But [b − (2a2 + 2a)] is clearly an integer, so the last equation implies that 1 is divisible by 2 with
the integer [b − (2a2 + 2a)] as quotient. This is not true because if we divide 1 by 2 the quotient
is 21 and this is not an integer. Hence, we cannot assume that the assertion is false. Therefore,
it must be true. 2
2.4 Proof of Biconditional State
Since p ↔ q is logically equivalent to (p → q) ∧ (q → p), the following definition hold.
Definition 2.4.1 A proof of a biconditional statement ↔ consists of two parts, one is by
proving that p → q is true and other is by proving that q → p is true.
Note: In constructing a proof of a biconditional statement, the previous methods of proof
maybe employed as shown in the following example.
Example 2.4.2 Prove that for x, y ∈ Z, xy is divisible by 2 if and only if x or y is divisible by
2.
Proof : Let x and y be integers.
(←) Suppose that x is divisible by 2. Then x = 2k for some integer k. Thus, xy = 2ky is
divisible by 2 since ky ∈ Z. Also, if y is divisible by 2, then y = 2l for some l ∈ Z. Thus,
xy = x(2l) = 2(xl) is again divisible by 2 since xl ∈ Z. Hence, if x or y is divisible by 2, then
xy is divisible by 2.
Self Evaluation:
Name: Score:
Course/Year/Section: Date:
Review of Concepts:
• A direct proof is a procedure for proving the truth of P → Q. First we assume that P
is true. Then we build an argument, using a chain of implications, leading directly to the
conclusion that Q is a true statement.
• A proof by contrapositive uses the fact that an implication and its contrapositive are
equivalent. So. if we can prove that the contrapositive is true, then we may conclude that
the original implication is also true.
• A proof by contradiction is based on the fact that a statement is either true or false.
So instead of showing that an assertion is true directly, we may show that it cannot be
false. Then we conclude that it must be true.
Posttest:
Name: Score:
Course/Year/Section: Date:
Prove the following statements and indicate what method of proof is used.
References:
Learning Module in
MM5 - Logic and Set Theory
Title: 3 METHODS OF PROOF II
Topics: Mathematical Induction; The Sigma Notation; Equivalent Forms of Induction; Proofs
Involving Quantifiers
Introduction:
In this chapter, other proof methods are discussed. This includes the principle of math-
ematical induction which is usually used to prove assertions concerning the positive integers.
This method has practically nothing to do with the so-called inductive reasoning, wherein gen-
eralizations are based a large number of experimental observations. Actually, it is deductive in
nature, and it leads to a definite conclusion.
Objectives:
1. Use the Principle of Mathematical Induction in proving assertions concerning the positive
integers.
Pretest:
Name: Score:
Course/Year/Section: Date:
1. 4! (n + 2)!
5.
n!
2. 7!
97! (n + 3)!
3. 6.
96! (n + 1)!
8!
4. 7. (n2 + 3n + 2) n!
3! · 5!
Learning Activities:
ii. Verify the inductive property: If, for any integer k ≥ m, Pn is true for
n = k, then it is also true for n = k + 1, and
i. When n = 1, then P1 is “1 = 12 ,” which is true (there is only one term at the left-hand-side
(LHS) of P1 ). Thus, P1 is true.
1 + 3 + 5 + · · · + (2k − 1) = k 2 . (3.1)
Now we shall prove that Pn is also true for n = k + 1, that is, we have to show that
Observe that the LHS of equation (3.2) can be obtained from the LHS of equation (3.1)
simply by adding the term [2(k + 1) − 1] to both sides of equation (3.1). Thus.
Therefore,
1 + 3 + 5 + · · · + (2k − 1) + [2(k + 1) − 1] = (k + 1)2
and Pn is true when n = k + 1
iii. By the PMI, the given formula Pn : 1 + 3 + 5 + · · · + (2n − 1) = n2 , holds for all integers
n ≥ 1.
i. When n = 1, P1 is the statement “13 − 1 is divisible by 3”, which is certainly true, since
13 − 1 = 0.
k 3 − k is divisible by 3. (3.4)
Next we shall prove that Pn is also true for n = k + 1, that is, we shall prove that
Observe that
(k + 1)3 − (k + 1) = k 3 + 3k 2 + 3k + 1 − (k + 1)
= k3 − k + 3 k2 + k + 1 − 1
= k3 − k + 3 k2 + k
k + 3 < 5k 2 (3.6)
Next we shall prove that Pn is also true for n = k + 1, that is, we shall prove that
Observe that
(k + 1) + 3 = k + 3 + 1
< 5k 2 + 1 by (3.6)
2
< 5k + 10k + 5
= 5(k + 1)2 .
Thus, (3.7) is true, that is, Pn is true when n = k + 1.
Definition 3.2.1 The upper case Σ of the Greek letter sigma is the standard mathematical
symbol for sums. If x1 , x2 , x3 , x4 , . . . , xn are real (or complex) numbers, then the sum of these
numbers is denoted by
Xn
xi = x1 + x2 + x3 + · · · + xn .
i=1
The left-hand side is read as “the sum of the xi as the index i ranges from 1 to n”.
We can also allow xi to have the same constant value for all i, that is, xi = c for all i.
Thus,
n
X n
X
xi = c = c + c + c + · · · + c = nc.
i=1 i=1
Note that every value of the index i corresponds to one term of the long sum.
Similarly, the notation for products uses the capital Greek letter Π. For example
4
Y
i2 + 1 = 2 · 5 · 10 · 17 = 1700
i−1
n
Y (2n)!
Proof : Let Pn be the statement (4i − 2) = .
i=1
n!
1
Y (2 · 1)!
i. The statement is true for n = 1 because (4i − 2) = 2 and = 2.
i=1
1!
ii. Assume now that Pn is true for n = k. In other words, assume that
k
Y (2k)!
(4i − 2) = (3.8)
i=1
k!
Next we shall prove that Pn is also true for n = k + 1, that is, we shall prove that
k+1
Y (2(k + 1))!
(4i − 2) = (3.9)
i=1
(k + 1)!
n
X
5. 2i = 2 (2n − 1) , for all integers n ≥ 1.
i=1
n
X 1 1
6. i
= 1 − n , for all integers n ≥ 1.
i=1
2 2
This form of induction begins with the assumption that a statement is true for
every natural number less than n and shows that the statement is also true for
n. Thus, we are allowed to assume the statement is true for each of all the way
through n − 1 rather than just for n − 1.
Notice that the statement of the PCI does not require a basis step in which we show that
1 ∈ S. Nevertheless, for n = 1, the PCI property has the form
∅ ⊆ S ⇒ 1 ∈ S,
which is equivalent to 1 ∈ S. Practically speaking then, it is almost always best to begin a PCI
proof by verifying that 1 is in S. Sometimes special consideration is also needed for n = 2 or
larger integers.
Our first example of a proof using the PCI revisits the first example from Example 3.1.1.
Suppose m is a natural number and also that {1, 2, 3, . . . , m − 1} ⊆ S. In the special case that
m = 1, we note that 1 = 12 and so m ∈ S. Otherwise, m − 1 ∈ S
To prove a proposition of the form we must show that is true for every object x in the
universe. A direct proof is begun by letting x represent an arbitrary object in the universe, and
then showing that is true for that object. In the proof we may use only properties of x that are
shared by every element of the universe. Then, since x is arbitrary, we can conclude that is true.
Thus a direct proof of (∀x)P (x) has the following form: (∀x)P (x)
A review of the proof examples in the previous chapter shows that whenever the state-
ment was universally quantified, the proof given had the form of a complete proof, because each
begins with an assumption such as “Let x be an integer” or “Let x and y be real numbers.”
Example 3.4.1 Prove that for every natural number n, 4n2 − 6.8n + 2.88 > 0
Proof : The statement has the form (∀x)P (x), where the universe is N and P (x) is
”4n2 − 6.8n + 2.88 > 0.′′ i Let n be a natural number. Then n ≥ 1, so n − .8 and n − .9
are both positive. Therefore 4(n − .8)(n − .9) = 4n2 − 6.8n + 2.88 is positive. We conclude that
4n2 − 6.8n + 2.88 > 0 for all natural numbers n. 2
It is essential in a direct proof of (∀x)P (x) that the first step assume nothing about x
other than it is an object in the universe. In the example above there are two assumptions
about the variable x− for two very different reasons. The assumption “Let x ∈ Z” appears first
because we are assuming x is an object in the universe. We make the statement “Assume x is
even” because we are initiating a direct proof of a conditional sentence, which starts by assuming
the antecedent.
It is a mistake to give an example (or several examples) of the statement “If x is even,
2
then x is even” and then claim that the statement has been proved for all natural numbers n.
Examples may sometimes help decide whether a statement is true. Examples can also help guide
our thinking about how to proceed with a proof. However, we cannot prove that a universally
quantified statement is true by showing that it’s true for selected values of the variable.
x+y
Example 3.4.2 For all rational numbers x and y, is a rational number.
2
Proof : (The statement has the form (∀x)(∀y)P (x, y), where the universe is Q and P (x, y) is
“ x+y
2
is rational.” i Let x and y be rational numbers. Then
x+y 1 p s 1 pt + qs pt + qs
= + = =
2 2 q t 2 qt 2qt
Both pt + qs and 2qt are integers and 2qt 6= 0. (The sums and products of integers are integers.
x+y
The product of three nonzero numbers is not zero. i Therefore, is a rational number. 2
2
The method of proof by contradiction is often used to prove statements of the form
(∀x)P (x). Since ∼| (∀x)P (x) is equivalent to (∃x) ∼ P (x), the form of the proof is as follows:
A proof of a statement about unique existence always involves multiple quantifiers. The
standard technique for proving a proposition of the form (∃!x)P (x) is based on proving the
equivalent statement: (∃x)P (x) ∧ (∀y)(∀z)[P (y) ∧ P (z) ⇒ y = z]. Since the main connective is
a conjunction, the method will have two parts:
Example 3.4.3 Every nonzero real number has a unique multiplicative inverse.
Proof : h The statement has the form (∀x ∈ R)(x 6= 0 ⇒ (∃!y ∈ R)(xy = 1) .i Let x 6= 0. h
We show there is a unique real number y such that xy = 1 in two steps: First show that such a
number y exists, and then show that x cannot have two different inverses.i
1
(i) (This part is a constructive proof.) Let y = . Since x 6= 0, y is a real number. Then
x
1
xy = x = 1. Therefore, x has a multiplicative inverse.
x
(ii) Now suppose that y and z are multiplicative inverses for x. (We do not assume that this y
is the same as the y in part (i).) Then xy = 1 and xz = 1, so
xy = xz
xy − xz = 0
x(y − z) = 0
Since x 6= 0, y − z = 0. Therefore y = z
Self Evaluation:
Name: Score:
Course/Year/Section: Date:
Review of Concepts:
• The Principle of Mathematical Induction (PMI) Let Pn be a statement involving
the positive integer n. Let m be a fixed positive integer (usually, we take m = 1 ). Suppose
Posttest:
Name: Score:
Course/Year/Section: Date:
References:
Learning Module in
MM5 - Logic and Set Theory
Title: 4 SET THEORY
Topics: Basic Concept of Set Theory; Set Operations; Extended Set Operations and Indexed
Families of Sets; Principles of Counting
Introduction:
Starting from the theory of sets, one can construct all the the number systems, functions,
calculus, and other areas of mathematics. Thus, the study of sets is the foundation for the entire
structure of mathematics.
This chapter does not develop these construction but does provide some set-theoretic
concepts used throughout the text and advanced mathematics. Section 4.1 and 4.2 provide pre-
side definitions for familiar concepts such as union and intersection. In section 4.3 we extend the
union and intersection operations to collections of sets and discuss how to use indices to orga-
nize a family of sets. Basic methods for counting the elements in a finite set appear in Section 4.3.
Objectives:
Pretest:
Name: Score:
Course/Year/Section: Date:
I. Let A = {1, 3, 5, 7, 9}, B = {0, 2, 4, 6, 8}, C = {1, 2, 4, 5, 7, 8}, and D = {1, 2, 3, 5, 6, 7, 8, 9, 10}.
Find
1. A ∩ B 4. A ∪ (C ∩ D)
2. A − B 5. A ∩ (B ∪ C)
3. A − (B − C) 6. C × (A ∩ B)
II. Let the universe be all real numbers. Let A = [3, 8), B = [2, 6], C = (1, 4), and D = (5, ∞).
Find
1. A ∪ B 4. Ac
2. A ∩ B 5. B − (A ∪ C)
3. B − D 6. (A ∪ C) − (B ∩ D)
Learning Activities:
The set of all integer multiples of 3 is the set 3Z = {3z : x ∈ Z} and this set contains
0, 3, 3, 6, 6, 9, 9, etc.
Note that some ambiguity may arise unless the universe is known. For example, mem-
bership in the set A = {x : x2 − 6x = 0} depends on an agreed upon universe (universal set).
For the universe of real numbers A is {0, 6}, but A is {6} for the universe of natural numbers.
Definition 4.1.1 Let ∅ = {x : x 6= x}.Then ∅ is a set, called the empty set or null set.
It is an axiom that ∅ is a set. Since for every object x in every universe, x is equal
(identical) to x, there are no elements in the collection ∅. That is, the statement x ∈ ∅ is false
for every object x.
Therefore, a proof of the statement A ⊆ B is often a direct proof, taking the form:
Example 4.1.3 Let A = {2, −3} and B = {x ∈ R : x3 + 3x2 − 4x − 12 = 0}. Prove that
A ⊆ B.
Definition 4.1.4 Sets A and B are equal if and only if they have exactly the same elements;
that is,
A = B iff (∀x)(x ∈ A ⇔ x ∈ B).
2
Definition 4.1.6 The set B is a proper subset of the set A iff B ⊆ A and A 6= B. To denote
that B is a proper subset of A, some authors write B ⊂ A and others write B * A. The only
improper subset of A is the A itself.
One of the axioms of set theory asserts that for every set A, the collection of all subsets
of A is also set.
Definition 4.1.7 Let A be a set. The power set of A is the set whose element are the subsets
of A and is denoted P(A). Thus
P(A) = {B : B ⊆ A}.
Notice that the power set of a set A is a set whose elements are themselves sets, specifically
the subsets of A. For example, if A = {a, b, c, d}, then the power set of A is
P(A) ={∅, {a}, {b}, {c}, {d}, {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}
{a, b, c}, {a, b, d}, {a, c, d}, {b, c, d}, A}
Note: When we work with sets whose elements are sets, it is important to recognize the distinc-
tion between “is an element of” and “is a subset of.” To use A ∈ B correctly, we must consider
whether the object A (which happens to be a set) is an element of the set B, whereas A ⊆ B
requires determining whether all objects in the set A are also in B. If x ∈ A and B ⊆ A, the
correct terminology is that A contains x and A includes B.
Example 4.1.8 Example. Let X = {{1, 2, 3}, {4, 5}, 6}. Then X is a set with three elements,
namely, the set {1, 2, 3}, the set {4, 5}, and the number 6.P(X) = {∅, {{1, 2, 3}}, {{4, 5}}, {6},
{{1, 2, 3}, {4, 5}}, {{1, 2, 3}, 6}, {{4, 5}, 6}, X}. The set {{4, 5}} has one element; it is {4, 5}. For
the set X :
6 ∈ X and {4, 5} ∈ X, but 4 ∈ / X.
{4} ∈/ {4, 5} but {4} ⊆ {4, 5}.
{4, 5} * X because 5 ∈ / X.
{6} ⊆ X but {6} ∈ /X .
{6} ∈ P(X) but {6} * P(X)
{{4, 5}} ⊆ X because {4, 5} ∈ X
{4, 5} ∈/ P(X) but {{4, 5}} ∈ P(X)
∅ ⊆ X, so ∅ ∈ P(X), and {∅} ⊆ P(X).
Notice that for the set A = {a, b, c, d}, which has four elements, P(A) has 16 = 24 elements
and for the set X above with three elements, P(X) has 8 = 23 elements. These observations
illustrate the next theorem.
Theorem 4.1.9 If A is a set with n elements, then P(A) is a set with 2n elements.
The set A∪B is a set formed from A and B by choosing as elements the objects contained
in at least one of A or B; A ∩ B consists of all objects that appear in both A and B; and A − B
contains exactly those elements of A that are not in B. The shaded areas in the first three Venn
diagrams of the figure below represent, respectively, the result of forming the union, intersection,
and difference of two sets. These visual representations are often useful for understanding
relationships among sets. However, when there are more than three sets involved, it is difficult
or impossible to use Venn diagrams.
A ∪ B = {1, 2, 3, 4, 5, 7, 9},
A ∩ B = {1, 5},
A − B = {2, 4, 7},
B − A = {3, 9}.
Example 4.2.5 The sets {1, 2, b} and {−1, t, ν, 8} are disjoint. The set of even natural numbers
and the set of odd natural numbers are disjoint. The intervals (0, 1) and [1, 2] are disjoint, but
(0, 1] and [1, 2] are not disjoint because they both contain the element 1
Note that simply drawing a Venn diagram does not constitute a proof. Each statement
requires a confirmation of the relationship between the sets by using the set operation definitions.
We prove parts (b), (f ), (h), (m), and (p) and leave the others as exercises.
(a) A ⊆ A ∪ B.
(b) A ∩ B ⊆ A
(c) A ∩ ∅ = ∅
(d) A ∪ ∅ = A.
(e) A ∩ A = A.
(f) A ∪ A = A.
(g) A ∪ B = B ∪ A.
(i) A − ∅ = A.
(j) ∅ − A = ∅.
(k) A ∪ (B ∪ C) = (A ∪ B) ∪ C
(m) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
(o) A ⊆ B iff A ∪ B = B.
(p) A ⊆ B iff A ∩ B = A.
(q) If A ⊆ B, then A ∪ C ⊆ B ∪ C.
(r) If A ⊆ B, then A ∩ C ⊆ B ∩ C.
Proof :
(b) hWe must show that, if x ∈ A ∩ B, then x ∈ Ai. Suppose x ∈ A ∩ B. Then x ∈ A and
x ∈ B. Therefore x ∈ A. hWe used the tautology P ∧ Q ⇒ Q.i
(h) h This biconditional proof uses the definition of intersection and the equivalence of P ∧ Q
and Q ∧ P.i
x ∈ A ∩ B iff x ∈ A and x ∈ B
iff x ∈ B and x ∈ A
iff x ∈ B ∩ A
(m) hAs you read this proof, watch for the steps in which the definitions of union and intersec-
tion are used (two for each).i
x ∈ A ∩ (B ∪ C) iff x ∈ A and x ∈ B ∪ C
iff x ∈ A and (x ∈ B or x ∈ C)
iff (x ∈ A and x ∈ B) or (x ∈ A and x ∈ C)
iff x ∈ A ∩ B or x ∈ A ∩ C
iff x ∈ (A ∩ B) ∪ (A ∩ C)
Therefore A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
(p) h We give separate proofs for each implication, making use of earlier parts of this theorem.i
First, assume that A ⊆ B. We must show that A ∩ B = A. Suppose x ∈ A. Then from
the hypothesis A ⊆ B, we have x ∈ B. Therefore x ∈ A and x ∈ B, so x ∈ A ∩ B. This
shows that A ⊆ A ∩ B, which, combined with A ∩ B ⊆ A from part (b) of this theorem,
gives A ∩ B = A.
Second, assume that A ∩ B = A. We must show that A ⊆ B. By parts and (h) of this
theorem, we have B ∩ A ⊆ B and B ∩ A = A ∩ B. Therefore, A ∩ B ⊆ B. By hypothesis,
A ∩ B = A, so A ⊆ B
2
Definition 4.2.7 Let U be the universe and A ⊆ U . The complement of A is the set Ac =
U −A
The set Ac is the set of all elements of the universe that are not in A.
For the set A = {2, 4, 6, 8}, we have Ac = {10, 12, 14, 16, . . .} if the universe is all even
natural numbers, while Ac = {1, 3, 5, 7, 9, 10, 11, 12, 13, . . .} if the universe is N.
The next theorem includes several results about the relationships between complementa-
tion and the other set operations.
Theorem 4.2.8 Let U be the universe, and let A and B be subsets of U . Then
(a) (Ac )c = A
(b) A ∪ Ac = U
(c) A ∩ Ac = ∅.
(d) A − B = A ∩ B c .
(e) A ⊆ B iff B c ⊆ Ac .
(f) (A ∪ B)c = Ac ∩ B c
(g) (A ∩ B)c = Ac ∪ B c De Morgan’s Laws
(h) A ∩ B = ∅ iff A ⊆ B c .
Proof :
(e) hThis is a two-part proof. The first part is an element chasing proof. The second part is
proved using the first part.i
(Show that if A ⊆ B then B c ⊆ Ac . ) Assume that A ⊆ B. Suppose x ∈ B c Then x ∈ / B.
c c c
Since A ⊆ B and x ∈ / B, we have x ∈/ A. Therefore, x ∈ A . Thus, B ⊆ A .
(Show that if B ⊆ A , then A ⊆ B.) Assume that B c ⊆ Ac . Then by part (1), (Ac )c ⊆
c c
(f)
x ∈ (A ∪ B)c iff x ∈ / A∪B
iff it is not the case that x ∈ A or x ∈ B
iff x ∈
/ A and x ∈/B
iff x ∈ Ac and x ∈ B c
iff x ∈ Ac ∩ B c
We also say the ordered n -tuples (a1 , a2 , . . . , an ) and (c1 , c2 , . . . , cn ) are equal iff ai = ci
for i = 1, 2, . . . , n. Thus the ordered 5 -tuples (4, 9, 5, 0, 1), (5, 4, 9, 0, 1) and (0, 1, 4, 5, 9) are all
different.
Definition 4.2.9 Let A and B be sets. The product (or cross product) of A and B is
A × B = {(a, b) : a ∈ A and b ∈ B}
We read A × B as ” A cross B.”
The set A × B is the set of all ordered pairs having first coordinate in A and second
coordinate in B. The cross product is sometimes called the Cartesian product of A and B, in
honor of Ren Descartes.
A × B = {(1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4)}
The product of three or more sets is defined similarly. For example, for sets A, B, and
C, A × B × C = {(a, b, c) : a ∈ A, b ∈ B, and c ∈ C}.
Some useful relationships between the cross product of sets and the other set operations
are presented in the next theorem.
(a) A × (B ∪ C) = (A × B) ∪ (A × C)
(b) A × (B ∩ C) = (A × B) ∩ (A × C)
(c) A × ∅ = ∅.
(d) (A × B) ∩ (C × D) = (A ∩ C) × (B ∩ D).
(e) (A × B) ∪ (C × D) ⊆ (A ∪ C) × (B ∪ D)
(f) (A × B) ∩ (B × A) = (A ∩ B) × (A ∩ B).
Proof :
(a) (Since both A×(B ∪C) and (A×B)∪(A×C) are sets of ordered pairs, their elements have
the form (x, y). To show that each set is a subset of the other we use an ”iff argument.” i
(x, y) ∈ A × (B ∪ C) iff x ∈ A and y ∈ B ∪ C
iff x ∈ A and (y ∈ B or y ∈ C)
iff (x ∈ A and y ∈ B) or (x ∈ A and y ∈ C)
iff (x, y) ∈ A × B or (x, y) ∈ A × C
iff (x, y) ∈ (A × B) ∪ (A × C)
Therefore, A × (B ∪ C) = (A × B) ∪ (A × C)
Throughout this section we will use script letters, A , B, C , . . . to denote families of sets.
For example,
A = {{1, 2, 3}, {3, 4, 5}, {3, 6}, {2, 3, 6, 7, 9, 10}}
is a family of four sets. Notice that 5 ∈ {3, 4, 5} and {3, 4, 5} ∈ A , but 5 ∈
/ A.
This symbolic statement expresses the direct relationship between the union over a family and
the existential quantifier ∃. To show that an object is in the union of a family, we must show
the existence of at least one set in the family that contains the object.
[
Example 4.3.2 For the family A of four sets given above, A = {1, 2, 3, 4, 5, 6, 7, 9, 10}.
A∈A
The figure below is a Venn diagram showing the union and intersection over the family
M = {RS, T }.
Proof :
\
(a) Let A be a family of sets and B ∈ A . Suppose x ∈ A. Then x ∈ A for every A ∈
A∈A
A. hNotice that the set A in the last sentence is a dummy symbol. It stands
\ for any set in
the family. The set B is in the family. i In particular, x ∈ B. Therefore A ⊆ B.
A∈A
(b) The proof that B is a subset of the union over A is left as exercise.
(c) Let
\ A be a nonempty
[ family. Choose
\any set[
C ∈ A . By parts (a) and (b)
A⊆C⊆ A and therefore, A⊆ A.
A∈A A∈A A∈A A∈A
Example 4.3.6 Let B be the collection {Bn : n ∈ N}, where [Bn = {0, 1, 2, . . . , n}.
\ Members of
B include B2 = {0, 1, 2} and B6 = {0, 1, 2, 3, 4, 5, 6}. Then B = N ∪ {0} and B = {0, 1}.
B∈B B∈B
It is often helpful to associate an identifying tag, or index, with each set in a family of
sets. In the example above, each natural number n corresponds to a set Bn . By specifying the
index, as we did when we selected n = 2 or 6, we specified the corresponding set. By specifying
a set of indices, we can specify the family of sets we want to consider.
Definition 4.3.7 Let ∆ be a nonempty set such that for each α ∈ ∆ there is a corresponding
set Aα . The family {Aα : α ∈ ∆} is an indexed family of sets. The set ∆ is called the
indexing set and each α ∈ ∆ is an index .
An index is simply a label that provides a convenient way to refer to a certain set.
Example 4.3.8 For all n ∈ N, let An = {n, n + 1, 2n}. Then A1 = {1, 2}, A2 = {2, 3, 4},
A3 = {3, 4, 6}, and so forth. The set with index 10 is A10 = {10, 11, 20}. Except for the
set A1 , every set in the family {Ai : i ∈ N} has 3 elements. To form the family of sets that
contains only A2 , A3 , A10 , and A15 , we change the index set as follows: {A2 , A3 , A5 , A10 } =
{Ai : i ∈ {2, 3, 10, 15}}.
There is no real difference between a family of sets and an indexed family. Every fam-
ily of sets could be indexed by finding a large enough set of indices to label each set in the family.
The operations of union and intersection over families of sets apply to indexed families,
although the notation is slightly different. For a family A = {Aα : α ∈ ∆}, the notations for
unions and intersection are:
[ [ [
Aα = A and x ∈ Aα iff (∃α ∈ ∆) (x ∈ Aα )
α∈∆ A∈A α∈∆
\ \ \
Aα = A and x ∈ Aα iff (∀α ∈ ∆) (x ∈ Aα ) .
α∈∆ A∈A α∈∆
The next theorem restates Theorem 4.3.5 for indexed families and gives a version of De
Morgan’s Laws for indexed families.
Proof :
!c
\ \
(c) x ∈ Aα iff x ∈
/ Aα
α∈∆ α∈∆
iff it is not the case that for every α ∈ ∆, x ∈ Aα
iff for some β ∈ ∆, x ∈ / Aβ
iff for some β ∈ ∆, x ∈ Acβ
[
iff x ∈ Acα
!c α∈∆
\ [
Therefore, Aα = Acα
α∈∆ α∈∆
(d) hOne proof of part (d) is very similar to that given for part (c) and is left as an exercise.
However, since part (c) has been proved, it is permissible to use it. We also use (twice) the
fact that (Ac )c = A.i !c !c
[ [
Aα = (Acα )c
α∈∆ α∈∆
!c !c
\
= Acα
α∈∆
\
= Acα
α∈∆
Definition 4.3.11 The indexed family A = {Aα : α ∈ ∆} of sets is pairwise disjoint iff for
all α and β in ∆, either Aα = Aβ or Aα ∩ Aβ = ∅.
The family {A1 , A2 , A3 } in figure (a) is pairwise disjoint. However, the family {B1 , B2 , B3 }
in figure (b) is not pairwise disjoint. Although B1 ∩ B2 = ∅, the sets B1 and B3 are neither
identical nor disjoint.
B1 = {a, c, e} B2 = {d, g}
B3 = {d, g} B4 = {b, f, h}
B5 = {a, c, e} B6 = {a, c, e}.
We use the Sum Rule so often, we dont have to think about it: If a basket has 5 oranges
and 6 apples, then there are 11 pieces of fruit in the basket. The rule can be extended to any finite
number of sets. The Generalized Sum Rule can be proved using the Principle of Mathematical
Induction.
If sets A and B are not disjoint (see figure below), then determining the number of
elements in A ∪ B by simply adding n(A) and n(B) overcounts n(A ∪ B) by counting twice each
element of A ∩ B. Theorem 4.4.3 corrects this error by subtracting n(A ∩ B) from n(A) + (B)
Theorem 4.4.3 For finite sets A and B, n(A ∪ B) = n(A) + n(B) − n(A ∩ B).
Proof : By the Sum Rule n(A) = n(A − B) + n(A ∩ B) and n(B) = n(B − A) + n(A ∩ B).
Applying the Generalized Sum Rule to the distinct and pairwise disjoint sets A − B, A ∩ B, and
B − A, we have
2
If we know the number of elements in A, B, and A ∪ B, we can use Theorem 4.4.3 to
determine n(A ∩ B):
n(A ∩ B) = n(A) + n(B) − n(A ∪ B)
.
Example 4.4.4 During one week a total of 46 patients were treated by Dr. Medical for either
a broken leg or a sore throat. Of these, 32 had a broken leg and 20 had a sore throat. How
many did she treat for both ailments?
Solution: Letting B be the set of patients with broken legs and S the set of patients with sore
throats, the solution is
B ∩ S = B̄ + S̄ − B ∪ S = 32 + 20 − 46 = 6
Applying the Sum Rule to the disjoint sets B − S and B ∩ S, we could also find that B − S =
B̄ − B ∩ S = 32 − 6, so there were 26 patients with a broken leg but no sore throat. Similarly,
we could determine that 14 patients had just a sore throat. See figure below.
Like the Sum Rule, the Product Rule can be extended to more than 2 sets.
Self Evaluation:
Name: Score:
Course/Year/Section: Date:
I. True or False
II. Write the power set, P(X), for each of the following sets.
Review of Concepts:
• Sets A and B are equal if and only if they have exactly the same elements; that is,
A = B iff (∀x)(x ∈ A ⇔ x ∈ B).
• The power set of A is the set whose element are the subsets of A and is denoted P(A).
Thus
P(A) = {B : B ⊆ A}.
A × B = {(a, b) : a ∈ A and b ∈ B}
• Let ∆ be a nonempty set such that for each α ∈ ∆ there is a corresponding set Aα . The
family {Aα : α ∈ ∆} is an indexed family of sets. The set ∆ is called the indexing
set and each α ∈ ∆ is an index .
• The indexed family A = {Aα : α ∈ ∆} of sets is pairwise disjoint iff for all α and β
in ∆, either Aα = Aβ or Aα ∩ Aβ = ∅.
• If A and B are disjoint then n(A ∪ B) = m + n.For finite sets A and B, n(A ∪ B) =
n(A) + n(B) − n(A ∩ B).
• If A and B are finite sets with m and n elements, then n(A × B) = mn.
Post Test:
Name: Score:
Course/Year/Section: Date:
3. List the ordered pairs in A × B and B × A in the sets A{1, 3, 5} and B = {a, e, k, n, r}.
4. Find the union and intersection of the following families or indexed collections
(a) Let A = {{1, 3, 5}, {2, 4, 6}, {7, 9, 11, 13}, {8, 10, 12}}.
(b) Let A1 = {1}, A2 = {2, 3}, A3 = {3, 4, 5}, . . . , A10 = {10, 11, . . . , 19} and let
A = {An : n ∈ {1, 2, 3, . . . , 10}}.
(a) n(A ∩ B)
(b) n(A − B
(c) n(B − A)
References:
Learning Module in
MM5 - Logic and Set Theory
Title: 5 RELATIONS
Introduction:
Given a set of objects, we may want to say that certain pairs of objects are related in some
way. For example, we may say that two people are related if they have the same citizenship or the
same blood type, or if they like the same kinds of food. If a and b are integers, we might say that
a is related to b when a divides b. In this chapter we will study the idea of is related to by making
precise the notion of a relation and then concentrating on certain relations called equivalence
relations. The last two sections of the chapter introduce order relations and the theory of graphs.
Objectives:
1. Define and give examples of relations.
2. Define and give examples of equivalence relations and partitions.
Pretest:
Name: Score:
Course/Year/Section: Date:
Let T be the relation {(3, 1), (2, 3), (3, 5), (2, 2), (1, 6), (2, 6), (1, 2)}. Find
Learning Activities:
Example 5.1.3 An equation, inequality, expression, or graph is often used to describe a re-
lation, especially when listing all pairs is impractical or impossible. For example, the relation
LT = {(x, y) : R × R : x < y} is the familiar “less than relation on R since x LT y iff x < y.
The empty set ∅ and the set A × B are relations from A to B. In general, there are many
different relations from a set A to a set B because every subset of A × B is a relation from A
to B. That is, if A has m elements and B has n elements, then there are 2mn different relations
from A to B.
Thus the domain of R is the set of all first coordinates of ordered pairs in R, and the
range of R is the set of all second coordinates. By definition, Dom(R) ⊆ A and Rng(R) ⊆ B.
For the relation R = {(−1, 5), (2, 4), (2, 1), (4, 2)}, Dom(R) = {−1, 2, 4} and Rng =
{1, 2, 4, 5}.
Example 5.2.2 For A = {1, 2, a, b}, IA = {(1, 1), (2, 2), (a, a), (b, b)}. Clearly, for any set A,
Dom(IA ) = A and Rng(IA ) = A.
2
Given a relation from A to B and another from B to C, composition is a method of
constructing a relation from A to C.
Definition 5.2.6 Let R be a relation from A to B, and let S be a relation from B to C. The
composite of R and S is
S ◦ R = {(a, c) : there exists b ∈ B such that (a, b) ∈ R and (b, c) ∈ S}.
The relation S ◦ R is a relation from A to C since S ◦ R ⊆ A × C. It is always true that
Dom(S ◦ R) ⊆ Dom(R) but it is not always true that Dom(S ◦ R) = Dom(R).
Note: We have adopted the right-to-left notation for S ◦ R that is commonly used in analysis
courses. To determine S ◦ R you need to remember that R is the relation from the first set to
the second and S is the relation from the second set to the third. Thus, to determine S ◦ R we
apply the relation R first and then S.
Example 5.2.7 Let A = {1, 2, 3, 4, 5}, and B = {p, q, r, s, t}, and C = {x, y, z, w}. Let R be
the relation from A to B:
R = {(1, p), (1, q), (2, q), (3, r), (4, s)}
and S the relation from B to C:
S = {(p, x), (q, x), (q, y), (s, z), (t, z)}
These relations are illustrated in the figure above by arrows from one set to another. An element
a from A is related to an element c from C under S ◦ R if there is at least one “intermediate
element b of B such that (a, b) ∈ R and (b, c) ∈ S. For example, since (1, p) ∈ R and (p, x) ∈ S
then (1, x) ∈ S ◦ R. By following all possible paths along the arrows from A to B and B to C
in the figure above, we have
S ◦ R = {(1, x), (1, y), (2, x), (2, y), (4, z)}.
= (x, y) : y = x2 + 1 .
= (x, y) : y = (x + 1)2
The last theorem of this section presents several results about inversion, composition, and
the identity relation. We prove part (b) and the first part of (c), leaving the rest as Exercise.
(c) IB ◦ R = R and R ◦ IA = R.
Proof :
(c) (We first show that IB ◦ R ⊆ R.) Suppose (x, y) ∈ IB ◦ R. Then there exists z ∈ B such
that (x, z) ∈ R and (z, y) ∈ IB . Since (z, y) ∈ IB , z = y. Thus (x, y) ∈ Rh since (x, y) =
(x, z) ∈ Ri. Conversely, suppose (p, q) ∈ R. Then (q, q) ∈ IB and thus (p, q) ∈ IB ◦ R.
Thus IB ◦ R = R.
2
5.3 Equivalence Relations
The goal of this section is to describe a way to equate objects in a set according to some
value, property, or meaning. We might say that among all students who completed a certain
math class, students are equivalent if they had the same numeric score on the final exam. With
this meaning of equivalence, a student with a score of 87 on the final exam is related to every
other student with a score of 87 and not related to any other student. We could also have said
that two students are equivalent if they have the same favorite movie, or if they have the same
blood type.
The three properties we define next, when taken together, comprise what we mean by
objects being equivalent.
Definition 5.3.1 Let A be a set and R be a relation on A.
R is reflexive on A iff for all x ∈ A, x R x.
R is symmetric for all x and y, if x R y, then y R x.
R is transitive iff for all x, y, and z ∈ A, if x R y and y R z, then x R z.
The relation R, defined as “had the same final exam score, on the set C of all students in
a given class has all three of these properties. R is symmetric because if student x had the same
score as student y, then student y must have had the same score as student x. R is transitive
because if student x had the same score as student y and student y had the same score as student
z, then x had the same score as z. Finally, for every student x in C, x must have had the same
score as x. Thus R is reflexive on C.
To prove that a relation R on a set A is not reflexive on A, we must show that there
exists some x ∈ A such that x R x. Since the denial of “If x R y then y R x is “x R y and not
y R x a relation R is not symmetric iff there are elements x and y in A such that x R y and
y R x. Likewise, R is not transitive iff there exist elements x, y, and z in A such that x R y and
y R z but x R z.
Example 5.3.2 For B = {2, 5, 6, 7}, let S = {(2, 5), (5, 6), (2, 6), (7, 7)} and T = {(2, 6), (5, 6)}.
✓ 6 and 2 T 2, neither S nor T is reflexive on B. The relation S is not symmetric
Since 6 S
✓ 2. Likewise, T is not symmetric because 5 T 6 but 6 T 5.
because 2 S 5, but 5 S
Both S and T are transitive relations. To verify that S is transitive we check all pairs
(x, y) in S with all pairs of the form (y, z). We have (2, 5) and (5, 6) in S, so we must have (2, 6);
we have (7, 7) and (7, 7) in S so we must have (7, 7). The relation T is transitive for a different
reason: there do not exist x, y, z in B such that x T y and y T z. Because its antecedent is false,
the conditional sentence “If x T y and y T z, then x T z” is true.
Example 5.3.3 Let R be the relation “is a subset of on P(Z), the power set of Z. R is
reflexive on P(Z) since every set is a subset of itself. R is transitive since for all sets A, B,
and C, if A ⊆ B and B ⊆ C then A ⊆ B. Notice that {1, 2} ⊆ {1, 2, 3} but {1, 2, 3} * {1, 2}
Therefore, R is not symmetric.
For every set A, the identity relation IA is reflexive on A, symmetric, and transitive. The
identity relation is, in fact, the relation “equals, because x IA y iff x = y. Equality is a way of
comparing objects according to whether they are the same. Equivalence relations, defined next,
are a means for relating objects according to whether they are, if not identical, at least alike
in the sense that they share a common trait. For example, if T is the set of all triangles, we
might say two triangles are “the same (equivalent) when they are congruent. This generates the
relation T = {(x, y) ∈ T × T : x is congruent to y} on T , which is reflexive on T , symmetric,
and transitive. The notion of equivalence, then, is embodied in these three properties.
Example 5.3.6
Using 3 as modulus, 4 = 1(mod 3) because 3 divides 4 − 1. Likewise, 10 = 16(mod 3)
because 3 divides 10 − 16 = −6. Since 3 does not divide 5 − (−9) = 14, we have 5 6= −9( mod 3).
It is easy to see that 0 is congruent to 0, 3, −3, 6, and −6 and, in fact, 0 is congruent modulo 3
to every multiple of 3.
Proof : We note that ≡m is a set of ordered pairs of integers and, hence, is a relation on Z.
(Now we show that ≡m is reflexive on Z, symmetric, and transitive.)
(i) To show reflexivity on Z, let x be an integer. We show that x = x(mod m). Since
m·0=0=x−x
(ii) For symmetry, suppose x = y(mod m). Then m divides x − y. Thus there is an integer k
so that x − y = km. But this means that
(iii) Suppose x = y(mod m) and y = z(mod m). Thus m divides both x − y and y − z.
Therefore, there exist integers h and k such that x − y = hm and y − z = km. But then
h + k is an integer, and
x − z = (x − y) + (y − z) = hm + km = (h + k)m.
Self Evaluation:
Name: Score:
Course/Year/Section: Date:
1.
The inverse of R = {(x, y) ∈ R × R : y = 2x + 1} may be expressed in the form R =
−1
x−1
(x, y) ∈ R × R : y = 2 , the set of all pairs (x, y) subject to some condition. Use this
form to give the inverses of the following relations.
(a) R1 = {(x, y) ∈ R × R : y = x}
(b) R2 = {(x, y) ∈ R × R : y = −5x + 2}
(c) R3 = {(x, y) ∈ R × R : y = 7x − 10}
(d) R4 = {(x, y) ∈ R × R : y = x2 + 2}
2. Let R = {(1, 5), (2, 2), (3, 4), (5, 2)}, S = {(2, 4), (3, 4), (3, 1), (5, 5)}, and T = {(1, 4), (3, 5), (4, 1)}.
Find
(a) R ◦ S (c) T ◦ S
(b) R ◦ T (d) R ◦ R
Review of Concepts:
• For any set A, the relation IA = {(x, x) : x ∈ A} is called the identity relation on A.
Post Test:
Name: Score:
Course/Year/Section: Date:
1. Indicate which of the following relations on the given sets are reflexive on a given set,
which are symmetric, and which are transitive.
(d) < on N
(e) {(1, 5), (5, 1), (1, 1)} on the set A = {1, 2, 3, 4, 5}
p s
2. Let R be the relation on Q defined by R iff pt = qs. Show that R is an equivalence
q t
relation.
References:
Learning Module in
MM5 - Logic and Set Theory
Title: 6 FUNCTIONS
Introduction:
The concept of a function is very old, but the word function was not explicitly used until
1694 by G. W. Leibnitz.* It is only relatively recently that it has become standard practice
to treat a function as we define it belowas a relation with special properties. This is possible
because the rule that makes an element in one set correspond to an element from a second set
may be viewed as forming a collection of ordered pairs.
Objectives:
1. Define a function between sets and the image and inverse image of subsets of the domain
and codomain, resp.
3. Prove statements combining the concepts of the image and inverse image of subsets of the
domain and codomain, and composition of, or injective, surjective, or bijective functions
Pretest:
Name: Score:
Course/Year/Section: Date:
Which of the following relations are functions? For those relations that are functions, give the
domain and two sets that could be a codomain.
1. {(0, ∆), (∆, ), (, ∩), (∩, ∪), (∪, 0)}
2. {(1, 2), (1, 3), (1, 4), (1, 5), (1, 6)}
5.
4. {(x, y) ∈ R × R : x = sin y} 6.
Learning Activities:
No restriction is placed on the sets A and B. They may be sets of numbers, sets of
ordered pairs, or even sets of functions.
The conditions for f to be a function from A to B have a lot to say about the first
coordinates of the ordered pairs in f : Condition (i) ensures that every element of a is a first
coordinate in f , and condition (ii) says that each first coordinate appears in just one ordered
pair in f . There are no corresponding requirements for second coordinates: It may happen that
some elements of B are not used as second coordinates, or that some elements of B are used as
second coordinates in two or more different ordered pairs.
Example 6.1.2 Let A = {1, 2, 3} and B = {4, 5, 6}. All of the sets
R1 = {(1, 4), (2, 5), (3, 6), (2, 6)}
R2 = {(1, 4), (2, 6), (3, 5)}
R3 = {(1, 5), (2, 5), (3, 4)}
R4 = {(1, 4), (3, 6)}
are relations from A to B.
• Since (2, 5) and (2, 6) are distinct ordered pairs with the same first coordinate, R1 is not
a function from A to B.
• Both R2 and R3 satisfy conditions (i) and (ii) and are functions from A to B.
• The domain of R4 is the set {1, 3}, which is not equal to A, so is not a function from A to
B. However, satisfies condition (ii), so it is correct to say that is a function from {1, 3} to
B.
The codomain B for a function f : A → B is the set of all objects available for use as
second coordinates (images). As with any relation, the range of f is
Rng(f ) = {v ∈ B : there isu ∈ A such that (u, v) ∈ f }
which is the set of objects that are actually used as second coordinates. The range of f is always
a subset of the codomain.
In the examples above, the range of R2 is the same as its codomain, but the range of R3
is {4, 5} 6= B. We say that R3 is a function from A to B, but √we could also say that R3 is also
a function from A to {4, 5}, and R3 is a function from A to { 3, π, 4, 5, 8} or to any other set
that contains both 4 and 5. A function has only one domain and one range, but many possible
codomains, because any set that includes the range may be considered to be a codomain.
Definition 6.1.3 Let f : A → B. We write y = f (x) when (x, y) ∈ f . We say that y is the
value of f at x (or the image of f at x ) and that x is a pre-image of y under f .
• F (−3) = 9,
• F (t + 2) = (t + 2)2 ,
(i) (Show that Dom(g) = R.) Suppose x ∈ Dom(g). By definition of g, the first coordinates
√real numbers, so x ∈ R. Thus,√Dom(g) ⊆ R.
of elements of g are
Let x√∈ R. Then 3 x is a real number and x = ( 3 x)3 . Thus there exists y ∈ R (namely
y = 3 x)for which (x, y) ∈ g. Thus, x ∈ Dom(g).
Therefore, Dom(g) = R
(ii) (Show that f is single-valued.) Suppose (x, u) ∈ g and (x, v) ∈ g. Then x = u3 and x = v 3 .
Therefore u3 = v 3 , from which we conclude that u = v.
Example 6.1.6 Note that arrow diagrams for relations with small finite domains may be used
to determine whether the relation is a function. The diagram in (a) in the figure below represents
a function with domain {a, b, c} but the diagram (b) in the figure below does not.
F −1 = {(x, y) : (y, x) ∈ F }
We are careful to say F −1 is a relation because the inverse of a function is a relation, but might
not be a function. Conditions on F to ensure that F −1 is a function will be given in the next
section.
Here, too, we say the relation G ◦ F , but we will soon see that the composite of two functions
is a function.
F −1 = {(x, y) ∈ R × R : (y, x) ∈ F }
= {(x, y) ∈ R × R : x = 2y + 1}
x−1
= (x, y) ∈ R × R : y =
2
and
G−1 = {(x, y) ∈ R × R : (y, x) ∈ G}
{(x, y) ∈ R × R : x = y 2 }.
The inverse of F is a function. The inverse of G is not a function since, for instance,
and
F ◦ G = (x, z) ∈ R × R : ∃y ∈ R such that y = x2 and z = 2y + 1
= (x, z) ∈ R × R : z = 2x2 + 1
These examples show that G ◦ F and F ◦ G are not always equal. Thus, composition of
functions is not commutative.
Proof : (We must show that for every w ∈ R, there exists t ∈ R such that F (t) = w.) Let
w ∈ R. We choose t = w − 2. (Since we want w = F (t) = t + 2, the pre-image we need is
t = w − 2.) Then F (t) = t + 2 = (w − 2) + 2 = w. Therefore, F : R → R is onto R. 2
Example 6.3.4 Example. Let s : (−∞, 0] → [−4, ∞) be defined by s(x) = x2 − 4. Prove that
s is onto [−4, ∞).
√
Proof : Let w ∈ [−4,
√ ∞). Then w ≥ −4, so w + 4 ≥ 0. Choose x = − w + 4. ( Note that we
do not choose x = w + 4.) Then x ∈ (−∞, 0]. It follows that
√
s(x) = (− w + 4)2 − 4 = (w + 4) − 4 = w
A direct proof that f : A → B is one-to-one begins with the assumption that x and
y are elements of A and that f (x) = f (y); the rest of the proof shows that x = y. A proof
by contraposition assumes that x 6= y and shows that f (x) 6= f (y). To show that f is not
one-to-one, it suffices to exhibit two different elements of A with the same image.
Proof : Suppose x and z are real numbers and F (x) = F (z). Then
2x + 1 = 2z + 1.
Definition 6.5.1 Let f : A → B and let X ⊆ A and Y ⊆ B. The image of X or image set
of X is
f (X) = {y ∈ B : y = f (x) for some x ∈ X}
and the inverse image of Y is
f −1 (Y ) = {x ∈ A : f (x) ∈ Y }.
Example 6.5.2 Let A = {0, 1, 2, 3, −1, −2, −3}, B = {0, 1, 2, 4, 6, 9}, X = {−1, 3}, Y = {4, 6},
and f : A → B be given by f (x) = x2 . The figure below shows that
f (X) = f ({−1, 3}) = {1, 9}
f ({−3, 3}) = {9}
f (A) = {0, 1, 4, 9}
and
f −1 (Y ) = f −1 ({4, 6}) = {−2, 2}
f −1 ({6}) = ∅
f −1 (B) = A
Self Evaluation:
Name: Score:
Course/Year/Section: Date:
Review of Concepts:
f −1 (Y ) = {x ∈ A : f (x) ∈ Y }.
Post Test:
Name: Score:
Course/Year/Section: Date:
1. Which of the following functions are one-to-one and are map onto their indicated co-
damains? Prove each of your answers.
(a) f : R → R, f (x) = 21 x + 6
√
(b) f : R → R, f (x) = x2 + 5
(c) f : R → [1, +∞), f (x) = x2 + 1
2. Show that each of these functions is a one-to-one correspondence and find the inverse
function.
1
(a) f : (0, +∞) → (0, +∞) given by f (x) = .
x
4x
(b) g : (−2, +∞) → (−∞, 4) given by g(x) =
x+2
References: