Represent each of these relations on {1, 2, 3} with a matrix (with the elements of this set listed in increasing order)

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.

Matrix representation of the relation {(1,1),(1,2),(1,3)}  on the set {1,2,3}
Matrix representation of the relation {(1,1),(1,2),(1,3)} on the set {1,2,3}

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.

Matrix representation of the relation {(1, 2), (2, 1), (2, 2), (3, 3)}   on the set {1,2,3}
Matrix representation of the relation {(1, 2), (2, 1), (2, 2), (3, 3)} on the set {1,2,3}

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.

Matrix representation of the relation  {(1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)}   on the set {1,2,3}
Matrix representation of the relation {(1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)} on the set {1,2,3}

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).

Matrix representation of the relation  {(1, 3), (3, 1)}    on the set {1,2,3}
Matrix representation of the relation {(1, 3), (3, 1)} on the set {1,2,3}

Related exercises: