Relations
In mathematics we use many symbols such as , , , , , to represent the relationship between two objects. These symbols are called relations or relational operators because they convey the relationship between two objects. These realtions are defined on a specific set. For example, the relation is defined on the set of real numbers . To define a relation, we need to specify a set of order pairs that relates a set 's elements to each other i.e. is a subset of : These order pairs are special as is used to define the relationship between and , so we can say that " relates to ".
Because the relations is defined on the same set twice it is called a homogeneous relation, from the Greek word "homo" meaning "same" or "identical".
Lets now put this all together and define a relation on the set :
If we then take an element of the realtion such as it means that relates to and means that relates to . The relation shown above can be thought of as "has the same parity" as and are both odd and and are both even. This relationship can also be denoted as followed:
This means that if the order pair is in the relation , then relates to , so . If they are not in the relation, then does not relate to and we can denote this as .
There are many ways to show relations such as a table or a directed graph, sometimes also called a digraph, arrow diagram or mapping diagram. The table below shows the relation defined above:
1 | 2 | 3 | 4 | |
---|---|---|---|---|
1 | 1 | 0 | 1 | 0 |
2 | 0 | 1 | 0 | 1 |
3 | 1 | 0 | 1 | 0 |
4 | 0 | 1 | 0 | 1 |
The directed graph of the relation :
Empty Relation
The empty relation is a relation that has no elements in it. This means that no elements in the set relate to each other. The empty relation is denoted by or . In other words if:
Then for all elements :
Universal Relation
The universal relation is a homogeneous relation that contains all possible order pairs of the set . This means that every element in the set relates to every other element. The universal relation is denoted by .
This means that for all elements :
Properties of Relations
Depending on the relationship between the elements of a set, a relation can have different properties.
Reflexive
A relation is reflexive if every element in the set relates to itself.
An example of a reflexive relation is the relation on the set of real numbers as every number is less than or equal to itself.
We can see in the table below that every element has a "1" in the diagonal and therefore the relation is reflexive. The same can be seen in the diagram where every element has a loop to itself.
Irreflexive
A relation is irreflexive if no element in the set relates to itself.
An example of an irreflexive relation is the relation on the set of real numbers as no number is less than itself.
We can see in the table below that every element has a "0" in the diagonal and therefore the relation is irreflexive. The same can be seen in the diagram where no element has a loop to itself.
Symmetric
A relation is symmetric if for every element in the relation, is also in the relation.
An example of a symmetric relation is the relation on the set of real numbers as if then .
We can see in the table below that if is in the relation then is also in the relation and therefore the relation is symmetric. This means that the table is symmetrical or mirrored along the diagonal. The same can be seen in the diagram where if there is an arrow from to then there is an arrow from to .
Antisymmetric
A relation is antisymmetric if for every element in the relation, is not in the relation unless .
An example of an antisymmetric relation is the relation on the set of real numbers as if and then .
We can see in the table below that if is in the relation and is also in the relation then the corresponding diagonal element is a "1" and therefore the relation is antisymmetric. The same can be seen in the diagram that there are no arrows from to and to only one way arrows and loops.
Asymmetric
A relation is asymmetric if for every element in the relation, is not in the relation, even if . So it can be thought of as a stricter version of antisymmetric or a combination of antisymmetric and irreflexive.
An example of an asymmetric relation is the relation on the set of real numbers as if then .
We can see in the table below that if is in the relation then is not in the relation and all the diagonal elements are "0" and therefore the relation is asymmetric. The same can be seen in the diagram that there are no arrows from to and to and no loops.
Transitive
A relation is transitive if for every element and in the relation, is also in the relation.
An example of a transitive relation is the relation on the set of real numbers as if and then .
We can see in the table below that if and are in the relation then is also in the relation and therefore the relation is transitive. The same can be seen in the diagram that if there is an arrow from to and to then there is an arrow from to .
Importantly note if for example and then and must also be in the relation for it to be transitive.
Relations between Sets
Relations can also be defined between two different sets, this is called a heterogeneous relation, from the Greek word "hetero" meaning "different". This means that the relation is a subset of the Cartesian product of the two sets and , rather than between the cartesian product of the same set .
The first set is called the domain and the second set is called the codomain. This means that the relation assigns elements of the domain to elements of the codomain. This can be shown in a directed graph where the elements of the domain are on the left and the elements of the codomain are on the right.
Depending on the relationship between the elements of the two sets not all elements of the codomain are assigned to an element of the domain. The elements of the codomain that are assigned to an element of the domain are called the range of the relation. So in the above diagram the domain is and the codomain is and the range of the relation is .
When defining a relation between two differenet sets the order matters. This is obvious as if we have a relation between two sets and then the order pair is not the same as .
Identity Relations
The identity relation is a special type of relation that is only defined for homogenous relations. The identity relation is a relation where every element in the set relates to itself and no other elements. It is a reflexive, symmetric and transitive relation and is denoted by where is the set that the relation is defined on.
Inverse Relations
The inverse of a relation is a relation that is the opposite of i.e. it "undo's" the relationship between the elements of the set. The inverse of a relation is denoted by .
This means that if is in the relation then is in the inverse relation . In other words the domain and codomain of the realtion is swapped in the inverse relation and become the codomain and domain respectively.
When visualising the inverse relation in a directed graph the arrows are simply reversed.
Composition of Relations
Relations can also be combined or chained together to form a new relation. This is called the composition of relations. The composition of two relations and is denoted by and is defined as:
This means that if there is an element in the relation and an element in the relation then there is an element in the composition of the two relations .
When visualising the composition of relations in a directed graph the arrows are simply chained together.
Importantly note that the composition of relations is not commutative i.e. .
Also note that the relations are denoted from left to right i.e. means that is applied first and then is applied. Unlike functions where means that is applied first and then is applied.