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?

The graph of a continuous function $f: X \to Y$ is closed in $X \times Y$, assuming $Y$ is hausdoff (you can google this result or even better, prove it). The $\tan$ function is not continuous however but it is continuous on each interval $(-\frac{\pi}{2}+ n \pi , \frac{\pi}{2}+ n \pi )$.
Hence, you only must check that it is closed in those slices that are not covered by those intervals, so only for $x =\frac{\pi}{2}+n \pi$, so just find an open set that does not intersect $\tan$ for each $(\frac{\pi}{2}+n \pi, y)$. This is much more easier to do just using facts about the $\tan$ function.
