The number of relations between sets can be calculated using $2^{mn}$ where $m$ and $n$ represent the number of members in each set, thus total is $2^{16}$ .
Now how do I go ahead calculate only those that contains $(a, a)$ There are $4 \cdot 4=16$ pairs of one element from $A$ and one from other $A$.
Now if we always include a $(a, a)$ , so there will be $2^{16-1}$=$2^{15}$ relations.
This is what I think but I am confused. Please help me solve this sum.
You are correct. The point of $2^{mn}$ formula is that there are $mn$ ordered pairs that might or might not be part of the relation. As you have two choices repeated $mn$ times there are $2^{mn}$ choices. When we say $(a,a)$ is required to be in the relation, one of those choices is already made, so there are $mn-1$ more to make. Thus there are $2^{mn-1}=2^{15}$ relations that include $(a,a)$