NBG Set Theory and Binary Relation
In this chapter, we will discuss further topics on set theory, or more specifically, relations. With set as tool, we can categorize things and try to build connections between them, like defining a function from a preimage to an image. Relation is a superset , i.e., generalization of function, which is crucial to topics that we will discuss later in this chapter.
In real life, relation is referred to as some connections between one person or one group of people to the other.
-
Imagine a list of students and their grades in a class. Each student (let’s say, by their student ID) is linked to a specific grade. This “student-to-grade” pairing is an example of a functional relation, because every student has one and only one grade assigned.
-
Consider the relationship “has the same birthday as” among people. If person A has the same birthday as person B, and person B has the same birthday as person C, then person A also has the same birthday as person C. This relationship is an equivalence relation because it’s reflexive (everyone has the same birthday as themselves), symmetric (if A shares a birthday with B, then B shares a birthday with A), and transitive (if A shares a birthday with B, and B with C, then A shares a birthday with C).
-
Think about the books on a shelf organized by height. Each book can be considered as “shorter than or equal to” the book next to it if you move from left to right. This arrangement demonstrates an order relation because it’s reflexive (each book is the same height as itself), antisymmetric (if one book is both taller and shorter than another, they must be the same book), and transitive (if one book is shorter than a second, and the second is shorter than a third, then the first book is shorter than the third).
The notion is still quite similar in the context of mathematics. From many examples we can see this. Like all the mathematical operations we have defined, the mapping in a function, congruence… To sum up, relation is am abstract topic, yet not hard to understand, since it can be related to the material world easily.
Class
Additionally, we introduce a new concept related to set to explain what is relation. The set theory we discussed in the first part of this book is called Naive Set Theory, which Is actually not the modern set theory. In many aspects, it is not reliable and causes a lot of issues. A very famous example is Russell’s Paradox initiated by the British Philosopher and Mathematician.
Russell’s Paradox illustrates a significant problem in the naive set theory, which assumed sets could include themselves. The paradox is encapsulated in whether the “set of all sets that do not contain themselves” contains itself. If it contains itself, it contradicts its defining property. Conversely, if it does not contain itself, then by definition, it must contain itself. This dilemma indicated the limitations of the naive set theory approach, leading to contradictions. To address these issues, the concept of classes was introduced in NBG Set Theory (von Neumann-Bernays-Gödel set theory).
Classes allow for the conceptualization of collections too large or abstract to be considered as sets, thereby circumventing the paradoxes associated with a more naive interpretation of set theory.
An interesting fact is that the von Neumann here is exactly John von Neumann, who initiated von Neumann Architecture for computer. It seems that a great Computer Scientist is always also a great Mathematician.
A class is a collection of objects that are grouped together based on a shared property. Classes differ from sets in that they can represent collections of any size, including those too large to be considered as sets, such as the “class of all sets”. This concept is essential for avoiding paradoxes in set theory, allowing the discussion of large and abstract collections that cannot otherwise be accommodated within the framework of sets.
In NBG set theory, a class is a collection of sets that can be unambiguously defined by a property that all its members share. Formally, a class is defined as: where is a property or predicate formulable in the language of set theory, applicable to sets . If a class is not a set, it is called a proper class. For example, the class of all sets, which cannot be a member of any class, is a proper class.
Distinguishing set and class in NBG and Naive theory
Naive set theory operates under the general principle that any well-defined collection of objects forms a set. This unrestricted comprehension leads to paradoxes such as Russell’s paradox. In contrast, NBG set theory distinguishes between sets, which are elements of other classes, and classes, which may not necessarily be elements of other classes.
A key distinction in NBG set theory is that a set is a class that is an element of another class, while a proper class, such as the class of all sets, cannot be an element of any class. This distinction helps avoid the paradoxes typical of naive set theory by restricting certain collections from being members of other collections.
Furthermore, in NBG, sets form a subclass of classes, meaning all sets are classes but not all classes are sets. This hierarchical structure allows for a more rigorous foundation for set theory, accommodating larger collections like the class of all sets or the class of all ordinal numbers, which themselves cannot be sets due to their extensive size. We also introduce some of the axioms that is really important for the content here, they are easy to understand, but are important prerequisite for our further discussion.
Two classes are equal if and only if they have the same elements. Formally, the axiom is expressed as:
The other Axiom is on creating new classes.
For each open sentence there exists a class which consists precisely of those sets which satisfy the condition .
The class whose existence is postulated by the Axiom is denoted by ; thus is a term of the theory NBG and the assertion is true if and only if is a set and is true.
Properties and Operations of Class
Since the definition of Class and set are related, there are a lot of overlap in their properties. The union and intersection of two classes are defined in exactly the same way as the union and intersection of two sets in naïve set theory: if and are classes, then So a set is a member of if and only if it is a member of either or (or both); is a member of if and only if it is a member of both and .
The usual properties of these unions and intersections are established as in naïve set theory. Namely, we have the properties known as idempotence, associativity, commutativity, and distributivity,
We write as an abbreviation for . Then for each class we define the complement of to be the class
For two classes and , the difference is defined as:
Also, note that double negation and De Morgan’s Law also work for class.
As what we have discussed in set theory that there exist some empty sets, we also have null class and universe class.
Empty class and universe class are defined by
Classes also have their exclusive operations, including intersection and union.
Let be a class; the union and intersection of the class are the classes Where is a set and is a class.
Thus a class belongs to if and only if is a set and belongs to at least one of the members of belongs to if and only if is a set and belongs to every member of
The definition is quite different from intersection and union of sets, as class is a generalization of set from higher level abstraction. Also, the intersection and union for sets are binary operations, while unary for one class.
Below is a brief comparison.
Set Union and Intersection:
-
For two sets and , their union is the set of all elements that belong to either or . Formally: .
-
For two sets and , their intersection is the set of all elements that belong to both and . Formally: .
Class Union and Intersection:
-
For a class , the class union is the set of all elements such that there exists a class , where is a member of , and is an element of . Formally: .
-
For a class , the class intersection is the set of all elements such that for every class , if is a member of , then is an element of . Formally: .
Comparison:
-
Set union and intersection operate on two sets, while class union and intersection operate on all member sets of a class.
-
Set union includes elements that are in either or , while class union includes elements that are in at least one member of .
-
Set intersection includes elements that are in both and , while class intersection includes elements that are in all members of .
-
The result of set union and intersection is always a set, while the result of class union and intersection is not necessarily a set , but more likely a class that contains sets.
By comparing these concepts, we can see that class union and intersection are generalizations of set operations at a higher level of abstraction. They allow us to perform operations on the member sets of a class to obtain new sets, which is particularly useful when studying advanced topics in mathematical foundations and set theory.
There are several lemmas related to intersection and union of class.
and
Let be a class. Then we have Since does not literally have any member. Any set is a member of universe class Thus by the Axiom of Extensionality.
Again let be a class. Then (since has no members).
So by the Axiom of Extensionality.
The inclusive relation of class is very similar to set.
If and are classes such that every member of is also a member of , i.e., such that we have we say that is included in , includes or is a subclass of , and we write or . (If is a set and we say that is a subset of .) If and there is at least one set such that but , we say that is properly included in , properly includes or is a proper subclass of , and we write or .
We can also extend power set to power class. For every class we define the power class of to be the class of all subsets of , i.e., . This brings us to another axiom in NBG set theory.
For every set there exists a set such that if and only if .
The Power Set Axiom thus asserts that every subclass of a set is actually a set (since it is an element of the set whose existence is asserted by the axiom) and furthermore that the power class of a set is also a set (and so is usually referred to as the power set of ).
The rest of the axioms are as follows.
For all sets and the class is a set.
The set is denoted by and such a set is called an unordered pair. If the unordered pair is denoted by and is called singleton .
In set theory, an unordered pair refers to a collection of two elements in which the sequence of the elements does not matter. This is represented as , indicating a set that contains exactly two distinct elements and . The fundamental property of unordered pairs is that , asserting that the order of elements is immaterial.
The concept of an unordered pair is not limited to sets; it extends to classes in certain set theories that distinguish between sets and proper classes. While sets are collections of elements that themselves can be elements of other sets, proper classes are collections too large to be sets and hence cannot be elements of other collections. Nonetheless, the notion of grouping two objects into an unordered pair applies analogously, symbolizing the collection of those objects without regard to order.
For every set the class is a set.
We can also extend Cartesian Product to class. Let and be sets. Then the set is denoted by and is called the ordered pair with first coordinate and second coordinate . Lét and be classes; then the Cartesian product of and is the lass
i.e. is the class of all ordered pairs with first coordinate in and second coordinate in
If is an open sentence involving the free variables and we shall allow ourselves to write
as an abbreviation for
So we can abbreviate the definition of to
Binary Relations, Composition and Inverse
In mathematics, the most fundamental and ubiquitous type of relation is the binary relation. This term refers to a relationship between two objects or sets. We understand that a ‘set’ may encompass any concept, not solely in the mathematical sense but also in a material one. Relations may exist objectively between certain objects and not at all for others. Similarly, objects or sets of objects, which exist objectively, hold the potential for an infinite number of relationships with one another. This perspective can seem philosophically abstract, positing that any scenario is conceivable. However, we can convey this more clearly. Recall our discussion of the Cartesian product as a set extension, where we consider two sets, and . These sets could represent any discernible entity or indiscernible concept. Theoretically, there could be countless relationships among all elements of these sets, and the capacity of two sets to form a Cartesian product is indicative of a general type of relationship. Consequently, the elements of the power set exemplify all possible cases of a certain kind of relationship.
A vivid mathematical example is the definition of Euclidean spaces, where an infinite number of subspaces can be defined, each representing a unique binary relation within the space.
We first introduce the definition of a binary relation in terms of sets.
A Binary Relation from a set to a set is a subset of the Cartesian product . For elements and , if the pair belongs to the subset , then we say is related to by the relation , denoted as , whose negation is .
In last section, we introduced the higher abstraction of sets, which is class. Classes also have Cartesian product,thus, we can give a general definition to all relations using class.
A relation is a class of ordered pairs.
Let be a relation. We define the domain and range of to be the classes Dom and Range given by If is a relation and , we say that is -related to and that is an -relative of . Thus Dom is the class of all sets that have -relatives, and Range is the class of all sets that are -relatives.
Now we look into several concrete examples of relation.
Consider the set of all points on a plane. The relation defined by the equation of a circle, , includes all points that satisfy this equation. This relation is not a function because, for most values of , there are two possible values of that satisfy the equation, one positive and one negative (except for the points where , where there is only one value of ).
In contrast, a function would allow each to be associated with exactly one . For instance, the square function is a function because each value of corresponds to exactly one value of .
In the figure we have defined a circle and a quadratic function, clearly we see that a function can never have two value for one , while this is possible for the circle.
Figure pending: Visual Comparison of a Relation and a Function
Let A be the set {1,2,3,4}. Which ordered pairs are in the relation divides
Solution: Because is in R if and only if and are positive integers not exceeding 4 such that divides ,we see that
Figure pending: R = {(a, b) ∣ a divides b}
This relation also differs from function, since for member of , it is possible to map to multiple members in .
A relation is said to be functional if each element of its domain has exactly one -relative; a functional relation is also called a function. If is a functional relation then for each element of its domain we denote the unique -relative of by
This leads us to the next axiom of NBG theory.
For every functional relation , if the domain of is a set then the range of is also a set.
Mapping, Composition, and Inverse
In naive set theory and function in part 1 of the book, we gave a rough definitions to mappings. With class, we can make it more concrete.
A mapping is an ordered pair where and are sets and is a functional relation between and such that Dom If is a mapping we say that is a mapping from to we call the domain of the codomain of and the graph of . If is a mapping with domain and codomain we often write If is any element of the set then the set consists of a single element of which we denote by we call it the image of or the value of
It is clear from the definition of the term “mapping” that in order to describe a mapping we must give the domain and codomain of and also, for each element of the domain we must describe the unique element of the codomain such that belongs to the graph of , i.e. we must describe for each element of its image under in
Let be a mapping from to . For each subset of we denote the subset of by in particular, if is any element of we have For each subset of we denote the subset of by
Let be a mapping from to be a subset of Then the restriction of to is the mapping f\mid A_1= \left((A_1,B\),R\cap(A_1\times B)\right).
Earlier, we discussed composition and inverse of function. Now that we have known that function is a kind of relation, can we compose or inverse all other relations? Naturally the answer is yes.
Let be a mapping. Then is said to be surjective or to be a surjection if we have Range i.e. if every element of is the image under of at least one element of
Next, is injective if the inverse relation is functional. Equivalently, each element of the range of is the image under of exactly one element of . In symbols, whenever for , we have .
The mapping is said to be bijective or to be a bijection if it is both injective and surjective. If and are sets we say that equipotent to or that if there exists a bijective mapping from to
Let be a mapping. Then is a mapping if and only if is bijective; in this case we write and call the inverse mapping of Clearly is a bijection from to with inverse
Here are some examples of special mappings.
A function is surjective if for every element in , there is at least one element in such that . For instance, let and . Define by , , and . This function is surjective because every element of is the image of at least one element of .
A function is injective if no two different elements in map to the same element in . For example, let and . Define by , , and . This function is injective because each element of maps to a unique element of .
A function is bijective if it is both injective and surjective. For instance, let and . Define by , , and . This function is bijective, making and equinumerous.
If is a bijective function from to , then the inverse is a function from to that reverses the mapping of . Using the bijective function from the previous example, we define by , , and .
If and are relations, the composition of and is the relation given by If is a relation between and and is a relation between and then clearly is a relation between and , and we have and Range
The idea of composition also works for mappings.
Let and be mappings. Then clearly is also a mapping, which we denote by and call the composition or composed mapping of and . For each element of we have
The other equivalent definition is that Let be a relation from a set to a set and S a relation from to a set . The of and S is the relation consisting of ordered pairs , where , and for which there exists an element such that and We denote the composite of and by
Similarly, we can define inverse relation.
If and are classes then a relation between is a subclass of , i.e. a relation such that Dom and Range A relation on a class is a subclass of
If is a relation, the inverse of is the relation given by If is a relation between and then is a relation between and clearly Dom and Range
Let be a relation, any class. Then the image of is the class consisting of all -relatives of all members of We denote this class by Thus Again let be a relation and be any class. Then the inverse image of under is the class which we write Thus With functional relation and mapping, we can define a more specific relation, which very special and practical.
Let be any set; let (we call the diagonal of Then is a functional relation between and with domain The mapping from to is called the identity mapping of Clearly we have for each element of
The identity mapping for a set is a function that maps every element to itself. Here are some examples of identity mappings on various sets:
-
Let . The identity mapping on is where for all .
-
Let . The identity mapping on is where for each fruit in set .
-
Let . The identity mapping on is where for all .
The diagonal for each of these sets would be as follows:
-
The diagonal of , , would be the set of all ordered pairs such that .
-
The diagonal of , , would be the set .
-
The diagonal of , , would be the set of all ordered pairs such that .
In all these cases, the identity mapping illustrates the concept of a function where the input is the same as the output for each element of the set.
Families of Sets
In part 1, we discussed sequence. Sequence is defined (see definition def_sequence) by a relation between index and a mathematical expression related to the index, and commonly the index has . Sequence is actually a special family of set.
Let and be classes, and is a functional relation between and . Then is sometimes called a family of elements of indexed by (or with and we write instead of . In particular, if is a set then a family of elements of is called a family of subsets of indexed by If is such a family and we write for each element in then we denote the family by
If is a set of subsets of a set then the diagonal is a family of subsets of which may sometimes be denoted by
Let be a family of subsets of a set We define the union of the family to be Thus belongs to the union of the family if and only if it belongs to at least one of the sets with in Of course if is a set of subsets of the union of the corresponding family coincides with the union of the set as previously defined:
Again let be a family of subsets of a set The intersection of this family is defined to be So belongs to the intersection of the family if and only if it belongs to all the sets with in
We notice that if is empty then we have If X i a non-empty set of subsets of the intersection of the corresponding family coincides with the intersection of the set as previously defined
Consider the set and a family of its subsets , where and
The union of the family is the set of elements that are in at least one of the sets :
The intersection of the family is the set of elements that are in every one of the sets :
Let be a set. A sequence in is a function from the set of natural numbers to . The sequence can be represented as a family of sets , where each is an element of , and is the index representing the position of the element in the sequence.
The -th term of the sequence is denoted by , and the sequence itself can be written as , which is the family of elements of indexed by .
Let be a family of sets with index set Let Then the product of the family is the set
\prod_{i\in I}X_i=\{f:(f\in\operatorname{Map}(I,X))\wedge(\forall i)((i\in I)\Longrightarrow(f(i)\in X_i))\}.$$ If we write $f(i)=x_i$ for each index $i$ in $I$ it is sometimes helpful to denote the element $f$ of $\prod_{i\in I}X_i$ by $\prod_{i\in I}x_i.$ For each index $j$ in $I$ we define a mapping $\pi_j$ from $\prod_{i\in I}X_i$ to $X_j$ by setting $$\pi_j(f)=f(j)\text{ for every }f\mathrm{~in~}\prod_{i\in I}X_i.The mapping is called the -th projection mapping from
Consider two sets and . The index set is . The product of the family of sets , which is , consists of all ordered pairs where the first element is from and the second is from . Thus, the product is:
Each ordered pair represents a function mapping to the union of and . For instance, one such function corresponding to the ordered pair is defined by:
Projection mappings from to are defined for each index by setting:
Hence, for our function , the projections are:
Family of Sets is related to another axiom of NBG set theory.
Let be a family of nonempty sets indexed by a set . Then the product is non-empty.
We can also define choice function of class.
Let be a family of non-empty sets. By a choice function for this family we mean a mapping from to such that for every index in we have thus a choice function is an element of the product If we have for every pair of distinct elements of we say that the family is then the range of a choice function for is a subset of which contains exactly one element from each set of the family. Such a set is called a selection set for the (pairwise disjoint) family
Thus the Axiom of Choice asserts that for every family of non-empty sets there exists a choice function and so for every pairwise disjoint family of non-empty sets there exists a selection set.
Consider the family of non-empty, pairwise disjoint sets: with the index set .
A choice function for this family might be defined as: This function chooses one element from each set , making the selection set for this family .
Reflexivity, Symmetry, and Transitivity
With basic relation we have defined, we can now look into some special relations with some specific properties. These properties are important, since these property will be used to further classify relations for us. All special relations could be related to the diagonal of the sets or classes involved in that specific relation.
The first special relation is actually already covered in the diagonal of class, which is the idea of reflexivity, meaning a relation from an object to itself.
Let be a relation on a set . The relation is said to be reflexive if , where . That is, for every element in , the pair belongs to .
Consider the following relations on the set :
Which of these relations are reflexive?
Solution: The relations and are reflexive because they both contain all pairs of the form , namely, and . The other relations are not reflexive because they do not contain all of these ordered pairs. In particular, and are not reflexive because is not in any of these relations.
And as a complement of Reflexivity, we can define Irreflexivity
A relation on a set is called irreflexive if , i.e., no pair of the form belongs to for any in .
Now we discuss symmetry of relation.
A relation on a set is symmetric if for every in , if then is also in , i.e.,
We can also define the complement of this kind of relation.
Let be a relation on a set . The relation is said to be asymmetric if for any in , whenever , then . This implies that no pair can be in both and unless , which is not permitted for asymmetric relations, thus , i.e. , .
There is also a type of relation called antisymmetric relation.
A relation on a set is antisymmetric if for all in , if and , then . That is, .
Some may confused by these similar terms. Below are the clarification and some examples.
-
A relation on a set is symmetric if for any , whenever is in , then is also in . Symmetry implies a mutual relationship.
-
A relation is asymmetric if for any , whenever is in , is not in . Asymmetry denotes a one-way relationship.
-
A relation is antisymmetric if for any , whenever both and are in , it must be that . Antisymmetry allows for a hierarchical ordering.
Let’s explore these properties through examples:
The relation “is a sibling of” is symmetric. If Tom is a sibling of Jerry, then Jerry is a sibling of Tom.
The “less than” relation on the real numbers is asymmetric. If , then it is not the case that .
The “divides” relation for integers is antisymmetric. For example, divides , and does not divide . But we can have 6 divides 6 itself.
Exercises
Determine whether each of the following is a set or a class in NBG set theory, and explain why.
-
The collection of all sets that do not contain themselves.
-
The set of all natural numbers.
-
The class of all ordinal numbers.
Below are the solutions.
-
The collection of all sets that do not contain themselves is a proper class. This is because any attempt to consider it as a set leads to Russell’s paradox, thus it cannot be a set within any consistent set theory including NBG.
-
The set of all natural numbers is a set. It is well-defined and does not lead to any paradoxes within NBG set theory. Furthermore, it is an element of the class of all sets.
-
The class of all ordinal numbers is a proper class because it is too large to be a set. If it were a set, it would lead to contradictions similar to those arising from considering the “set of all sets.”
Russel’s Paradox is fixed by introducing more strict set axioms to the set theory. In NBG theory, a proper class is defined as a top-level class that cannot be subclass of any other classes or sets, and this is the key to avoid the paradox in naive set theory. Explain in details that how this concept avoids the case in Russel’s Paradox.
With the introduction of the concept of classes, we can discuss collections that are too large to be considered as sets, such as the “class of all sets.” Therefore, the set described by Russell’s Paradox, denoted by , is no longer considered a legitimate set but rather a “proper class.” This means that we refrain from discussing as a set, thereby avoiding the paradox because proper classes are not subject to the operations and axioms that constrain sets. As a result, the axiomatic system does not permit the formation of sets that would lead to Russell’s Paradox.
Let be classes such that , Prove that
Let be classes such that Prove that
Below are exercises for binary relation.
Representation of Relations
In last section. we discussed binary relation and their properties. This section focuses on ways of representation. Symbolic language is accurate and not prone to make misunderstanding, yet it is not quite easy to understand to human minds. Therefore, we need straightforward ways to visualize them and assure the accuracy in the same time.
Representation By Matrix
The first commonly used method is matrix. A relation between finite sets can be represented using a zero-one matrix. Suppose that is a relation from to (Here the elements of the sets and have been listed in a particular, but arbitrary, order. Furthermore, when we use the same ordering for and The relation can be represented by the matrix , where
Consider the binary relation on the set defined by the pairs . We can represent as a matrix where the entry is 1 if and 0 otherwise. Thus, the matrix representing is given by: This matrix shows that there is a relation from 1 to 2, 2 to 3, and 3 to 1, as indicated by the ones in the matrix.
What about some other special relations? Here are more examples.
Reflexive Relations in Matrix
We defined reflexivity through the diagonal of a relation matrix. A relation on a set is reflexive if and only if every diagonal entry is . The off-diagonal entries may be chosen independently, so a reflexive relation need not be the identity relation.
A reflexive relation on a set requires that every element is related to itself. Thus, for the relation to be reflexive, it must include the pairs at minimum. The matrix representing such a reflexive relation is given by: Here, the diagonal elements of the matrix are all set to 1, reflecting the reflexive property that each element is related to itself. This diagonal structure is reminiscent of an identity matrix, where all diagonal elements are 1, and all off-diagonal elements are 0. In the context of relations, the presence of 1s on the diagonal is crucial for reflexivity. However, the values of and (the off-diagonal elements) do not influence the reflexivity of the relation and can be either 0 or 1. This highlights that while the matrix representing a reflexive relation must have 1s along its diagonal, it does not necessarily need to be an identity matrix.
Symmetric/Antisymmetric/Asymmetry Relation in Matrix
For a symmetric relation, if and only if . In its matrix, this means , or equivalently . Symmetry does not require the diagonal entries to be ; that additional condition belongs to reflexivity.
A relation on a set is symmetric if for any two elements and in , whenever , then is also in . Consider the symmetric relation defined by the pairs . The matrix representing this symmetric relation is given by: In this matrix, the entries are symmetric about the main diagonal. The presence of at positions and illustrates the symmetric nature of the relation, as both and are included in .
A reflexive relation, on the other hand, requires that each element be related to itself, leading to s along the main diagonal of its matrix. In the example above, the relation is not reflexive because it does not contain .
Although both reflexive and symmetric properties concern the main diagonal, they describe different aspects of a relation:
-
Reflexivity is about individual elements being self-connected, evidenced by s on the diagonal.
-
Symmetry involves pairs of elements and requires that if an element is related to an element , then must also be related to , leading to a mirrored symmetry across the diagonal.
A relation can be both reflexive and symmetric but does not need to be one to be the other. For instance, a purely symmetric relation need not include self-pairs like unless it is also intended to be reflexive.
An antisymmetric relation on a set involves a specific condition: for any two distinct elements and in ,if both and are in the relation , then must be equal to . This means that if ,it cannot be the case that both and are in .In terms of matrix representation:
Consider the set and define the relation on by the pairs . This relation is antisymmetric, which we can observe through its matrix representation. The matrix representing the relation is given by: In this matrix, note the following:
-
The entry (relation from 1 to 2), and (no relation from 2 to 1), satisfying the antisymmetric condition.
-
Similarly, and .
-
The diagonal entry does not violate antisymmetry as self-relations do not affect antisymmetry.
Antisymmetric relations allow entries on the main diagonal (self-relations) but restrict how elements can relate symmetrically off the diagonal, ensuring that if one direction is permitted, the opposite is not unless they are the same element.
An asymmetric relation is a stronger form of an antisymmetric relation. A relation on a set is asymmetric if, for any elements and in ,whenever is in , then cannot be in . This implies that if one direction between two different elements is allowed, the opposite direction is strictly forbidden, making it impossible for both and to exist in for any
Consider the set and define an asymmetric relation on by including the pairs . This relation is asymmetric as it does not contain both and for any and in . The matrix representing this relation is given by: In this matrix: - The entry and , supporting the asymmetric nature by the absence of the reverse relation. - The entry and , further demonstrating asymmetry.
This matrix shows no reciprocal relations between different elements, which is a defining characteristic of asymmetric relations. Note that self-relations (diagonal entries) are not present in this matrix, aligning with the strict definition of asymmetry which typically excludes self-relations as well.
Operation of Relation Matrix
We can find intersection or union of two relations easily by examining their matrices. This could be done by comparing each element with the same index one by one.
Let and be two relations.
The union is:
The intersection is:
Matrix is also possible to represent composition of relations. For these relations, in particular, suppose that is a relation from to and is a relation from to . Suppose that , , and have , , and elements, respectively. Let the zero-one matrices for , , and be , , and , respectively (these matrices have sizes , , and , respectively). The ordered pair belongs to if and only if there is an element such that belongs to and belongs to . It follows that if and only if for some . From the definition of the Boolean product, this means that
The matrix for is obtained by performing the Boolean product of and . This operation is similar to matrix multiplication, except that addition is replaced by the logical OR operation, and multiplication is replaced by the logical AND operation. The result is a matrix that represents the composition of the two relations: Each entry in is computed by taking the logical OR of the ANDs of the corresponding row from and the column from .
where the matrix representing is
The matrix for is found by taking the Boolean product of with itself. This operation is analogous to squaring a matrix, where we use Boolean algebra for addition and multiplication: The entries of indicate whether there is a path of length 2 between the nodes represented by the matrix indices in the relation .
Representation By Digraph
The other way to visualize relation is by using Directed Graph, or Digraph.
A digraph or directed graph is an ordered pair comprising:
-
A non-empty set , whose elements are called vertices or nodes.
-
A set of ordered pairs of vertices, called arcs, directed edges, arrows, or directed lines.
The directed edge is said to point from the vertex to the vertex . Unlike in an undirected graph, the edges in a digraph have a direction associated with them, indicated by the ordering of the vertices in the pair.
We will discuss further on graph in graph theory, now we just need to know that we will use it to visualize relation. A directed graph can be used to represent a binary relation between a set of elements. Here is an example.
Let set , the relation could be represented by the following graph.
Using Digraph is a very intuitive approach to visualize relation. In the graph, we use the element in the domain and codomain of the relation as vertex, and the relations are represented using the edges, which are also ordered pairs.
Using a graph is also easy to determine special patterns of relations such as reflexivity, symmetry, etc.
Consider the relation defined from set to itself, . This relation could be visualized by the following graph, which is reflexive.
We see that each object has a loop for a reflexive relation.
Consider the relation defined from set to itself, , and . This relation could be visualized by the following graphs.
Figure pending: R1 and R2 in Digraph
is symmetric because every edge between distinct objects has a matching edge in the opposite direction. is antisymmetric because the only pairs that occur in both directions are self-loops, although it may contain one-way edges between distinct objects.
For the cases of transitivity, it’s also quite clear in the following example.
Still consider the same set and the relation .
Figure pending: The original LaTeX illustration is retained in the source repository and needs a web-native asset export.
Both and are transitive. For , transitivity follows in particular from the reflexive loops on and . A relation that is reflexive, symmetric, and transitive is an equivalence relation, which we discuss next.
Exercises
List the ordered pairs in the relations on corresponding to these matrices (where the rows and columns correspond to the integers listed in increasing order).
-
Since the entry is a , is in the relation. Since entry is a , is not in the relation. Continuing in this manner, we see that the relation contains , , , , , , , , , , and .
-
The relation contains , , , , , , , and .
-
The relation contains , , , , , , , and .
Represent each of these relations on with a matrix (with the elements of this set listed in increasing order).
The relations corresponding to these matrices (from a to d) are:
How many nonzero entries does the matrix representing the relation on consisting of the first 1000 positive integers have if is
-
?
-
?
-
?
-
?
-
?
Note that the total number of entries in the matrix is .
-
There is a in the matrix for each pair of distinct positive integers not exceeding , namely in position where , as well as ‘s along the diagonal. Thus the answer is the number of subsets of size from a set of elements, plus , i.e., .
-
There two ‘s in each row of the matrix except the first and last rows, in which there is one . Therefore the answer is .
-
There is a in the matrix at each entry just above and to the left of the “anti-diagonal” (i.e., in positions . Therefore the answer is .
-
There is a in the matrix at each entry on or above (to the left of) the “anti-diagonal.” This is the same number of ‘s as in part (a), so the answer is again .
-
The condition is trivially true (since ), so all entries are .
Draw the directed graph that represents the relation
Figure pending: The original LaTeX illustration is retained in the source repository and needs a web-native asset export.
Let be a relation on a set . Explain how to use the directed graph representing to obtain the directed graph representing the complementary relation .
For each pair of vertices (including the pairs in which the two vertices are the same), if there is an edge from to , then erase it, and if there is no edge from to , put add it in.
Given the directed graphs representing two relations, how can the directed graph of the union, intersection, symmetric difference, difference, and composition of these relations be found?
We assume that the two relations are on the same set. For the union, we simply take the union of the directed graphs, i.e., take the directed graph on the same vertices and put in an edge from to whenever there is an edge from to in either of them. For intersection, we simply take the intersection of the directed graphs, i.e., take the directed graph on the same vertices and put in an edge from to whenever there are edges from to in both of them. For symmetric difference, we simply take the symmetric difference of the directed graphs, i.e., take the directed graph on the same vertices and put in an edge from to whenever there is an edge from to in one, but not both, of them. Similarly, to form the difference, we take the difference of the directed graphs, i.e., take the directed graph on the same vertices and put in an edge from to whenever there is an edge from to in the first but not the second. To form the directed graph for the composition of relations and , we draw a directed graph on the same set of vertices and put in an edge from to whenever there is a vertex such that there is an edge from to in , and an edge from to in .
Closure of Relations
Exercises
Equivalence Relations
In mathematics, an equivalence relation is a special type of binary relation that allows us to group elements of a set into disjoint subsets called equivalence classes. The idea behind equivalence relations is to capture a meaningful notion of “sameness” or “interchangeability” among elements.
Equivalence relations are characterized by three key properties: reflexivity, symmetry, and transitivity. These properties ensure that the relation partitions the set into equivalence classes, each containing elements that are equivalent in some sense.
Equivalence
A relation on a set is called an equivalence relation if it is reflexive, symmetric, and transitive. Two elements and that are related by an equivalence relation are called equivalent. The notation is often used to denote that and are equivalent elements with respect to a particular equivalence relation.
The concept of equivalence relations is a fundamental tool in many branches of mathematics. They allow us to focus on essential characteristics that elements share, abstracting away extraneous details. Some common examples include:
-
Equality of numbers
-
Congruence modulo in number theory
-
Similarity of triangles in geometry
-
Having the same cardinality for sets
Equivalence relations provide a way to decompose a set into a collection of equivalence classes, revealing important structural insights. They are essential for understanding quotient structures, modular arithmetic, and the role of abstraction in mathematical thought.
Let be an integer with . Show that the relation is an equivalence relation on the set of integers.
Recall from Section 4.1 that if and only if divides . Note that is divisible by , because . Hence, , so congruence modulo is reflexive.
Now suppose that . Then is divisible by , so , where is an integer. It follows that , so . Hence, congruence modulo is symmetric.
Next, suppose that and . Then divides both and . Therefore, there are integers and with and . Adding these two equations shows that . Thus, . Therefore, congruence modulo is transitive.
It follows that congruence modulo is an equivalence relation.
Let be a non-empty set, and define a relation on the power set (the set of all subsets of ) as follows: for any subsets , where denotes the cardinality (number of elements) of the set . In other words, two subsets are related by if and only if they have the same number of elements.
We can show that the relation defined above is an equivalence relation on :
-
Reflexivity: For any subset , we have , so .
-
Symmetry: If , then . Since equality of cardinalities is symmetric, we also have , so .
-
Transitivity: If and , then and . By the transitivity of equality, we have , so .
The equivalence classes under this relation are called cardinality classes. For a subset , its cardinality class consists of all subsets of that have the same cardinality as :
In other words, the cardinality classes partition into disjoint subsets based on the number of elements in each subset. For example, if , then the cardinality classes are:
-
(subsets with 0 elements)
-
(subsets with 1 element)
-
(subsets with 2 elements)
-
(subsets with 3 elements)
This equivalence relation captures the idea that two sets are “equivalent” if they have the same cardinality, regardless of their specific elements. The study of cardinality and the relationships between sets of different sizes is a fundamental aspect of set theory and plays a crucial role in the development of modern mathematics, including the theory of infinite sets and the foundations of mathematics.
Let be the relation on the set of real numbers such that if and only if and are real numbers that differ by less than 1, that is, . Show that is not an equivalence relation.
is reflexive because whenever . is symmetric, for if , where and are real numbers, then , which tells us that , so that . However, is not an equivalence relation because it is not transitive. Take , , and , so that , , but . That is, , , but not .
Equivalence Classes
We can dig deeper into equivalence by partitioning the set where the relation is built upon with respect to a member of the subset. We call this a Equivalence Class.
Let be an equivalence relation on a set A. The set of all elements that are related to an element of is called the class of . The equivalence class of with respect to is denoted by . When only one relation is under consideration, we can delete the subscript and write for this equivalence class.
In set notation we have For some member , we call a representative of the equivalence class.
What is the equivalence class of an integer for the equivalence relation ?
Since , so , which holds for all integer, including 0. We have , etc.
What are the equivalence classes of 0 and 1 for congruence modulo 2?
The equivalence class of 0 contains all integers such that . The integers in this class are those divisible by 4. Hence, the equivalence class of 0 for this relation is
The equivalence class of 1 contains all the integers such that . The integers in this class are those that have a remainder of 1 when divided by 4. Hence, the equivalence class of 1 for this relation is
This notion actually allows us to further abstract to congruence classes modulo .
Let be a positive integer. The congruence class of an integer modulo , denoted by , is the set of all integers such that , which means that divides . Formally, the congruence class is defined as:
Here are some other examples on equivalence class.
Find the equivalence class for under the relation of fraction simplification.
The equivalence class of consists of all fractions that simplify to , which includes all rational numbers where the numerator is half the denominator. Hence, the equivalence class is:
Find the equivalence class for the string “cat” under the relation of having the same length.
The equivalence class of the string “cat” consists of all strings of length 3. Examples include:
Congruence Class can be further interpreted by introducing partition of set. Recall (in definition def
) that the partition of a set are a possible combination of mutually disjoint subsets of a set. Suppose we have some set , than we can make form some three-member partition , where . Also we have . But notice that is .Now let’s relate this to congruence class.
Let be an equivalence relation on a set . These statements for elements and of are equivalent:
We first show that (i) implies (ii). Assume that . We will prove that by showing and . Suppose , where is any arbitrary member of . Then . Because and is symmetric, we know that . Furthermore, because is transitive and and , it follows that . Hence, . This shows that , since all elements of is also an element of . The proof that is similar.
Second, we will show that (ii) implies (iii). Assume that . It follows that because is nonempty (because since is reflexive).
Next, we will show that (iii) implies (i). Suppose that . Then there is an element with and . In other words, and . By the symmetric property, . Then by transitivity, because and , we have .
Because (i) implies (ii), (ii) implies (iii), and (iii) implies (i), the three statements, (i), (ii), and (iii), are equivalent.
Let be an equivalence relation on a set . The union of the equivalence classes is the whole set , because an element a of is in its own equivalence class, and there is no intersection between equivalence class of different elements. This is because from theorem one we have
If , then
This is because when , the intersection cannot be empty.
The partition of a set S exists if and only if the family of set index by with respect to subsets , , and when . And we have S as a family of set index by
Let , the set of all integers, and let be the equivalence relation of congruence modulo . Determine if the following statements are true:
-
is true because .
-
is true because both and have the same remainder when divided by , which means they are in the same equivalence class modulo .
-
is true because contains since , hence is in both and .
As all three statements are true, the statements (i), (ii), and (iii) are equivalent for the given equivalence relation.
Exercises
Determine the equivalence class of under the relation of congruence modulo .
The equivalence class of modulo , denoted , consists of all integers that leave a remainder of when divided by . This can be expressed as: where each element is of the form for some integer .
Let be the equivalence relation on defined by
Write down the equivalence classes of .
To find the equivalence classes of the relation , we need to analyze how the sets and affect the cardinality and thus the equivalence.
Consider the power set , which includes all subsets of :
We need to group these sets into equivalence classes based on the criterion .
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
Therefore, the equivalence classes are:
Let , and define on by if and only if is even. Determine if the following statements are true for and :
-
is false because is odd.
-
is false because is in the equivalence class of even remainders while is in the class of odd remainders.
-
is false because contains all even numbers and contains all odd numbers, so they have no elements in common.
In this case, statements (i), (ii), and (iii) are not equivalent because the relation is not defined as congruence modulo some number but rather by the parity of the difference between elements.
No that we can get partition of a set from a equivalence relation, can we inverse this process? That is, define a equivalence relation with some given set partitions? The answer is yes.
To see this, assume that is a partition on . Let be the relation on consisting of the pairs , where and belong to the same subset , in the partition. To show that is an equivalence relation we must show that is reflexive, symmetric, and transitive.
We see that for every , because is in the same subset of as itself. Hence, is reflexive. If , then and are in the same subset of in the partition, so that as well. Hence, is symmetric. If and , then and are in the same subset of in the partition, and and are in the same subset of of the partition. Because the subsets of in the partition are disjoint and belongs to and , it follows that . Consequently, and belong to the same subset of in the partition, so . Thus, is transitive.
It follows that is an equivalence relation. The equivalence classes of consist of subsets of containing related elements, and by the definition of , these are the subsets of in the partition. The theorem summarizes the connections we have established between equivalence relations and partitions.
Let be an equivalence relation on a set . Then the equivalence classes of form a partition of . Conversely, given a partition of the set , there is an equivalence relation that has the sets , as its equivalence classes.
For example, consider the set .
One possible equivalence relation on is “congruence modulo 3”. This relation partitions into the equivalence classes , , and .
Conversely, consider a partition of into subsets , , and . The equivalence relation induced by this partition is such that two numbers are related if and only if they are in the same subset .
Order Relations
Another important family is formed by order relations, including partial, total, and well orders. We begin with the most general notion, the partial order, and then specialize it.
Partial, Total, and Well Ordering
A relation on a set S is called a partial ordering or partial order if it is reflexive, antisymmetric, and transitive. A set together with a partial ordering is called a partial ordered set, or poset, and is denoted by . Members of S are called elements of the poset.
The reason why partial order relation has a specific notation for poset is because that order relation is usually defined on the same set(for the domain and codomain). For equivalence relation, however, we see more relation between different sets.
The most common partial order relation is “greater than or equal to”, “is subset to”, and “divides”.
Show that the greater than or equal to relation is a partial ordering on the set of integers.
Solution: Because for every integer , is reflexive. If and , then . Hence, is antisymmetric. Finally, is transitive because and imply that . It follows that is a partial ordering on the set of integers and is a poset.
The divisibility relation is a partial ordering on the set of positive integers, because it is reflexive, antisymmetric, and transitive, as was shown in Section 9.1. We see that is a poset.
Show that the inclusion relation is a partial ordering on the power set of a set .
Solution: Because whenever is a subset of , is reflexive. It is antisymmetric because and imply that . Finally, is transitive, because and imply that . Hence, is a partial ordering on , and is a poset.
For convenience of representation, we need a symbol to define the operator for an arbitrary partial ordering.
is used to define any arbitrary partial order relation on set . Alternatively, we also have to denote that but .
With this, we can define comparability of the relation. This helps us to distinguish different types of special partial orderings.
The elements and of a poset (S, are called comparable if either or . When and are elements of S such that neither nor and are called incomparable.
In the poset , are 3 and 9 comparable? Also consider 4 and 5.
3 and 9 are obviously comparable, since even though , we still have . So 3 and 9 are comparable. While and , so they are not comparable.
We see that for divisibility, there are cases that the relation is not comparable among the elements that are involved here. Actually this is why we call it partial order, because there are cases that things cannot be compared or cannot build relation. If we can have a very special partial ordering on that is comparable for every member of the set, we call it a total ordering or total order relation.
If is a poset and every two elements of are comparable, is called a totally ordered or linearly ordered set, and is called a total order or a linear order. A totally ordered set is also called a chain.
Total ordering is also very quite familiar to us, actually, the relation we just mentioned is also a total order relation, and so as .
Here are some other examples.
The set of words in a dictionary with the alphabetical order is a totally ordered set because any two words can be compared based on lexicographic order.
The set of points on a line with a defined direction is a totally ordered set, where any two points can be compared based on their position relative to each other along the line.
So we know that total orderings are special partial orderings. Now, can we manage to find a kind of special relation with respect to total ordering? The answer is yes, and we have actually known this relation, as it is the foundation of the principal of mathematical induction (theorem principle/induc).
The poset is a well-ordered set if is total ordering and every nonempty subset of has a least element.
Here are some example of well-ordering.
The set of natural numbers with the usual order is not only a totally ordered set but also a well-ordered set because every non-empty subset of has a smallest element.
Consider the set . The set with the order is a well-ordered set because for any non-empty subset of , the element with the largest (which exists because is well-ordered) will be the least element of that subset.
The set of positive integers up to 100, , is well-ordered by the usual relation. Any non-empty subset has a minimum element since it is a finite subset of the well-ordered set .
Well ordering secures that each step we made with mathematical induction is correct, since the least element allows us to define a solid base case, so that the rest of the statement could be proved one by one by applying our hypothesis, so that the inductive step could be proven. This could be encapsulated by the following theorem.
Suppose that is a well-ordered set. Then is true for all , if
Inductive Step: For every , if is true for all with , then is true.
Suppose it is not the case that is true for all . Then there is an element such that is false. Consequently, the set is nonempty. Because is well-ordered, has a least element . By the choice of as a least element of , we know that is true for all with . This implies by the inductive step is true. This contradiction shows that must be true for all .
We do not need a basis step in a proof using the principle of well-ordered induction because if is the least element of a well-ordered set, the inductive step tells us that is true. This follows because there are no elements with , so we know (using a vacuous proof) that is true for all with .
Lexicographic Order
In a dictionary, all words are ordered in alphabetical order by the first letter that is different from the other previous words. For example, we have this array of string in alphabetical order: [“a”, “abnormal”, “acknowledge”, “acquire”…]. We can conceptualize this ordering in mathematics with partial order relation, calling lexicographic order.
The concept of lexicographic ordering can be extended beyond strings and applied to the Cartesian product of two posets. We formalize this concept as follows:
Given two posets and , the lexicographic ordering on compares first coordinates, and compares second coordinates only when the first coordinates are equal. Its strict part is
We achieve a partial ordering by combining this lexicographic ordering with equality. Here is how we verify it.
For reflexivity, every pair is related to itself because and .
For antisymmetry, suppose both and . If , the strict first-coordinate alternatives would point in opposite directions, which is impossible. Hence . The definition then reduces to and , so by antisymmetry of .
For transitivity, if the first coordinates are strictly ordered, transitivity of gives the required first-coordinate comparison. If the first coordinates are equal, the comparison is decided by the second coordinates, where transitivity of applies. Thus the lexicographic relation is a partial order. It is total when both component orders are total.
Consider two posets, where with the usual less than or equal relation, and where with . The lexicographic order on is given as follows:
For any two elements , we say that if:
-
, or
-
and .
For example, because , and because and . Thus, the pair is considered less than in the lexicographic ordering because the first element of the first pair (1) is less than the first element of the second pair (2), even though we do not compare the second elements in this case.
Hasse Diagram
Maximal and Minimal Elements
Lattices
Topological Sorting
Exercises
The following exercises are on lexicographic ordering.
Do some tricks to the result of the proof in definition lexord to make it a well order relation.
This could be solved without a second thought that we can make any sets with smallest element, such as , all integers greater than or equal 1.
Let be a binary relation on defined by
Is reflexive? Is symmetric? Is antisymmetric? Is transitive?
Fully justify each answer.
Let’s analyze the properties of the relation .
-
Reflexive: A relation on a set is reflexive if every element is related to itself, i.e., for all .
For any integer , we have . Hence, holds for all .
Therefore, is reflexive.
-
Symmetric: A relation on a set is symmetric if implies for all .
Consider the pair . We have because . However, because and .
Therefore, is not symmetric.
-
Antisymmetric: A relation on a set is antisymmetric if and imply for all .
Consider the pair . We have because , and because . However, .
Therefore, is not antisymmetric.
-
Transitive: A relation on a set is transitive if and imply for all .
Consider the elements , , and . We have because , and because . However, because and .
Therefore, is not transitive.
Explain why the conjunction of a partial order relation and an equivalence relation leads to the previous result.
A partial order relation is a binary relation that is reflexive, antisymmetric, and transitive. An equivalence relation is a binary relation that is reflexive, symmetric, and transitive.
When we combine a partial order relation with an equivalence relation, the resulting relation can still be reflexive because both component relations are reflexive. However, the antisymmetry of the partial order can conflict with the symmetry of the equivalence relation, leading to a relation that is neither antisymmetric nor symmetric. Furthermore, the transitivity of the partial order might not hold if the conditions of the equivalence relation introduce exceptions, which can break the transitivity in specific cases.
In this particular example: - The reflexive property is preserved because both conditions and ensure that . - The symmetry is broken because does not imply . - The antisymmetry is violated when equivalence modulo 2 () holds for distinct and . - The transitivity is disrupted when combining the partial order () with equivalence modulo 2, as seen in the counterexample with , and .
Thus, the combined relation does not retain all properties of partial orders and equivalence relations.
Comments