π Lecture 7 β Sets Continued
π Overview: This lecture continues the study of set theory, introducing fundamental set operations: union, intersection, difference, and complement. It explains how to represent these operations using Venn diagrams and membership tables, and demonstrates how to prove set identities through both visual and tabular methods, which are essential for logical reasoning in mathematics.
ποΈ Topics Covered
The lecture covers the definitions, symbolic representations, Venn diagrams, and membership tables for union, intersection, difference, and complement of sets. It includes detailed worked examples solving exercises involving enumeration of sets and set operations, and concludes with proving set identities using Venn diagrams and membership tables.
π Lecture Summary
UNION:
Let A and B be subsets of a universal set U. The union of sets A and B is the set of all elements in U that belong to A or to B or to both, and is denoted A βͺ B.
π Definition β Union (A βͺ B): A βͺ B = {x β U | x β A or x β B}
π Formula: A βͺ B = {x β U | x β A or x β B} β The set of elements that are in A, in B, or in both.
π Example: Let U = {a, b, c, d, e, f, g}, A = {a, c, e, g}, B = {d, e, f, g}. Then A βͺ B = {a, c, d, e, f, g}.
Venn Diagram: The union A βͺ B is the shaded area covering all of set A, all of set B, and their overlap.
Remarks:
- A βͺ B = B βͺ A (union is commutative).
- A β A βͺ B and B β A βͺ B.
Membership Table for Union: This table (1 = element present, 0 = absent) shows that the union is 1 if either A or B is 1, and 0 only if both are 0. It is similar to the truth table for the logical connective disjunction (β¨).
INTERSECTION:
Let A and B subsets of a universal set U. The intersection of sets A and B is the set of all elements in U that belong to both A and B, and is denoted A β© B.
π Definition β Intersection (A β© B): A β© B = {x β U | x β A and x β B}
π Example: Let U = {a, b, c, d, e, f, g}, A = {a, c, e, g}, B = {d, e, f, g}. Then A β© B = {e, g}.
Venn Diagram: The intersection A β© B is the shaded area where sets A and B overlap.
Remarks:
- A β© B = B β© A (intersection is commutative).
- A β© B β A and A β© B β B.
- If A β© B = β , then A and B are called disjoint sets.
Membership Table for Intersection: The intersection is 1 only when both A and B are 1. This table is similar to the truth table for the logical connective conjunction (β§).
DIFFERENCE:
Let A and B be subsets of a universal set U. The difference of βA and Bβ (or relative complement of B in A) is the set of all elements in U that belong to A but not to B, and is denoted A β B or A \ B.
π Definition β Set Difference (A β B): A β B = {x β U | x β A and x β B}
π Example: Let U = {a, b, c, d, e, f, g}, A = {a, c, e, g}, B = {d, e, f, g}. Then A β B = {a, c}.
Venn Diagram: The set difference A β B is the part of set A that does not overlap with set B.
Remarks:
- A β B β B β A (set difference is not commutative).
- A β B β A.
- A β B, A β© B, and B β A are mutually disjoint sets.
Membership Table for Set Difference: The set difference A β B is 1 only when A is 1 and B is 0. This table is similar to the truth table for ~(p β q). π‘ Why this matters: Understanding the membership table for set difference helps connect set operations to logical implications.
COMPLEMENT:
Let A be a subset of universal set U. The complement of A is the set of all elements in U that do not belong to A, and is denoted AΜ , A' or AαΆ.
π Definition β Complement (AαΆ): AαΆ = {x β U | x β A}
π Example: Let U = {a, b, c, d, e, f, g}, A = {a, c, e, g}. Then AαΆ = {b, d, f}.
Venn Diagram: The complement AαΆ is the area of the universal set U outside of set A.
Remarks:
- AαΆ = U β A.
- A β© AαΆ = β .
- A βͺ AαΆ = U.
Membership Table for Complement: The complement is 1 when A is 0, and 0 when A is 1. This table is similar to the truth table for the logical connective negation (~).
EXERCISE (Enumerating Sets and Operations):
Let U = {1, 2, 3, ..., 10}, X = {1, 2, 3, 4, 5}, Y = {y | y = 2x, x β X}, Z = {z | zΒ² β 9z + 14 = 0}
First, enumerate the sets: Y = {2, 4, 6, 8, 10}, Z = {2, 7} (since the equation zΒ² β 9z + 14 = 0 factors to (z-2)(z-7)=0).
- X β© Y = {1, 2, 3, 4, 5} β© {2, 4, 6, 8, 10} = {2, 4}
- Y βͺ Z = {2, 4, 6, 8, 10} βͺ {2, 7} = {2, 4, 6, 7, 8, 10}
- X β Z = {1, 2, 3, 4, 5} β {2, 7} = {1, 3, 4, 5}
- YαΆ = U β Y = {1, 2, 3, ..., 10} β {2, 4, 6, 8, 10} = {1, 3, 5, 7, 9}
- XαΆ β ZαΆ: First, XαΆ = {6, 7, 8, 9, 10}. ZαΆ = {1, 3, 4, 5, 6, 8, 9, 10}. So XαΆ β ZαΆ = {7}.
- (X β Z)αΆ = U β (X β Z) = {1, 2, ..., 10} β {1, 3, 4, 5} = {2, 6, 7, 8, 9, 10}
Note: (X β Z)αΆ β XαΆ β ZαΆ.
EXERCISE (Venn Diagram and Set Operations):
Given U = {x | x β Z, 0 β€ x β€ 10}, P = {x | x is a prime number}, Q = {x | xΒ² < 70}.
First, write sets in tabular form: U = {0, 1, 2, 3, ..., 10}, P = {2, 3, 5, 7}, Q = {0, 1, 2, 3, 4, 5, 6, 7, 8}.
(i) Venn Diagram: P is placed as a subset within Q, with elements {2, 3, 5, 7}. Q contains additional elements {0, 1, 4, 6, 8}. Elements {9, 10} are outside both P and Q but inside U.
(ii) PαΆ β© Q = {0, 1, 4, 6, 8, 9, 10} β© {0, 1, 2, 3, 4, 5, 6, 7, 8} = {0, 1, 4, 6, 8}
EXERCISE (Finding Set A):
Let U = {1, 2, 3, 4, 5}, C = {1, 3}, and A and B are non-empty sets.
(i) A βͺ B = U, A β© B = β , and B = {1} Solution: Since A and B are disjoint and their union is U, A = BαΆ. A = {1}αΆ = {2, 3, 4, 5}.
(ii) A β B and A βͺ B = {4, 5} Solution: When A β B, then A βͺ B = B = {4, 5}. Since A is a proper subset of B, A = {4} or A = {5}.
(iii) A β© B = {3}, A βͺ B = {2, 3, 4} and B βͺ C = {1, 2, 3} Solution: Using a Venn diagram analysis, 3 is in the intersection. 1 is in C but not in A βͺ B, so it is only in C. 4 is in A βͺ B but not in B βͺ C, so it is only in A. 2 is in B βͺ C and A βͺ B but not in A β© B nor in C, so 2 is only in B. Therefore, A = {3, 4} and B = {2, 3}.
(iv) A β© B = β , B β© C = β , A βͺ B = {1, 2}. Also C = {1, 3} Solution: Since B and C are disjoint and C contains 1 and 3, A βͺ B = {1, 2}. So A = {1} and B = {2}.
PROVING SET IDENTITIES BY VENN DIAGRAMS:
Three identities are proven using Venn diagrams with numbered regions.
(i) A β (A β B) = A β© B: Diagrams show that the region for A β (A β B) (the part of A not in A β B) is identical to the region A β© B.
(ii) (A β© B)αΆ = AαΆ βͺ BαΆ: The complement of the intersection (all regions outside A β© B) matches the union of the complements (all regions not in A combined with all regions not in B).
(iii) A β B = A β© BαΆ: The region of A outside B (set difference) is the same as the intersection of A with the complement of B.
PROVING SET IDENTITIES BY MEMBERSHIP TABLE:
The same three identities are proven using membership tables (1 = in set, 0 = not in set).
(i) A β (A β B) = A β© B:
| A | B | A-B | A-(A-B) | Aβ©B |
|---|---|---|---|---|
| 1 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 |
| The last two columns are identical, proving the identity. |
(ii) (A β© B)αΆ = AαΆ βͺ BαΆ:
| A | B | Aβ©B | (Aβ©B)αΆ | AαΆ | BαΆ | AαΆβͺBαΆ |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| The fourth and last columns are identical, proving the identity. |
(iii) A β B = A β© BαΆ:
| A | B | A-B | BαΆ | Aβ©BαΆ |
|---|---|---|---|---|
| 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 |
| The third and fifth columns are identical, proving the identity. |
β Key Takeaways
The four fundamental set operationsβunion (βͺ), intersection (β©), difference (-), and complement (αΆ)βeach have precise definitions, symbolic notations, and visual representations in Venn diagrams. Membership tables provide a systematic way to verify set relationships, directly analogous to truth tables in logic. Key properties to remember include: union and intersection are commutative; set difference is not commutative; and De Morgan's Law (A β© B)αΆ = AαΆ βͺ BαΆ. Set identities can be proven either visually through Venn diagrams or rigorously through membership tables, and both methods are valid.
π§ Quick Revision Questions
- What is the union of A = {1, 3, 5} and B = {2, 4, 6}? Draw its Venn diagram.
- If A and B are disjoint sets, what is A β© B? Give an example.
- What is the difference between A β B and B β A? Give an example to show they are not equal.
- State and prove De Morgan's Law (A β© B)αΆ = AαΆ βͺ BαΆ using a membership table.
- If U = {1, 2, 3, 4, 5, 6}, A = {2, 4, 6}, and B = {3, 4, 5}, find: (a) AαΆ, (b) A β B, (c) (A βͺ B)αΆ.
π Lecture 8 β Sets Continued
π Overview: This lecture extends the study of sets to ordered pairs and n-tuples, introduces the Cartesian product of sets, and defines binary relations along with their representations. These concepts are fundamental for understanding functions, relations, and discrete structures in mathematics and computer science.
ποΈ Topics Covered
The lecture covers ordered pairs and ordered n-tuples with equality conditions, Cartesian products of two and more sets, binary relations from one set to another, domain and range of relations, and multiple ways to represent relations including coordinate diagrams, arrow diagrams, directed graphs, and matrix representation.
π Lecture Summary
ORDERED PAIR:
An ordered pair (a, b) consists of two elements "a" and "b" in which "a" is the first element and "b" is the second element. The ordered pairs (a, b) and (c, d) are equal if, and only if, a = c and b = d. Note that (a, b) and (b, a) are not equal unless a = b.
π Definition β Ordered Pair: A pair of elements where the order matters; (a, b) = (c, d) iff a = c and b = d.
π Example: Find x and y given (2x, x + y) = (6, 2)
- Two ordered pairs are equal if corresponding components are equal
- Hence: 2x = 6 and x + y = 2
- Solving: x = 3, y = -1
ORDERED n-TUPLE:
The ordered n-tuple, (aβ, aβ, ..., aβ) consists of elements aβ, aβ, ..., aβ together with the ordering: first aβ, second aβ, and so forth up to aβ. An ordered 2-tuple is called an ordered pair, and an ordered 3-tuple is called an ordered triple. Two ordered n-tuples (aβ, aβ, ..., aβ) and (bβ, bβ, ..., bβ) are equal if and only if each corresponding pair of their elements is equal, i.e., aα΅’ = bα΅’, for all i = 1, 2, ..., n.
π Definition β Ordered n-tuple: A sequence of n elements where order matters; equality requires matching elements at each position.
CARTESIAN PRODUCT OF TWO SETS:
Let A and B be sets. The Cartesian product of A and B, denoted A Γ B (read "A cross B"), is the set of all ordered pairs (a, b), where a is in A and b is in B.
π Formula: A Γ B = {(a, b) | a β A and b β B}
- If set A has m elements and set B has n elements, then A Γ B has m Γ n elements.
π Example: Let A = {1, 2}, B = {a, b, c}
- A Γ B = {(1,a), (1,b), (1,c), (2,a), (2,b), (2,c)}
- B Γ A = {(a,1), (a,2), (b,1), (b,2), (c,1), (c,2)}
- A Γ A = {(1,1), (1,2), (2,1), (2,2)}
- B Γ B = {(a,a), (a,b), (a,c), (b,a), (b,b), (b,c), (c,a), (c,b), (c,c)}
Important remarks:
- A Γ B β B Γ A for non-empty and unequal sets A and B
- A Γ β = β Γ A = β
- |A Γ B| = |A| Γ |B|
CARTESIAN PRODUCT OF MORE THAN TWO SETS:
The Cartesian product of sets Aβ, Aβ, ..., Aβ, denoted Aβ Γ Aβ Γ ... Γ Aβ, is the set of all ordered n-tuples (aβ, aβ, ..., aβ) where aβ β Aβ, aβ β Aβ, ..., aβ β Aβ.
π Formula: Aβ Γ Aβ Γ ... Γ Aβ = {(aβ, aβ, ..., aβ) | aα΅’ β Aα΅’, for i = 1, 2, ..., n}
BINARY RELATION:
Let A and B be sets. A (binary) relation R from A to B is a subset of A Γ B. When (a, b) β R, we say a is related to b by R, written a R b. Otherwise if (a, b) β R, we write a RΜΈ b.
π Definition β Binary Relation: Any subset of the Cartesian product A Γ B; elements (a,b) in the subset indicate that a is related to b.
π Example: Let A = {1, 2}, B = {1, 2, 3}
- A Γ B = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3)}
- Rβ = {(1,1), (1,3), (2,2)}
- Rβ = {(1,2), (2,1), (2,2), (2,3)}
- Rβ = {(1,1)}
- Rβ = A Γ B
- Rβ = β All being subsets of A Γ B are relations from A to B.
DOMAIN OF A RELATION:
The domain of a relation R from A to B is the set of all first elements of the ordered pairs which belong to R, denoted Dom(R).
π Definition β Domain of a Relation: Dom(R) = {a β A | (a,b) β R}
RANGE OF A RELATION:
The range of a relation R from A to B is the set of all second elements of the ordered pairs which belong to R, denoted Ran(R).
π Definition β Range of a Relation: Ran(R) = {b β B | (a,b) β R}
π Exercise: Let A = {1, 2}, B = {1, 2, 3}, define R = {(a, b) β A Γ B | a < b}
- R = {(1,2), (1,3), (2,3)}
- Dom(R) = {1, 2} and Ran(R) = {2, 3}
- Since (1,3) β R so 1R3; But (2,2) β R so 2 is not related to 3.
π Example: Let A = {eggs, milk, corn} and B = {cows, goats, hens} Define R from A to B by (a, b) β R iff a is produced by b. R = {(eggs, hens), (milk, cows), (milk, goats)} Thus, eggs R hens, milk R cows, etc.
π Example: Find all binary relations from {0,1} to {1}
- A = {0,1}, B = {1}, A Γ B = {(0,1), (1,1)}
- All subsets: Rβ = β , Rβ = {(0,1)}, Rβ = {(1,1)}, Rβ = {(0,1), (1,1)} = A Γ B
- If |A| = m and |B| = n, the total number of relations from A to B is 2^(mΓn)
RELATION ON A SET:
A relation on the set A is a relation from A to A. In other words, a relation on a set A is a subset of A Γ A.
π Example: Let A = {1, 2, 3, 4} Define R on A as (a,b) β R iff a divides b (written a|b) R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4)}
Remarks:
- A Γ A is known as the universal relation
- β is known as the empty relation
π Exercise: Define E on Z as m E n β m β n is even
- 0E0? Yes (0-0=0 is even)
- 5E2? No (5-2=3 is not even)
- (6,6) β E? Yes (6-6=0 is even)
- (-1,7) β E? Yes (-1-7=-8 is even)
- For any even integer n, nE0 since n-0=n is even
COORDINATE DIAGRAM (GRAPH) OF A RELATION:
Let A = {1, 2, 3} and B = {x, y} with R = {(1,y), (2,x), (2,y), (3,x)}. The relation can be represented in a coordinate diagram using x-axis for A and y-axis for B, plotting each ordered pair as a point.
π Example: Draw the graph of C from R to R defined as (x,y) β C β xΒ² + yΒ² = 1 All ordered pairs satisfy xΒ² + yΒ² = 1, which is the equation of a unit circle centered at the origin. The graph is a circle with radius 1, limited to -1 β€ x β€ 1 and -1 β€ y β€ 1.
ARROW DIAGRAM OF A RELATION:
Let A = {1, 2, 3}, B = {x, y} and R = {(1,y), (2,x), (2,y), (3,x)}. The arrow diagram shows elements of A on the left, elements of B on the right, with arrows connecting related elements.
DIRECTED GRAPH OF A RELATION:
Let A = {0, 1, 2, 3} and R = {(0,0), (1,3), (2,1), (2,2), (3,0), (3,1)} be a relation on A. The directed graph shows elements as vertices (circles labeled with elements) and ordered pairs as directed arrows from the first to the second element. A loop at a vertex represents a pair (a,a).
MATRIX REPRESENTATION OF A RELATION:
Let A = {aβ, aβ, ..., aβ} and B = {bβ, bβ, ..., bβ}. Let R be a relation from A to B. Define the n Γ m matrix M by:
- m(i,j) = 1 if (aα΅’, bβ±Ό) β R
- m(i,j) = 0 if (aα΅’, bβ±Ό) β R for i = 1, 2, ..., n and j = 1, 2, ..., m
π Formula: Relation Matrix M with entries m(i,j) = 1 if related, 0 otherwise.
π Example: A = {1, 2, 3}, B = {x, y}, R = {(1,y), (2,x), (2,y), (3,x)} M = [ [0, 1], [1, 1], [1, 0] ] (3Γ2 matrix where rows represent A elements and columns represent B elements)
π Example: For matrix M = [ [1, 0, 1], [1, 0, 0], [0, 1, 1] ]
- Ordered pairs: R = {(1,1), (1,3), (2,1), (3,2), (3,3)}
- Directed graph has vertices 1, 2, 3 with arrows: 1β1, 1β3, 2β1, 3β2, 3β3
π Exercise: Let A = {2, 4} and B = {6, 8, 10}, define R and S from A to B:
- x R y β x | y (x divides y)
- x S y β y β 4 = x
- A Γ B = {(2,6), (2,8), (2,10), (4,6), (4,8), (4,10)}
- R = {(2,6), (2,8), (2,10), (4,8)}
- S = {(2,6), (4,8)}
- R βͺ S = {(2,6), (2,8), (2,10), (4,8)} = R
- R β© S = {(2,6), (4,8)} = S
π‘ Why this matters: Relations formalize connections between elements of sets and are the foundation for functions, databases, graph theory, and many computer science applications like social networks and search engines.
β Key Takeaways
You must master ordered pairs and their equality conditions, as they form the basis for Cartesian products and relations. The Cartesian product A Γ B has |A| Γ |B| elements, and any subset of it is a binary relation. Every relation has a domain (first elements) and range (second elements), and can be represented in five ways: as a set of ordered pairs, coordinate diagram, arrow diagram, directed graph, or matrix. The total number of relations from A to B equals 2^(|A|Γ|B|). Understanding these representations is essential for visualizing and computing with relations in discrete mathematics.
π§ Quick Revision Questions
- Given (3x, x + 2y) = (9, 5), find the values of x and y.
- If A = {a, b} and B = {1, 2}, list all elements of A Γ B and B Γ A. Are they equal? Why or why not?
- How many distinct binary relations can be defined from a set with 2 elements to a set with 3 elements?
- For the relation R = {(1,2), (2,3), (3,1), (1,1)} on A = {1, 2, 3}, find Dom(R), Ran(R), and draw the directed graph.
- Write the matrix representation for the relation R = {(a,x), (b,y), (c,x)} from A = {a, b, c} to B = {x, y}.
π Lecture 9 β Sets Continued
π Overview: This lecture covers the fundamental properties of binary relations: reflexivity, symmetry, and transitivity. These properties are essential for understanding equivalence relations and congruence, which have applications in mathematics, computer science, and logic.
ποΈ Topics Covered
The lecture defines and illustrates reflexive relations (every element related to itself), symmetric relations (if a is related to b then b is related to a), and transitive relations (if a is related to b and b is related to c then a is related to c). Each property is explained with set notation, directed graphs, and matrix representations. Several worked examples test these properties on specific relations including the null/universal relations, the "less than" relation on real numbers, the "odd product" relation on positive integers, the "divides" relation on integers, and the "same first name" relation. The lecture concludes by combining all three properties to define an equivalence relation and introduces congruence modulo d as a key example, proving it forms an equivalence relation on the integers.
π Lecture Summary
REFLEXIVE RELATION
Let R be a relation on a set A. R is reflexive if, and only if, for all a β A, (a, a) β R. Equivalently, aRa. That is, each element of A is related to itself.
π Definition β Reflexive Relation: A relation R on a set A is reflexive if every element of A is related to itself, meaning (a,a) β R for all a β A.
REMARK: R is not reflexive iff there is an element "a" in A such that (a, a) β R. That is, some element "a" of A is not related to itself.
π Example: Let A = {1, 2, 3, 4} and define relations Rβ, Rβ, Rβ, Rβ on A as follows: Rβ = {(1, 1), (3, 3), (2, 2), (4, 4)} Rβ = {(1, 1), (1, 4), (2, 2), (3, 3), (4, 3)} Rβ = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)} Rβ = {(1, 3), (2, 2), (2, 4), (3, 1), (4, 4)}
- Rβ is reflexive, since (a, a) β Rβ for all a β A.
- Rβ is not reflexive, because (4, 4) β Rβ.
- Rβ is reflexive, since (a, a) β Rβ for all a β A.
- Rβ is not reflexive, because (1, 1) β Rβ, (3, 3) β Rβ.
DIRECTED GRAPH OF A REFLEXIVE RELATION
The directed graph of every reflexive relation includes an arrow (loop) from every point to the point itself.
π Example: Using the same relations Rβ-Rβ from above:
- Rβ is reflexive because at every point of the set A we have a loop in the graph.
- Rβ is not reflexive, as there is no loop at 4.
- Rβ is reflexive.
- Rβ is not reflexive, as there are no loops at 1 and 3.
π‘ Why this matters: The directed graph provides a visual way to instantly check if a relation is reflexive β just look for a loop at every vertex.
MATRIX REPRESENTATION OF A REFLEXIVE RELATION
Let A = {aβ, aβ, ..., aβ}. A Relation R on A is reflexive if and only if (aα΅’, aβ±Ό) β R β i=1,2,...,n. Accordingly, R is reflexive if all the elements on the main diagonal of the matrix M representing R are equal to 1.
π Example: The relation R = {(1,1), (1,3), (2,2), (3,2), (3,3)} on A = {1,2,3} is represented by the following matrix M and is reflexive:
M = 1 2 3 1 [1 0 1] 2 [0 1 0] 3 [0 1 1]
Since the main diagonal has 1, 1, 1 (all 1s), the relation is reflexive.
SYMMETRIC RELATION
Let R be a relation on a set A. R is symmetric if, and only if, for all a, b β A, if (a, b) β R then (b, a) β R. That is, if aRb then bRa.
π Definition β Symmetric Relation: A relation R on a set A is symmetric if whenever a is related to b, then b is also related to a.
REMARK: R is not symmetric iff there are elements a and b in A such that (a, b) β R but (b, a) β R.
π Example: Let A = {1, 2, 3, 4} and define relations Rβ, Rβ, Rβ, Rβ on A as follows: Rβ = {(1, 1), (1, 3), (2, 4), (3, 1), (4,2)} Rβ = {(1, 1), (2, 2), (3, 3), (4, 4)} Rβ = {(2, 2), (2, 3), (3, 4)} Rβ = {(1, 1), (2, 2), (3, 3), (4, 3), (4, 4)}
- Rβ is symmetric because for every ordered pair (a,b) in Rβ, we have (b,a) in Rβ. For example, we have (1,3) in Rβ and we have (3,1) in Rβ.
- Rβ is also symmetric (vacuously true β no pairs break the condition).
- Rβ is not symmetric, because (2,3) β Rβ but (3,2) β Rβ.
- Rβ is not symmetric because (4,3) β Rβ but (3,4) β Rβ.
DIRECTED GRAPH OF A SYMMETRIC RELATION
For a symmetric directed graph, whenever there is an arrow going from one point of the graph to a second, there is an arrow going from the second point back to the first.
π Example: Using the same relations:
- Rβ is symmetric, Rβ is symmetric.
- Rβ is not symmetric since there are arrows from 2 to 3 and from 3 to 4 but not conversely.
- Rβ is not symmetric since there is an arrow from 4 to 3 but no arrow from 3 to 4.
MATRIX REPRESENTATION OF A SYMMETRIC RELATION
Let A = {aβ, aβ, ..., aβ}. A relation R on A is symmetric if and only if for all aα΅’, aβ±Ό β A, if (aα΅’, aβ±Ό) β R then (aβ±Ό, aα΅’) β R. Accordingly, R is symmetric if the elements in the i-th row are the same as the elements in the i-th column of the matrix M representing R. More precisely, M is a symmetric matrix, i.e., M = Mα΅.
π Example: The relation R = {(1,3), (2,2), (3,1), (3,3)} on A = {1,2,3} represented by the following matrix M is symmetric:
M = 1 2 3 1 [0 0 1] 2 [0 1 0] 3 [1 0 1]
TRANSITIVE RELATION
Let R be a relation on a set A. R is transitive if and only if for all a, b, c β A, if (a, b) β R and (b, c) β R then (a, c) β R. That is, if aRb and bRc then aRc.
π Definition β Transitive Relation: A relation R on a set A is transitive if whenever a is related to b and b is related to c, then a is related to c.
REMARK: R is not transitive iff there are elements a, b, c in A such that (a,b) β R and (b,c) β R but (a,c) β R.
π Example: Let A = {1, 2, 3, 4} and define relations Rβ, Rβ and Rβ on A as follows: Rβ = {(1, 1), (1, 2), (1, 3), (2, 3)} Rβ = {(1, 2), (1, 4), (2, 3), (3, 4)} Rβ = {(2, 1), (2, 4), (2, 3), (3,4)}
- Rβ is transitive because (1, 1), (1, 2) are in R and then (1,2) is also there (satisfying the condition). Similarly checked for other ordered pairs.
- Rβ is not transitive since (1,2) and (2,3) β Rβ but (1,3) β Rβ.
- Rβ is transitive.
DIRECTED GRAPH OF A TRANSITIVE RELATION
For a transitive directed graph, whenever there is an arrow going from one point to the second, and from the second to the third, there is an arrow going directly from the first to the third.
π Example: Using the same relations:
- Rβ is transitive.
- Rβ is not transitive since there is an arrow from 1 to 2 and from 2 to 3 but no arrow from 1 to 3 directly.
- Rβ is transitive.
EXERCISE: Null and Universal Relations
Let A = {1, 2, 3, 4} and define the null relation β and universal relation A Γ A on A. Test these relations for reflexive, symmetric and transitive properties.
Reflexive: (i) β is not reflexive since (1,1), (2,2), (3,3), (4,4) β β . (ii) A Γ A is reflexive since (a,a) β A Γ A for all a β A.
Symmetric: (i) For the null relation β on A to be symmetric, it must satisfy: if (a,b) β β then (a,b) β β . Since (a,b) β β is never true, the implication is vacuously true or true by default. Hence β is symmetric. (ii) The universal relation A Γ A is symmetric, for it contains all ordered pairs of elements of A. Thus, if (a, b) β A Γ A then (b, a) β A Γ A for all a, b in A.
Transitive: (i) The null relation β on A is transitive, because the implication "if (a,b) β β and (b,c) β β then (a,c) β β " is true by default, since the condition (a,b) β β is always false. (ii) The universal relation A Γ A is transitive for it contains all ordered pairs of elements of A. Accordingly, if (a,b) β A Γ A and (b,c) β A Γ A then (a,c) β A Γ A as well.
EXERCISE: Relation on {0,1,2}
Let A = {0, 1, 2} and R = {(0,2), (1,1), (2,0)} be a relation on A.
- Is R reflexive? Symmetric? Transitive?
- Which ordered pairs are needed in R to make it a reflexive and transitive relation?
Solution:
-
R is not reflexive, since 0 β A but (0,0) β R and also 2 β A but (2,2) β R. R is clearly symmetric. R is not transitive, since (0,2) & (2,0) β R but (0,0) β R.
-
For R to be reflexive, it must contain ordered pairs (0,0) and (2,2). For R to be transitive, we note (0,2) and (2,0) β but (0,0) β R. Also (2,0) and (0,2) β R but (2,2) β R. Hence (0,0) and (2,2) are needed in R to make it a transitive relation.
EXERCISE: "Less Than" Relation
Define a relation L on the set of real numbers β as follows: for all x, y β β, x L y β x < y.
a. Is L reflexive? No, because x < x is false for any real number x. b. Is L symmetric? No, because if x < y then y < x is false (e.g., 0 < 1 but 1 < 0 is false). c. Is L transitive? Yes, because if x < y and y < z, then x < z (by transitive law of order of real numbers).
EXERCISE: "Odd Product" Relation
Define a relation R on the set of positive integers β€βΊ as follows: for all a, b β β€βΊ, a R b iff a Γ b is odd.
Solution: Recall that the product of two positive integers is odd if and only if both of them are odd.
a. Reflexive: R is not reflexive, because 2 β β€βΊ but 2 R 2 is false since 2 Γ 2 = 4 which is not odd. b. Symmetric: R is symmetric, because if a R b then a Γ b is odd or equivalently b Γ a is odd (since b Γ a = a Γ b) β b R a. c. Transitive: R is transitive, because if a R b then a Γ b is odd β both "a" and "b" are odd. Also bRc means b Γ c is odd β both "b" and "c" are odd. Now if aRb and bRc, then all of a, b, c are odd and so a Γ c is odd. Consequently aRc.
EXERCISE: "Divides" Relation
Let "D" be the "divides" relation on β€ defined as: for all m, n β β€, m D n β m|n. Determine whether D is reflexive, symmetric or transitive.
Reflexive: Let m β β€. Since every integer divides itself, m|m β m β β€, therefore m D m β m β β€. Accordingly, D is reflexive.
Symmetric: Let m, n β β€ and suppose m D n. By definition, this means m|n. Clearly, it is not necessary that n|m. For example, 2|4 but 4 does not divide 2. Accordingly, if m D n then n D m is not true β m, n β β€. Hence D is not symmetric.
Transitive: Let m, n, p β β€ and suppose m D n and n D p. Now m D n β m|n β n/m is an integer. Also n D p β n|p β p/n is an integer. We note p/m = (p/n) Γ (n/m) = (an integer) Γ (an integer) = an integer. This implies m|p and so m D p. Thus if m D n and n D p then m D p β m, n, p β β€. Hence D is transitive.
EXERCISE: "Same First Name" Relation
Let A be the set of people living in the world today. A binary relation R is defined on A as follows: for all p, q β A, p R q β p has the same first name as q.
a. Reflexive: Since every person has the same first name as his/her self, for all p β A, pRp. Thus, R is reflexive. b. Symmetric: Let p, q β A and suppose pRq. This means p has the same first name as q β q has the same first name as p β q R p. Thus if pRq then qRp β p,q β A. Hence R is symmetric. c. Transitive: Let p, q, r β A and suppose p R q and q R r. Now pRq β p has the same first name as q and qRr β q has the same first name as r. Consequently, p has the same first name as r β p R r. Thus, if pRq and qRs then pRr β p, q, r β A. Hence R is transitive.
EQUIVALENCE RELATION
Let A be a non-empty set and R a binary relation on A. R is an equivalence relation if, and only if, R is reflexive, symmetric, and transitive.
π Definition β Equivalence Relation: A relation that is reflexive, symmetric, and transitive.
π Example: Let A = {1, 2, 3, 4} and R = {(1,1), (2,2), (2,4), (3,3), (4,2), (4,4)} be a binary relation on A. Note that R is reflexive, symmetric and transitive, hence an equivalence relation.
CONGRUENCES
Let m and n be integers and d be a positive integer. The notation m β‘ n (mod d) means that d | (m β n) (d divides m minus n). There exists an integer k such that (m β n) = d Β· k.
π Definition β Congruence Modulo d: m is congruent to n modulo d if d divides (m - n).
π Example: a. Is 22 β‘ 1 (mod 3)? Since 22-1 = 21 = 3Γ7, hence 3|(22-1), and so 22 β‘ 1 (mod 3). b. Is -5 β‘ +10 (mod 3)? Since -5 - 10 = -15 = 3Γ(-5), hence 3|((-5)-10), and so -5 β‘ 10 (mod 3). c. Is 7 β‘ 7 (mod 3)? Since 7 - 7 = 0 = 3Γ0, hence 3|(7-7), and so 7 β‘ 7 (mod 3). d. Is 14 β‘ 4 (mod 3)? Since 14 - 4 = 10, and 3 β€ 10 because 10 β 3Β·k for any integer k. Hence 14 is NOT congruent to 4 (mod 3).
EXERCISE: Congruence Mod 3 is an Equivalence Relation
Define a relation R on the set of all integers β€ as follows: for all integers m and n, m R n β m β‘ n (mod 3). Prove that R is an equivalence relation.
-
R is reflexive: For all m β β€, m R m means m β‘ m (mod 3). Since m - m = 0 = 3Γ0, 3|(m-m), and so m β‘ m (mod 3) β mRm. Hence R is reflexive.
-
R is symmetric: For all m, n β β€, if m R n then n R m. Now mRn β m β‘ n (mod 3) β 3|(m-n) β m-n = 3k, for some integer k β n - m = 3(-k), -k β β€ β 3|(n-m) β n β‘ m (mod 3) β nRm. Hence R is symmetric.
-
R is transitive: For all m, n, p β β€, if mRn and nRp then mRp. Now mRn and nRp means m β‘ n (mod 3) and n β‘ p (mod 3) β 3|(m-n) and 3|(n-p) β (m-n) = 3r and (n-p) = 3s for some r, s β β€. Adding: (m-n) + (n-p) = 3r + 3s β m - p = 3(r + s), where r + s β β€ β 3|(m-p) β m β‘ p (mod 3) β mRp. Hence R is transitive.
R being reflexive, symmetric and transitive, is an equivalence relation.
β Key Takeaways
For the exam, you must remember that a reflexive relation requires EVERY element of the set to have a loop (on itself), as shown by all 1s on the main diagonal of its matrix. A symmetric relation requires that for every arrow from a to b, there is also an arrow back from b to a, making the matrix symmetric across the diagonal. A transitive relation requires that if there is a path from a to b and from b to c, then there must be a direct arrow from a to c. The null relation (empty set) is trivially symmetric and transitive but never reflexive, while the universal relation (all possible pairs) is always reflexive, symmetric, and transitive. Finally, an equivalence relation combines all three properties, and congruence modulo d (m β‘ n mod d if d divides m-n) is the classic example of an equivalence relation, as proven by checking reflexivity (m-m=0), symmetry (if d|(m-n) then d|(n-m)), and transitivity (if d|(m-n) and d|(n-p) then d|(m-p)).
π§ Quick Revision Questions
- If a relation's matrix has 1,0,0 in the first column and 0,1,0 in the second column and 0,0,1 in the third column, is the relation reflexive? Why or why not?
- What does it mean for a relation to be "vacuously symmetric"? Give an example.
- For the relation R = {(1,2), (2,3), (1,3)} on set A = {1,2,3}, is R transitive? What if we remove (1,3)?
- What three conditions must a relation satisfy to be an equivalence relation? Prove that the "same age" relation on a group of people is an equivalence relation.
- Is 47 β‘ 11 mod 4? Show your work.
π Lecture 10 β Sets Continued
π Overview: This lecture explores the properties of binary relations on setsβreflexivity, symmetry, and transitivityβand examines how these properties are preserved under set operations like intersection and union. It also introduces irreflexive and antisymmetric relations, and culminates in the definition of a partial order relation, a fundamental concept in discrete mathematics.
ποΈ Topics Covered
The lecture begins by proving that the intersection of two reflexive, symmetric, or transitive relations retains those properties, and shows via counterexample that union does not preserve transitivity. It then defines irreflexive relations with directed graph and matrix representations, defines antisymmetric relations with graph and matrix representations, and finally defines and illustrates partial order relations through multiple examples including βless than or equal to,β the subset relation, the divisibility relation, and the relation defined by b = a^r.
π Lecture Summary
EXERCISE
Suppose R and S are binary relations on a set A. The lecture asks whether R β© S is reflexive, symmetric, or transitive if R and S individually possess those properties.
a. R β© S is reflexive: Suppose R and S are reflexive. Then β a β A, (a,a) β R and (a,a) β S. By definition of intersection, β a β A, (a,a) β R β© S. Accordingly, R β© S is reflexive.
b. R β© S is symmetric: Suppose R and S are symmetric. To prove R β© S is symmetric, show that β a,b β A, if (a,b) β R β© S then (b,a) β R β© S. Suppose (a,b) β R β© S β (a,b) β R and (a,b) β S. Since R is symmetric, (b,a) β R. Similarly, since S is symmetric, (b,a) β S. Thus (b,a) β R and (b,a) β S β (b,a) β R β© S. Accordingly, R β© S is symmetric.
c. R β© S is transitive: Suppose R and S are transitive. To prove R β© S is transitive, show that β a,b,c β A, if (a,b) β R β© S and (b,c) β R β© S then (a,c) β R β© S. Suppose (a,b) β R β© S and (b,c) β R β© S β (a,b) β R, (a,b) β S, (b,c) β R, and (b,c) β S. Since R is transitive, (a,c) β R. Since S is transitive, (a,c) β S. Hence (a,c) β R and (a,c) β S β (a,c) β R β© S. Accordingly, R β© S is transitive.
EXAMPLE:
Let A = {1,2,3,4} and let R and S be transitive binary relations on A defined as: R = {(1,2), (1,3), (2,2), (3,3), (4,2), (4,3)} and S = {(2,1), (2,4), (3,3)} Then R βͺ S = {(1,2), (1,3), (2,1), (2,2), (2,4), (3,3), (4,2), (4,3)}. We note (1,2) and (2,1) β R βͺ S, but (1,1) β R βͺ S. Hence R βͺ S is not transitive.
IRREFLEXIVE RELATION
Let R be a binary relation on a set A. R is irreflexive iff for all a β A, (a,a) β R. That is, R is irreflexive if no element in A is related to itself by R.
π Definition β Irreflexive Relation: A relation R on a set A is irreflexive if and only if for every element a in A, the pair (a,a) is NOT in R.
π‘ Why this matters: Irreflexivity is the opposite of reflexivityβwhile reflexive means every element relates to itself, irreflexive means NO element relates to itself.
REMARK: R is not irreflexive iff there is an element a β A such that (a,a) β R.
EXAMPLE: Let A = {1,2,3,4} and define the following relations on A: Rβ = {(1,3), (1,4), (2,3), (2,4), (3,1), (3,4)} Rβ = {(1,1), (1,2), (2,1), (2,2), (3,3), (4,4)} Rβ = {(1,2), (2,3), (3,3), (3,4)} Then Rβ is irreflexive since no element of A is related to itself in Rβ, i.e., (1,1)βRβ, (2,2)βRβ, (3,3)βRβ, (4,4)βRβ. Rβ is not irreflexive since all elements of A are related to themselves in Rβ. Rβ is not irreflexive since (3,3) β Rβ. Note that Rβ is not reflexive. A relation may be neither reflexive nor irreflexive.
DIRECTED GRAPH OF AN IRREFLEXIVE RELATION
Let R be an irreflexive relation on a set A. Then by definition, no element of A is related to itself by R. Accordingly, there is no loop at each point of A in the directed graph of R.
EXAMPLE: Let A = {1,2,3} and R = {(1,3), (2,1), (2,3), (3,2)} be represented by the directed graph. [No loops at any vertex.]
MATRIX REPRESENTATION OF AN IRREFLEXIVE RELATION
Let R be an irreflexive relation on a set A. Then by definition, no element of A is related to itself by R. Since the self-related elements are represented by 1's on the main diagonal of the matrix representation of the relation, for irreflexive relation R, the matrix will contain all 0's in its main diagonal.
EXAMPLE: Let A = {1,2,3} and R = {(1,3), (2,1), (2,3), (3,2)} be represented by the matrix: M = 1 2 3 1 [0 0 1] 2 [1 0 1] 3 [0 1 0] Then R is irreflexive, since all elements in the main diagonal are 0's.
EXERCISE
Let R be the relation on the set of integers Z defined as: for all a,b β Z, (a,b) β R β a > b. Is R irreflexive?
SOLUTION: R is irreflexive if for all a β Z, (a,a) β R. Now by the definition of given relation R, for all a β Z, (a,a) β R since a > a is false. Hence R is irreflexive.
ANTISYMMETRIC RELATION
Let R be a binary relation on a set A. R is anti-symmetric iff β a,b β A, if (a,b) β R and (b,a) β R then a = b.
π Definition β Antisymmetric Relation: A relation R on a set A is antisymmetric if whenever (a,b) and (b,a) are both in R, then a and b must be the same element.
REMARK:
- R is not anti-symmetric iff there are elements a and b in A such that (a,b) β R and (b,a) β R but a β b.
- The properties of being symmetric and being anti-symmetric are not negatives of each other. A relation can be both, neither, or one but not the other.
π‘ Why this matters: A relation can be both symmetric and antisymmetric (like equality) or neither (like the example with (1,3) and (3,1) but 1β 3).
EXAMPLE: Let A = {1,2,3,4} and define the following relations on A: Rβ = {(1,1), (2,2), (3,3)} Rβ = {(1,2), (2,2), (2,3), (3,4), (4,1)} Rβ = {(1,3), (2,2), (2,4), (3,1), (4,2)} Rβ = {(1,3), (2,4), (3,1), (4,3)}
Rβ is anti-symmetric and symmetric (only pairs are same elements). Rβ is anti-symmetric but not symmetric because (1,2) β Rβ but (2,1) β Rβ. Rβ is not anti-symmetric since (1,3) and (3,1) β Rβ but 1 β 3. Note that Rβ is symmetric. Rβ is neither anti-symmetric because (1,3) and (3,1) β Rβ but 1 β 3, nor symmetric because (2,4) β Rβ but (4,2) β Rβ.
DIRECTED GRAPH OF AN ANTISYMMETRIC RELATION
Let R be an anti-symmetric relation on a set A. Then by definition, no two distinct elements of A are related to each other in both directions. Accordingly, there is no pair of arrows between two distinct elements of A in the directed graph of R.
EXAMPLE: Let A = {1,2,3} and R = {(1,1), (1,2), (2,3), (3,1)}. R is anti-symmetric, since there is no pair of arrows between two distinct points in A. (Any two distinct points have at most one arrow between them.)
MATRIX REPRESENTATION OF AN ANTISYMMETRIC RELATION
Let R be an anti-symmetric relation on a set A = {aβ, aβ, ..., aβ}. Then if (aα΅’, aβ±Ό) β R for i β j, then (aβ±Ό, aα΅’) β R. Thus in the matrix representation of R, there is a 1 in the iα΅Κ° row and jα΅Κ° column iff the jα΅Κ° row and iα΅Κ° column contains 0, and vice versa.
EXAMPLE: Let A = {1,2,3} and R = {(1,1), (1,2), (2,3), (3,1)} on A be represented by the matrix: M = 1 2 3 1 [1 1 0] 2 [0 0 1] 3 [1 0 0] Then R is anti-symmetric as shown by the form of matrix M.
PARTIAL ORDER RELATION
Let R be a binary relation defined on a set A. R is a partial order relation if and only if R is reflexive, antisymmetric, and transitive. The set A together with a partial ordering R is called a partially ordered set or poset.
π Definition β Partial Order Relation: A relation that is reflexive, antisymmetric, and transitive. The set with this relation is called a partially ordered set (poset).
EXAMPLE
Let R be the set of real numbers and define the "less than or equal to" on R as follows: for all real numbers x and y in R, x β€ y β x < y or x = y. Show that β€ is a partial order relation.
SOLUTION: β€ is reflexive: For β€ to be reflexive means that x β€ x for all x β R. But x β€ x means that x < x or x = x, and x = x is always true. Hence under this relation every element is related to itself.
β€ is anti-symmetric: For β€ to be anti-symmetric means that β x,y β R, if x β€ y and y β€ x, then x = y. This follows from the definition of β€ and the trichotomy property, which says that "given any real numbers x and y, exactly one of the following holds: x < y or x = y or x > y."
β€ is transitive: For β€ to be transitive means that β x,y,z β R, if x β€ y and y β€ z then x β€ z. This follows from the definition of β€ and the transitive property of order of real numbers.
Thus β€ is a partial order relation on R.
EXERCISE
Let A be a non-empty set and P(A) the power set of A. Define the "subset" relation, β, as follows: for all X,Y β P(A), X β Y β β x, if x β X then x β Y. Show that β is a partial order relation.
SOLUTION:
- β is reflexive: Let X β P(A). Since every set is a subset of itself, X β X for all X β P(A).
- β is anti-symmetric: Let X,Y β P(A) and suppose X β Y and Y β X. Then by definition of equality of two sets, X = Y.
- β is transitive: Let X,Y,Z β P(A) and suppose X β Y and Y β Z. Then by the transitive property of subsets, X β Z.
EXERCISE
Let "|" be the "divides" relation on a set A of positive integers. That is, for all a,b β A, a|b β b = kΒ·a for some integer k. Prove that | is a partial order relation on A.
SOLUTION:
-
"|" is reflexive: [Show β a β A, a|a] Suppose a β A. Then a = 1Β·a, so a|a by definition of divisibility.
-
"|" is anti-symmetric: [Show β a,b β A, if a|b and b|a then a=b] Suppose a|b and b|a. By definition of divisibility, there are integers kβ and kβ such that b = kβΒ·a and a = kβΒ·b. Now b = kβΒ·a = kβΒ·(kβΒ·b) = (kβΒ·kβ)Β·b. Dividing both sides by b gives 1 = kβΒ·kβ. Since a,b are positive integers, kβ and kβ are both positive integers. The equation kβΒ·kβ = 1 can hold only when kβ = kβ = 1. Thus a = kβΒ·b = 1Β·b = b.
-
"|" is transitive: [Show β a,b,c β A, if a|b and b|c then a|c] Suppose a|b and b|c. By definition of divisibility, there are integers kβ and kβ such that b = kβΒ·a and c = kβΒ·b. Now c = kβΒ·b = kβΒ·(kβΒ·a) = (kβΒ·kβ)Β·a = kβΒ·a where kβ = kβΒ·kβ is an integer β a|c.
Thus "|" is a partial order relation on A.
EXERCISE
Let R be the relation defined on the set of integers Z as follows: for all a,b β Z, aRb iff b = aΚ³ for some positive integer r. Show that R is a partial order on Z.
SOLUTION: [R is reflexive]: For any a β Z, a = aΒΉ, so aRa.
[R is anti-symmetric]: Let a,b β Z and suppose aRb and bRa. Then there are positive integers r and s such that b = aΚ³ and a = bΛ’. Now a = bΛ’ = (aΚ³)Λ’ = aΚ³Λ’ β rs = 1. Since r and s are positive integers, this equation holds iff r = 1 and s = 1, and then a = bΒΉ = b.
[R is transitive]: Let a,b,c β Z and suppose aRb and bRc. Then there are positive integers r and s such that b = aΚ³ and c = bΛ’. Now c = bΛ’ = (aΚ³)Λ’ = aΚ³Λ’ = aα΅ (where t = rs is also a positive integer). Hence aRc.
Accordingly, R is a partial order relation on Z.
β Key Takeaways
The intersection of two reflexive, symmetric, or transitive relations preserves those properties, but union does not necessarily preserve transitivity. An irreflexive relation has no self-related elements, shown by the absence of loops in its directed graph and all zeros on the main diagonal of its matrix. An antisymmetric relation prohibits bidirectional arrows between distinct elements, meaning its matrix cannot have 1's in mirror positions (i,j) and (j,i) for iβ j. A partial order relation requires reflexivity, antisymmetry, and transitivity simultaneouslyβkey examples include β€ on real numbers, β on power sets, and | (divisibility) on positive integers. Understanding these properties is essential for analyzing ordered structures in mathematics.
π§ Quick Revision Questions
- If R and S are both reflexive relations on a set A, is R βͺ S necessarily reflexive? Explain why or why not.
- What condition must be met for a relation to be classified as irreflexive? How does this differ from not being reflexive?
- Give an example of a relation that is both symmetric and antisymmetric. What type of relation must this be?
- What three properties must a relation satisfy to be considered a partial order relation? Name one example from the lecture and one from real life.
- In the matrix representation of an antisymmetric relation, what pattern of 1's is forbidden?