Show $A=\{ (x,y)\in \mathbb R \mid xy=1 \}$ is closed in $\mathbb R^2.$ Claim : $A:=\{ (x,y)\in \mathbb R \mid xy=1 \}$ is closed in $\mathbb R^2.$
Hint is given, but I cannot finish.

Hint
Let $(a,b)\in A^c$. Then $ab\neq 1$, and WLOG : $ab>1.$ We can pick $q\in \mathbb Q$ s.t. $ab-1>q>0$ from the density of rational numbers, and then $B((a,b), \tfrac{q}{2})\subset A^c$. Thus $A$ is closed.

I cannot see why $B((a,b), \tfrac{q}{2})\subset A^c$.
For arbitrary $(c,d)\in B((a,b), \tfrac{q}{2})$, $\|(a,b)-(c,d)\|<\tfrac{q}{2}<\tfrac{ab-1}{2}$ holds and in order to show $(c,d)\in A^c$, suppose $cd=1.$
Then, $d=\frac{1}{c}$ and I have
$$\frac{ab-1}{2}>\|(a,b)-(c,\tfrac{1}{c})\|=\sqrt{(a-c)^2+(b-\tfrac{1}{c})^2}.$$
I didn't lead contradiction from here yet.
Thanks for any help.
 A: As written, the hint won't work.
Consider $(a,b)=(2000,0.001)$ with $ab=2>1$. Following the hint, we may pick $q=\frac12$, but $B((a,b),\frac12)$ intersects $A$ as it even intersects the $x$-axis below $A$.
So either improve the idea behind the hint or try something completely different (cf. comments). In fact, it already makes no sense that the hint author references the density of $\Bbb Q$ in $\Bbb R$
A: So the hint suggests the method of attack, which is to pick the correct $q$ so that the interesection doesn't occur. Towards this end we calculate the smallest distance to the curve $xy=1$ from $(a,b)$ as $$d=\inf \{\vert \vert (a,b) - (x,y) \vert \vert : (x,y) \in A\}$$ which is non-zero by hypothesis and with $\vert \vert \cdot \vert \vert \geq 0$ we can assert that $d > 0$.
We can now choose some $q \in \mathbb{Q}$ with $0 < q < d$ so that $B((a,b),q)$ does not intersect any points of the curve $xy=1$. While $d$ is a real number we didn't actually need it as we appealed to the density of $\mathbb{Q}$ in $\mathbb{R}$ to pick the right rational.
A: This is the approach I first used when encountering this problem:
Let $\{(x_n,y_n)\}$ be a convergent sequence in $A$. As a sequence in $\mathbb R^2$ is convergent if and only if its coordinate sequences are convergent, we have $y_n\to y$ and $x_n\to x$ for some $x,y\in\mathbb R$.  For all $n$ we have $x_ny_n=1$, or $y_n=\frac 1{x_n}$. Taking the limit as $n\to\infty$, we see that $y=\frac 1x$, or $xy=1$. Since $A$ is a metric space, it follows that $A$ is closed.
A bit more succintly, we could note that the $(x,y)\mapsto xy$ is a continuous map from $\mathbb R^2$ to $\mathbb R$, and as $A$ is the preimage of the closed set $\{1\}$ in $\mathbb R$, it too is closed.
