Showing that projections $\mathbb{R}^2 \to \mathbb{R}$ are not closed

No bounded set will work, because a closed and bounded set in ${\bf R}^2$ is compact, and the image of a compact set under any continuous map is compact (so closed in any Hausdorff space, in particular in $\bf R$).

On the other hand, the graph of any function with a vertical asymptote will work, for instance that of $1/x$.

In fact, it is not hard to show that any open set in $\bf R$ can be obtained as the projection of a closed set in ${\bf R}^2$ in such a way that the projection is injective (no two points in the closed set project onto the same point in $\bf R$), by a similar technique. This is related to the classical fact that any $G_\delta$ (countable intersection of open sets) in ${\bf R}$ (or any other Polish space, that is, separable and completely metrizable, if you're familiar with the concepts) can be embedded as a closed set in $\bf R^N$ (product of countably infinitely many copies of $\bf R$).


The graph of $\tan^{-1}(x)$ is closed, but its projection onto the $y$-axis is not.

There's a related discussion in SO at Projection map being a closed map.


Consider the map $\phi : \mathbb{R}^2 \to \mathbb{R}$ that takes: $$(x,y) \mapsto x \cdot y.$$

This map is continous, thus $\phi^{-1}(1)$ is closed in $\mathbb{R}^2$. On the other hand its projection onto the first coordinate is $\mathbb{R} -\{0\}$ which is not closed because it's open and $\mathbb{R}$ is connected.