Showing the diagonal on $\mathbb{R}^2$ is closed $D=\{{(x,x)|x\in\mathbb{R}}\}$ , I want to show D is closed with the definition: 

$A$ is closed if and only if $\mathbb{R}/A$ is open.

So basically what I really want to show is $A=\{{(x,y)\in \mathbb{R}^2|x\neq y\}}$
.
My attemp so far was taking $a=(x,y)\in A$ and an open ball $B(a,r)$ with $r=\frac {|x-y|} {2\sqrt 2}$, which is the distance between $a$ and the line $x-y=0$, divided by two.
It is easy to see geometrically why a ball with this radius is contained in A, but I wasn`t able to complete the proof formally, using algebra.

The following applies:
A topological space $X$ is a Hausdorff space if and only if its diagonal 
$$\Delta X = D = \{(x,x)\mid x \in X\} \subset X \times X$$ 
is closed in $X\times X$
Since we have $X = \mathbb{R}$, we can show that $D = \{(x,x)\mid x \in \mathbb{R}\}$ is closed in $\mathbb{R}^2$.
Let $(x,y) \in \mathbb{R}^2\setminus D $ such that $x \not= y$. Since $\mathbb{R}$ is a Hausdorff-Space there are disjoint neighbourhoods $U$ for $x$ and $V$ for $y$. Therefore $U\times V$ is an open neighborhood of $(x,y) \in \mathbb{R}^2$. It holds that $(U\times V)\cap D = \emptyset$. 
Since $\mathbb{R}^2\setminus D$ is a union of such open neighbourhoods, it holds that $ \mathbb{R}^2\setminus D $ is open. Hence $ D $ is closed in $\mathbb{R}^2$ 
