I am trying to reason about a relation ($ \sim $) on $A \times A$ that is like this:
$A = \{1,2,3,4\}$
$ (a,b) \sim (x,y)\,\text{iff} \begin{cases} a|x &\text{if}\, a \neq x\\ b|y &\text{if}\, a = x\\ \end{cases} $
I can't make a diagram for this relation (which is helpful to me) because I don't understand why there are pairs and how I would write those. If the relation only involved something like $a \sim b$, then I would just make a 4x4 grid with 1,2,3,4 as rows and columns, and then mark the row and column where the relation exists.
The relation is defined over the cartesian product $A\times A=\{(1,1),(1,2),(1,3),(1,4),(2,1),...,(4,4)\}$ having $16$ elements in total. Your rows and columns will now be labelled with pairs of the form $(a,b)$.