Let $\sim$ be a relation on $\mathbb R$ defined by $$ x \sim y \Longleftrightarrow(x \cdot y>0) \vee(x=y=0)$$ How many equivalence classes does $\sim$ gives rise to?
My answer: $\infty$. The definition in my textbook of a equivalence class is $$[a]=\{ x \in A \mid x \sim a \}$$
In this case $A=\mathbb R$ and $a=y$.
The definition of $\sim$ in the problem says that $x$ and $y$ are related iff $sgn(x)=sgn(y)$ or $x=y=0$. There is an infinite number which have the same sign as [a]. So my conclusion is that there are infinite equivalence classes.
I know I'm wrong. What are my mistakes and how can I correct them?
I'm not sure which tools (theorems, definitions etc.) I should use.
Three.
1) Positive numbers are equivalent to each other, since $xy>0$ if $x,y>0$;
2) Negative numbers are equivalent to each other, since $xy>0$ if $x,y<0$;
3) $0$ is equivalent only to itself, since $0x=0$.
Moreover a positive number and a negative number are not equivalent, since $xy<0$.
You are confusing the number of classes with the cardinality (i.e. number of elements) of a class.