Count relations satisfying specific properties such as reflexivity, symmetricity, etc.
Let A={a1,a2,…,an}A=\left\{a_{1}, a_{2}, \ldots, a_{n}\right\}A={a1,a2,…,an} and we represent A×AA \times AA×A as a matrix such that ithi^{t h}ith row jth j^{\text {th }}jth column represents (ai,aj),1≤i,j≤n\left(a_{i}, a_{j}\right), 1 \leq i, j \leq n(ai,aj),1≤i,j≤n. Observe that the matrix has n2n^{2}n2 elements.