Easy proof that $\{(x,y) \in \mathbb{R}^2 : y=\tan(x) \}$ is a closed set. I'd like to know whether there's an "easy" proof that $$A:= \{(x,y) \in \mathbb{R}^2 : y=\tan(x) \} .$$
I've tried to prove that its complement is open, but given an $(x,y)$ such that $\tan(x) \neq y$, it's a bit of a grind to find (in the general case) an open set that contains $(x,y)$ and does not intersect $A$. Is there a simpler argument using basic euclidean topology?
Some of the comments here gave me an idea: If $U:=\{{(x,y) \in \mathbb{R}^2: cos(x) \neq 0}\}$ and $f:U -> \mathbb{R}$ is such that $f(x,y)=y-tan(x)$, then$A=f^{-1}(\{0\})$, therefore A is closed in U. Does this imply that A is closed in \mathbb{R}^2, though?

Note that $A= \{(x,y) | x \notin {\pi \over 2} \mathbb{Z}, \ y = \tan x \}$.
Suppose $(x_k, \tan x_k ) \to (x,y)$. In particular, for large $k$ we have
$|y-\tan x_k| \le 1$ and so
$\tan x_k \in [y-1,y+1]$.
Hence $x_k \in \cup_{n \in \mathbb{Z}} I_n$, where $I_n = [\arctan (y-1)+n \pi, \arctan (y+1) +n \pi]$.
Note that if $n \neq n'$ and $a \in I_n, b \in I_{n'}$ then
$|a-b| \ge \pi-\max(|\arctan (y-1)|, |\arctan (y+1)|) > 0$.
Since $x_k \to x$, there must be some $n$ such that $x_k \in I_n$ for a countable number of $k$ and since $I_n$ is closed, we have $x \in I_n$.
Since $\tan$ is continuous on $I_n$, we see that $\tan x_k \to \tan x = y$
and so $(x,y) \in A$.
