Relations - 3
Building New Relations from Given Ones
Inverse Relation
Given a realtion
Example:
- The inverse of the relation is a parent of on the set of people is the relation is a child of.
In other words if you swap the elements of a given relation you should get the inverse relation.
Example
Therefore:
And:
You could also say:
In these examples you either swap the predicate to denote the inverse or you swap the evaluation such that it produces the inverse.
Composition of Relations
Let
The notation
Example:
- If
is the relation is a sister of and is the relation is a parent of then: is the relation is an aunt of. is the relation is a grandparent of.
Example
is a sister of is a parent of
- Alice
Ken and Ken Alan so Alice Alan.- This can also be written as
- This can also be written as
Diagraph Representation of Compositions
For this diagram
Computer Friendly Representation of Binary Relations - Matrices
Let
We represent
The entry in row
Example 1
Let
Assume an enumeration
When representing in a matrix the rows are the items in set
You can then read the answers from the matrix as:
Example 2
The binary relation
-
What are the ordered pairs?
-
Draw the matrix.
-
Explain the relation.
is 1 larger than .
Matrices and Composition
This is working on the same relation as was seen in the section Diagraph Representation of Compositions.
This result in the following for the composition of
From these graphs we can deduce that
Given the matrices of
Calculate the binary relation matrix of
If you transpose the row
Boolean Matrix Product
Given two matrices with entries 1 and 0 representing the relations we can form the matrix representing the composition. This is called the logical (Boolean) matrix product.
Let
The logical matrix
The logical matrix
Then the entries
if there existsw with such that and . , otherwise.
This is the same as a product of matrices,