here is another way to think about the answer
similar to functions , think about how many ways are there to map 1 element in domain A to the co-domain A?
as one element can be related/mapped to multiple elements at once in relations, there are $2^{|A|}$ mapping from a unique element in A to A because every element in codomain has a choice to be or not to be part of the mapping.
so total possible relations = $\Pi_{i=1}^n \text{mapping of }A_i = (2^n)^n = 2^{n^2}$