# Relation Matrix

Is my set of related pairs correct for this problem? $$\{(2,1), (2,2), (3,1), (3,2), (3,3), (4,1), (4,2), (4,3), (4,4)\}$$

Suppose that $$\,A = \{1,2,3,4\}\,$$ and $$\,B = \{1, 2, 3\}.$$

Let $$R$$ be the relation from $$A$$ to $$B$$ containing $$(a,b)$$ if $$\,a \in A$$, $$b \in B$$, and $$\;a^2 \ge 2^b$$.

What is the matrix representing $$R$$? (Assume the ordering of elements is the same as the increasing numerical order.)

You are correct in the set you've written to represent the relation, except we cannot have $(4, {\bf 4})$ in the relation, since ${\bf 4} \notin B$
Now, with respect to the matrix representation, it's an incident matrix we want, but we need to consider $12 = 4 \times 3$ pairs $(a, b) \in A\times B$.
We can do this by using a $4\times 3$ matrix, each row corresponding to one element in $A$, each column corresponding to each of the elements of $B$. Then the $m_{i,j}$ entry will be a $1$ if $(a_i, b_j)$ is one pair in the set of relations, and $0$ otherwise.
$$M = \begin{pmatrix} 0 & 0 & 0\\ 1 & 1 & 0 \\ 1 & 1 & 1 \\ 1 & 1 & 1\end{pmatrix}$$