Prove that the set $\{(x,y): x=-y\}$ is open
I tried to use the definition of an open set, but failed to succeed.
Prove that the set $\{(x,y): x=-y\}$ is open
I tried to use the definition of an open set, but failed to succeed.
Of course you failed to succeed. It is not open. For instance, if $r>0$, $B\bigl((0,0),r\bigr)$ is not a subset of your set, although $(0,0)$ belongs to it.
As @Jose Carlos Santos pointed out, the set is not open:
your set is $A=\{\; (x,y)\; :\; x+y=0\; \}=f^{-1}(\{0\})$ for $f(x,y)=x+y$. Since $\{0\}$ is closed and $f$ is continuous (for the usual topology of the plane), it follows that $f^{-1}(\{0\})$ is also closed.
In the plane $\mathbb R^2$, which is a connected set, the closed sets that are also open are $\mathbb R^2$ and the empty set $\emptyset$, so the set $A$ is not open.