Question: can anyone help me on this problem?

I have the set $\{0,1,3,8,9\}$ and I want to define an example of an equivalence relation.

I know that to be an equivalence relation it needs to be reflexive, symmetric and transitive.

I also now that for a set of $5$ elements there are $2^{n^2}$, so if $n=5$ there are $2^{10}$ of relations.

I am not sure how to start because there are $2^{10}$ relations in this set. Do I have to list all of them or is there any other method to find an equivalence relation?

Thank you

Answer: 
The given relation is not transitive: this is due to the fact that $a0=0$ is a square for every $a$, so the equivalence class of $0$ would be the whole $\mathbb{Z}$. So, for instance,
$$
2\sim 0,\quad 0\sim 3
$$
but $2\not\sim 3$.

If you consider the relation over $\mathbb{Z}\setminus\{0\}$, then it is indeed an equivalence relation. Symmetry and reflexivity are obvious, so let's tackle transitivity. Assume $a\sim b$ and $b\sim c$. Then
$$
ab=h^2,\quad bc=k^2
$$
that implies $ab^2c=(hk)^2$. Now $b$ divides $h^2$ and also $k^2$, so $b^2$ divides $h^2k^2$; thus
$$
\frac{h^2k^2}{b^2}=\left(\frac{hk}{b}\right)^{\!2}
$$
Now we can use the fact that if an integer has a rational square root, then this square root is actually an integer. Indeed, suppose
$$
\left(\frac{p}{q}\right)^{\!2}=n
$$
is an integer, with $\gcd(p,q)=1$. Then $p^2=nq^2$ and, if a prime divides $q$ it must also divide $p^2$, hence $p$. So no prime can divide $q$ and therefore $q=\pm1$.
Apparently the relation is transitive on $\mathbb{Z}\setminus\{0\}$.
Assume $a\sim b$ and $b\sim c$ with $x^2 = ab$ and $y^2 = bc$. Let $z = \frac{xy}{b}$. Then $z^2 = \frac{abbc}{b^2} = ac$. We need to show, that $b \mid xy$. We have $b \mid x^2,y^2$, so $b^2 \mid x^2y^2$, hence $b \mid xy$. This is because there is a $k\in \mathbb{Z}$ with $b^2k = x^2y^2$ and so $b\sqrt{k} = xy$. If $\sqrt{k}\notin \mathbb{Z}$, then $\sqrt{k}$ is irrational and then so is $b\sqrt{k}$ (Contradiction). So $a\sim c$.

If we include to $0$, we have the following counterexample:
We have $1\sim 0$ and $0\sim 2$ because $0^2 = 1\cdot 0$ and $0^2 = 0\cdot 2$, but clearly $1\not\sim 2$.