preimage of a closed set under continuous function

We have the following statement:

Let be $$f$$ a continuous function. The preimage of a closed set is again a closed set.

Let be $$f:(0,\infty)\times [0,\infty)\to\mathbb{R}$$ where $$f(x,y)=x+y$$.

(Where "$$[$$" means that $$0$$ is included and "$$($$" means that $$0$$ is excluded).

If I consider the preimage $$f^{-1}(1)$$ or in other words $$D:=\{(x,y)\in (0,\infty)\times [0,\infty)\mid f(x,y)=1\}$$ then this would mean that it is closed. However, it is easy to construct a counter-example to see that not all limit points of $$D$$ are an element of $$D$$ (e.g. the limit point $$(0,1)$$). So $$D$$ can't be a closed set.

How is this possible? Where is my mistake?

• Please write the preimage ("if I consider the preimage") as $f^{-1}(\{1\})$, or, more casually, as $f^{-1}(1)$. Nov 30, 2020 at 17:13

The set $$D$$, which is equal to$$\{(x,y)\in(0,\infty)\times[0,\infty)\mid x+y=1\}=\{(x,1-x)\mid x\in(0,1]\},$$is a closed subset of $$(0,\infty)\times[0,\infty)$$. In fact, it is not a closed subset of $$\Bbb R^2$$, but that's not relevant here.
• I had a typo regarding my limit point counter-example. Please see my edit. How is it possible that $D$ is closed? Nov 30, 2020 at 19:33
• Because $D=\bigl((0,\infty)\times[0,\infty)\bigr)\cap\{(x,1-x)\mid x\in\Bbb R\}$. That is, it is the intersection of a closed subset of $\Bbb R^2$ ($\{(x,1-x)\mid x\in\Bbb R\}$) with $(0,\infty)\times[0,\infty)$; therefore, it is a closed subset of $(0,\infty)\times[0,\infty)$. Nov 30, 2020 at 19:37
• Ah o.k. I got a bit confused which superset we are referrring to. If $(0,\infty)\times [0,\infty)$ is the superset then my counter-example doesn't apply as the point $(0,1)\neq \{(0,\infty)\times [0,\infty)\}$. However, if we refer to the superset $\mathbb{R}^2$ then my counter-example does apply and $D$ is not closed. Actually, this was the case I had in mind when I asked the question because this contradicts the given statement. So I still don't understand why the statement I made in the question is wrong in this case. Nov 30, 2020 at 20:58
• Which statement? When you say that $D$ is not a closed set? Nov 30, 2020 at 21:45