I need to calculate the number of relations over $A$, when the size of $A$ is $n$, and want to understand why my approach is not correct.
I denoted $A_i$ as subset of $A$, and I said general relation is something of the type $A_i \times A_j$ where $i$ can be equal to $j$. The number of subsets of $A$ is $2^n$. So $A_i \times A_j$ has $2^n \times 2^n$ different combinations. Therefore the number of relations should be $2^{2n}$, but it's wrong. Why?
Here's the correct answer.

If $A=\{0\}$ then all possible relation over $A$ are $\{(0,0)\},\{\}$. And think what is $P(A)\times P(A)$, $P(A)$ denotes the set of all subsets of $A$. does all elements of $P(A)\times P(A)$ be relation on $A$ ? What if $A=\{0,1,2\}$, can you find an a relation over $A$ which is not of $P(A)\times P(A)$ ?