I have a question that says
"How many relations are there on a set with n elements?"
so if I have the set A = {a, b} and I wanna find how many relations there are, I thought I would just do R = { (a,b), (a, a), (b, a), (b,b) } because it's a relation from A to itself. and my book says that "sets of ordered pairs are called binary relations. Binary relations represent relationships between elements of 2 sets." From what I see, those are all the possible ordered pairs that we can get from A x A, am I wrong?
But the answer says that "a relation on a set A is a subset of A x A. Because A x A has $n^2$ has n elements, and a set with m elements has $2^m$ subsets, there are $2^{n^2}$ subsets of A x A. Thus, there are $2^{n^2}$ relations on a set with n elements. "
And I understand how to find the amount of elements of A x A (just do |A| x |A|) and I know how to find the number of subsets, but I'm not exactly sure what the number of subsets of the set even has to do with anything. I thought a relation was dealing with the ELEMENTS, not the SUBSETS, so like..what exactly are they asking for?
Edited to add:
if my set A = {a, b}, it'll have 2^4 relations, so 16 relations. The only way I can see that there are 16 of anything is if I have the set of all the subsets of A, which would be { {0}, {a}, {b}, {a,b} }, so the ordered pairs of the set of subsets of A would be ( {0}, {a} ), ( {0}, {b}), ({0} , { a,b}), etc and I can see how the number 16 would come out of that. But then that would mean a relation isn't the ordered pairs of elements of the set, but instead of ordered pairs of subsets of the set.....which is different. I'm confusing myself
If $A=\{a,b\}$, then $A\times A$, the set of all ordered pairs of elements of $A$, is
$$A\times A=\{\langle a,a\rangle,\langle a,b\rangle,\langle b,a\rangle,\langle b,b\rangle\}\;.$$
The relations on $A$ are the subsets of $A\times A$, so they are sets of ordered pairs of elements of $A$. Since $A\times A$ has $4$ elements, it has $2^4=16$ subsets; each of these subsets is one of the $16$ relations on $A$. They are:
$$\begin{align*} &\varnothing\\ &\{\langle a,a\rangle\}\\ &\{\langle a,b\rangle\}\\ &\{\langle b,a\rangle\}\\ &\{\langle b,b\rangle\}\\ &\{\langle a,a\rangle,\langle a,b\rangle\}\\ &\{\langle a,a\rangle,\langle b,a\rangle\}\\ &\{\langle a,a\rangle,\langle b,b\rangle\}\\ &\{\langle a,b\rangle,\langle b,a\rangle\}\\ &\{\langle a,b\rangle,\langle b,b\rangle\}\\ &\{\langle b,a\rangle,\langle b,b\rangle\}\\ &\{\langle a,a\rangle,\langle a,b\rangle,\langle b,a\rangle\}\\ &\{\langle a,a\rangle,\langle a,b\rangle,\langle b,b\rangle\}\\ &\{\langle a,a\rangle,\langle b,a\rangle,\langle b,b\rangle\}\\ &\{\langle a,b\rangle,\langle b,a\rangle,\langle b,b\rangle\}\\ &\{\langle a,a\rangle,\langle a,b\rangle,\langle b,a\rangle,\langle b,b\rangle\}=A\times A \end{align*}$$
Every one of these $16$ sets of ordered pairs is a relation on $A$, and every relation on $A$ is one of these $16$ sets of ordered pairs.