RELATIONS:
A relation from set to set is a subset
So, a small example: if , then or or some variation thereof
These relations can also be constructed through certain conditions:
Examples:
If and , let
This is basically saying let be a relation in the form of where , such that . So, this would basically be all elements of that you can pair with such that (this has to be ORDERED)
So,
If and , let
So,
There can be a lot of conditions, you get the point
BINARY RELATIONS:
A binary relation on a set such that
Example:
If , let , so:
Can we have an infinite set? Yes!
, define , well… there are infinite amount of numbers such that a = b in the set of natural numbers. this is going to lead to an infinite set. Naturally, when your original set is something like all natural numbers or all integers, you naturally are going to end up with an infinite relation
NOTATION NOTES:
If is a binary relation, there are several ways to denote its elements:
- , this is a logical notation
- can be used to logical infix notation such that a = b
In this course, we will stick to the first one
If is a finite set with , then how many distinct binary relations are there on ?
- If , that means , therefore, we would have distinct binary relations
REFLEXIVE:
A relation is reflexive if .
In other words, a relation on a set is reflexive if for every element the pair is in the relation. In other words, for a reflexive relation, every element must be related to itself.
Example:
Is this relation reflexive?
-
- this is the most obvious example of a reflexive relation. This means that for each pair in the relation, the two elements x and y are equal. It satisfies the condition that for every , the pair is in the relation
-
- For any , we know that (any number is going to be less than or equal to itself), therefore, for every , the pair will be in the relation because
-
- this ISN’T reflexive, because for example, 1 is not less than itself, so it cannot be reflexive
Here are more concrete examples:
These two will always be true:
, this is always going to be reflexive, and is NEVER going to be reflexive
On the other hand, a relation is NOT reflexive (also called irreflexive) if A relation is reflexive if .
- this is different from being non-reflexive, let me explain why
NON-REFLEXIVE VS IRREFLEXIVE:
A relation is NOT reflexive if it fails to be reflexive. Meaning, there exists AT LEAST ONE ELEMENT for which the pair is NOT in the relation. This means that the relation could be reflexive for some elements but not for others
- Example: Consider and , the relation is not reflexive because is missing, even though the other two elements are related to each other
A relation is irreflexive if NO ELEMENT is related to itself. In other words, for every , the pair is NEVER in the relation
- Consider and , the relation is irreflexive because no element is related to itself, all the pairs are missing
Let me give another example, let us look at this relation:
We have that , therefore, we can determine that this relation is not irreflexive. However, if we were to do something like , we can also determine that this relation is not reflexive.
SYMMETRY:
A relation is symmetric if
These will make more sense with an example:
- is symmetric since
- is non-symmetric which can be proven by counterexample, if and , then it is true that (because ) but is obviously false (because )
Once again, two things that will always be true:
and will always be symmetric
- , this is symmetric because if , then obviously
More concrete examples:
ANTISYMMETRY:
Let be a relation on set . We say that is antisymmetric IFF relates to and relates to ONLY when . In other words, if both and are in the relation, then the only way this is allowed to be happen is if and are the same
Example:
- , this is antisymmetric because in order for this relation to happen, and MUST be the same value
- , this is not antisymmetric because you can let this relation be true for something like and
- is not antisymmetric because x and y do not have to be the same for this to be true, x can be 0 and y can be 1
Take these as true:
- is not antisymmetric and is antisymmetric
ASYMMETRY:
A relation is asymmetric if . In other words, if is in the relation, then CANNOT be in the relation at the same time
Example:
- is NOT asymmetric, because in order for this relation to hold true, must be in the relation
- is NOT asymmetric for the same reason as above
- IS asymmetric, because if , then there is no way for , so it is asymmetric
- is NOT asymmetric, because is in the relation as well
Take these as true:
- is NOT asymmetric, and is asymmetric
More concrete examples:
TRANSITIVITY:
A relation is transitive if
Examples:
- , this is transitive because by definition, means that . Similarly, means that . Since both of these are true, therefore, , which means
- , this is transitive because by definition, means , similarly, means that . Therefore, , so
- , this is NOT transitive, because you can have , which will give you , and then you can have , which will give you , but then if you do , you end up getting . Therefore, it is not transitive
Take these as true:
- AND are transitive
More concrete examples:
SET-THEORETIC OPERATIONS:
Relations are sets, therefore they can be combined using the set operations
So, you can say if and are reflexive (or even symmetric), then is reflexive (or even symmetric)
- So, if and , then
Example:
On , let
and
. Find
are common elements between the two relations, so it’s just going to be
is everything, I’m not writing it down but its just all of them
is everything in that is NOT in , so that would be
is just everything not in , if you are wondering how many elements that would be:
INVERSE:
The inverse of a relation is the relation:
So, basically, if , then its inverse is:
Theorem:
- If is symmetric, therefore is symmetric.
Proof:
By definition, a relation is symmetric if , whenever , then it must be true that
The inverse relation of a relation on a set is defined as
If , by definition of inverse, that means
Since is symmetric, since , then it must be true that
Therefore, if , then as well
COMPOSITION:
The composition of a relation with a relation is the relation defined as:
If you want to know what this nonsense means, let us do an example:
POWERS OF RELATIONS:
A binary relation can be composed with itself
Meaning:
or even
and even..
REPRESENTATION:
Listing all the tuples in a relation can definitely be annoying, so we have many ways of representing them!
MATRICES:
One of the ways to represent relations with finite sets is with a matrix of 0s and 1s.
If with and , then the matrix of is the matrix with:
To make more sense of this, let me give an example:
- Let and
- Let , the matrix is going to be:
What if you were given a matrix and asked to represent the relation?
you just look to see where the matrices has one in it, so you do:
GRAPHS:
We can represent relations as directed graphs, consisting of a set of vertices and a set of edges
- For any edge , is the initial vertex and is the terminal vertex
- An edge of the form is a loop
- Edges are drawn as arrows from their initial to their terminal vertex
To make more sense of this, let us do an example:
The graph with and is:
pretty straight forward… 0 is connected to itself to form a loop since we have the edge . 0 is also connected to 1 since we have the edge , and so on
A relation can be represented as a graph with vertex set and the edge set . If , then the elements of are kept “separate” from the elements of
So, for example:
If and , the relation can be represented as:
the whole point here is that you keep the elements of and on opposite ends, not together
Example:
If , the relation can be represented by the graph:
PROPERTIES:
- A relation is reflexive iff all vertices have a loop (meaning all vertices circle back on itself)
- A relation is irreflexive iff NO vertex has a loop
- A relation is symmetric iff whenever is an edge, then so is
- A relation is antisymmetric iff whenever is an edge with , then is not an edge
- A relation is transitive iff whenever and are edges, then so is
A more concrete example for the antisymmetric one cause I hate it:
If was in that edge, then the relation would NOT be antisymmetric
So, from the above graph example, we can determine the following now knowing these properties:
- Each vertex has a loop, therefore it is reflexive
- is an edge, but is not (the same can be said about the other vertices), therefore it is not symmetric
- Whenever is an edge with , then is not an edge. So, you would have to check:
- ,
- So, in this case, is symmetric
- is transitive because for example, you have
EQUIVALENCE RELATIONS:
A relation is called an equivalence relation if it is reflexive, symmetric, AND transitive
If is an equivalence relation, two elements and such that are called equivalent. We use the notation a~b
Example:
The most trivial example of all because forbid we get actual good examples:
For any set , the identity relation:
is an equivalence relation. It is:
- Reflexive, because any is equal to itself
- Symmetric, because if , then
- Transitive, because if and , then
Example:
Let defined by
- is reflexive, because you can have , and any number minus itself is going to be 0, which is even. Therefore, it is reflexive
- Suppose , by definition, is even, then obviously is going to be even, therefore , so this relation is symmetric
- Suppose and , by definition, this means that and are even. Adding these two together:
- which is even.
- Therefore, , so the relation is transitive
EQUIVALENCE CLASSES:
Equivalence class is the name given to a subset of some equivalence relation which includes all elements that are equivalent to each other.
Let be an equivalence relation on a set . The set of all elements which are related (aka make the relation true) to an element of set is called the equivalence class of
Example:
Let and the relation on this set
First, in order to find equivalence classes, we need to see if this relation is an equivalence relation or not
- It is reflexive, because we know that , so it will always be even
- It is symmetric, because if we assume is even, then obviously is even (for example, 1 + 3 = 4, and 3 + 1 = 4)
- It is transitive, because if and is even → is even
- Both and can be either even or odd
Therefore, this is an equivalence relation, let us find the equivalence classes for each element
So, basically, we need to find for each element in the set, what makes the relation true
- because 1 + 1 = 2 (even), 1 + 3 = 4 (even), and 5 + 1 = 6 (even)
Since we have elements 1, 3, and 5 have the same equivalence class and elements 2 and 4 have the same equivalence class, so we can say that the representative of equivalence class is element 1 and the representative of equivalence class is 2
PARTITIONS:
A partition of a set is a collection (where is a set of indices) of subsets of which are:
- mutually disjoint (for all with , )
- nonempty (for all )
- whose union is ()
To put this in simpler terms:
- Each subset is nonempty: Every group must have at least one element.
- The subsets do not overlap: If an element is in one subset, it cannot be in another.
- The subsets cover the whole set: Every element of must be in exactly one of the subsets.
So, if you had a set , you can have partitions like:
or any combo of the sort
If on a set there is an equivalence relation, the equivalence classes form a partition of (look at the example above, the two partitions come from the equivalence classes)
Vice versa, if a set has a partition, then the relation is an equivalence relation with as the equivalence class
- So, basically, if you are going from partition (from an equivalence class) → equivalence relation, all the elements in one partition are going to be related to one another, so they would form their own “bundle”
Example:
Assume we have the partition , and let us assume we got this partitions from an equivalence class. That means, the elements in are related in a sense, and since this comes from an equivalence class, it must be symmetric, reflexive, and transitive. Same can be said for the other set, so we end up with:
PARTIAL ORDERING:
A relation (same set) 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 partially ordered set, or a POSET, and is denoted by
Example:
Let and define the relation as
Let us check if it is POSET:
- This is reflexive, since every element in is related to itself
- This is antisymmetric, because there is no pair in where and unless . For example, we have but not
- This is transitive, because we have
Therefore, this is a partially ordered set
STRICT ORDERINGS:
A relation (same set) is called a strict ordering (or order) if it is asymmetric and transitive
A set together with partial order is called a strict partially ordered set, or strict POSET, and is denoted by
Example:
Let and define the relation as
- It is asymmetric, because if , then (the same can be said about the rest of the sets)
- It is transitive, because
Therefore, this is a strict ordering on the set
POWER SET POSET:
Let be a set. The power set together with the inclusion relation is a POSET
For example, if we had the set and the power set defined as:
- It is reflexive, since it is a well known fact that every set is a subset of itself
- It is antisymmetric, because the rule states if and , then . For example, if we have and , then it must be that the two sets are equal, but clearly they aren't equal, therefore, it is antisymmetric
- It is transitive because we have (for example) that and we also have . THEN, we have that . Therefore it is transitive
So, power sets are always a POSET
HASSE DIAGRAMS:
Hasse diagrams are another type of graph representation specific for partial orders.
- Suppose you have a partial order on set
- Rearrange the vertices in such a way that, if vertices and satisfy , then is higher up on the page than (if they aren’t related, then their height does not matter). So, arrange each vertex such that the initial vertex is BELOW its terminal vertex
- Remove the edges due to reflexivity (the loops) and those implied by transitivity
- Remove the arrow tips
- HASSE DIAGRAM!
Example cause WHAT DID I JUST READ!
If you had one that was connected to two different elements, you would write them on the same level. For example:
Consider the set and the power set of . . Draw the Hasse diagram for this
TOTAL ORDERS:
Let be a poset. Two elements of are said to be comparable IF OR . The elements are called incomparable if NEITHER nor
A POSET in which elements are comparable is said to be a totally ordered set and is called a total order.
A totally ordered set such that every nonempty subset has a minimum is call a well-ordered set
Examples cause AHHH these make no sense:
The set of real numbers with the usual less than or equal to relation is a total order because for any 2 real numbers , we ALWAYS have either OR
- So, you have have and , since you have , this is totally ordered
However, it is not well-ordered because there exists a subset without a smallest element
- for example, in the subset , although you might think 0 is the smallest element, remember this is real numbers, meaning we have decimals. Suppose we pick , there is always going to be an element smaller than it (like )
The set of natural numbers is well ordered because:
- It is a total order (any two natural numbers are comparable)
- It is well ordered, because every nonempty set has a smallest element is well-ordered because 3 is the smallest element in the set. You cannot get any smaller
The power set is NOT totally ordered because and are incomparable
- this is because and vice versa. Therefore, it is incomparable, making it not a total order
MAXIMAL AND MINIMAL ELEMENTS:
Lets say we have a poset where is some set and a relation is a partial order relation defined on the set
Minimal elements:
An element of a set is called a minimal element if there is no such that and . So, basically
Maximal elements:
An element of set is called a maximal element if there is no such that and . So, basically,
Examples!
In the above Hasse Diagram, we want to find the minimal and maximal element. Typically, the maximal is at the “top” of the diagram and minimal is at the “bottom”
But formally:
- and are not minimal elements because and
- and are not minimal elements because and , as well as and
- is not a minimal element because and .
- Therefore, we have that is the minimal element because we have no such that
What about maximal?
- a is not a maximal element because and
- Similarly, , , , and are not maximal elements because:
- Therefore, we have that is the maximal element in this case
It is important to note that a poset can have more than one maximal and minimal element:
in this diagram, we can see that , , and are all minimal elements because no element is related to them
once again, in this diagram it is clear that both and are both maximal elements because they are not related to any element
MAXIMUM AND MINIMUM ELEMENTS:
Let us say we have a poset where is some set and is a partial order defined on
MINIMUM ELEMENT:
An element is called the minimum element of if
- this element IS unique, there can only be one minimum element, opposite to minimal
MAXIMUM ELEMENT:
An element is called the maximum element of if
- once again, this element is UNIQUE as well
Both maximum and minimum elements do not need to exist. However, if they do, they must be unique
Example:
here, the minimum element is a, because it is related to every other element in the relation
- it is important to note (cause I forgot LOL) that transitive arrows are removed in Hasse diagrams. So, since a is related to b, and b is related to e, then obviously is related to , and so on
here, there are no minimum or maximum elements. If you consider is the minimum element, it has to have a relation with all other elements. But, it does not have a relation with , so it is not the minimum element. same can be said about
also, is not the maximum element, because every element in the diagram must be related to . but is not related to
here, the minimum element is , and the maximum element is
- this is because is related to every other element in the diagram. although they aren't immediately connected, you can deduce it. is related to , is related to , therefore is related to . but is also related to , therefore, is related to . and the loop goes on
- is the same, in some way every element is related to it
in this diagram, you have no minimum or maximum element because not all elements are related in some way
the maximal element here though is and
the minimal element here is , , and