Recap: A relation R can be represented as a zero-one matrix. If (ai,bj)∈R, then we write a 1 in the matrix in the position (i,j). Otherwise, we write a 0.
The size of the matrix will be determined by the size of the set.
If you have a relation R on the set A={1,2,3}, the size of the matrix will be 3×3.
Also, If you have a relation R on the set A={1,2,3,4,5}, the size of the matrix will be 5×5.
Let’s see the examples.
a) {(1,1),(1,2),(1,3)}
As the set has three elements {1,2,3}, we will have a matrix with three rows and three columns.
Notice that (1,1)∈R. Therefore, we write a 1 in the matrix at the intersection of row 1 and column 1. We do the same in position (1,2) and position (1,3).
In the rest of the places, we write a 0.
The result will be as follows.
b) {(1, 2), (2, 1), (2, 2), (3, 3)}
Similar to the previous exercise, we will have a 3×3 matrix. We write 1 in the positions indicated by each element of the relation R and 0 in the rest of the places.
c) {(1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)}
One way to reduce possible errors is, when you write the solution, to count the number of pairs in the relation and the number of 1s in the matrix. Make sure that the number is the same.
d) {(1, 3), (3, 1)}
From this relation, we can see that the matrix will have only two 1s, positions (1,3) and (3,1).
Related exercises:
- How many nonzero entries does the matrix representing the relation R on A={1,2,3,…,100} consisting of the first 100 positive integers have if R is
- How can the matrix representing a relation R on a set A be used to determine whether the relation is irreflexive?
- List the ordered pairs in the relations on {1, 2, 3} corresponding to these matrices (where the rows and columns correspond to the integers listed in increasing order).