Let $R$ be the equivalence relation on the real numbers given by $$R = \{(x, y) \in \Bbb R^2: (x−y)(x+y) = 0 \} $$ What are the equivalence classes of $R$?
So I wrote that, for every $x \in \Bbb R$, the corresponding equivalence class is $[x]_R = \{x, -x\}$.
Is my answer correct and complete or there is something I omitted? Thanks!
Yes, I believe you're correct.
We know
$$(x-y)(x+y) = x^2 - y^2$$
as it is the difference of two squares. From that,
$$(x-y)(x+y) = 0 \iff x^2 = y^2 \iff |x| = |y| \iff x = \pm y$$
Thus,
$$(x,y) \in R \iff x = \pm y$$
Thus, any two real numbers $x,y$ are related if and only if one is the other, or its negative. Accordingly, for each real number, you have the equivalence class given by it and its negative.
As noted by fleablood in the comments it might not hurt to specifically set $0$ aside and thus let the equivalence classes be
$$[x]_R = \left\{\begin{matrix} \{ x,-x \} & x\neq 0\\ \{0\} & x = 0 \end{matrix}\right.$$
just to remove any potential ambiguity, but it's not like it's really wrong presented as-is since $0=-1 \cdot 0=-0$. Just depends on how paranoid you want to be about points on the assignment. :p
You can of course justify this by considering $x=y=0$ to show $(x,y)\in R$ and showing no other $x,y$ when one is $0$ can be in the same equivalence class. I maintain that, personally, it's fine as-is, but up to you.
Alternative Justification: (thanks to JMoravitz for pointing this out in the comments)
One recalls, when dealing with real numbers, this situation -- if $ab=0$, then what happens? At least one of $a,b$ are zero, i.e. $a=0,b=0$ or $a=b=0$.
This, as a bit of a tangent, comes as a consequence of the real numbers, when equipped with traditional addition and multiplication, forming what is known as a field. Fields are a special case of a certain, slightly more general algebraic structure known as an integral domain, itself a special case of another structure known as rings. I won't go into detail on these - the elaboration isn't necessary to understand for what follows, but it does provide a means of rigorously justifying this property. So some further reading if you're curious and have time to burn:
Anyhow, we essentially define an integral domain thusly: a commutative ring, in which there are no zero divisors. Equivalently, an integral domain $(R,\oplus,\otimes,0',1')$ is a commutative ring in which $a\otimes b=0'$ if and only if $a=0',b=0',$ or $a=b=0'$. Here, $0'$ denotes the "additive identity" for the ring $R$, the prime being used to distinguish it from the "actual" number zero. The notion of $0'$ being the additive identity simply means that $a\oplus 0' = 0' \oplus a = a$ for all $a \in R$.
In the case of the real numbers, $\Bbb R$, $0'$ is in fact the number zero, $1'$ the number one, $\oplus$ is the tradition addition operation $+$, and $\otimes$ is the traditional multiplication operation ($\cdot, \times$, however you choose to denote it).
Now we tie this back into where it becomes relevant. Or if you didn't care about the tangent into abstract algebra, I get back to the point. You're probably not going to be expected to justify all of this in your class since we just know from experience and such that the property holds for real numbers, but it's useful to know where it comes from, you know?
Anyhow.
So, since $\Bbb R$ is a field, we know by definition it has the property that
$$ab = 0 \iff a=0, b=0, \; \text{or} \; a=b=0$$
Thus, since $xRy$ if and only if $(x-y)(x+y)=0$, we can immediately conclude by this property
$$x-y = 0 \;\;\; \text{and/or} \;\;\; x+y=0$$
If only the first holds, we know $xRy$ if and only if $x=y$.
If only the second holds, we know $xRy$ if and only if $x=-y$.
If both hold, we know $xRy$ if and only if $x=y=-y$, which only holds if $x=y=0$.
From there, it's a pretty clear exercise on how to construct the equivalence classes and so on, it more or less parallels the original approach.