1

Show that $K \subset \mathbb{R}^d$ is compact $\iff \forall f\in C^0(K, \mathbb{R})$, $f$ is bounded on $K$.

The direction "$\implies$" is given by Weierstrass theorem.

For the other direction, I want to show that $K$ is bounded and closed and thus compact.

We have in particular for $f=\pi_i$ (the $i$-th projection), that $f$ is bounded for any $1 \leq i \leq d$, which implies $K$ is bounded.

But I'm not sure how to show that $K$ is closed.

I thought about maybe looking at something like $f(x) = ||x||$ and then we have $f^{-1}[\mathbb{R}]=K$, and by the thorem that says that the preimage of a closed set by a continuous function is closed we should get that $K$ is closed?

But I'm pretty sure I'm using it wrong since it seems I can prove some open sets are closed this way, which doesn't make sense. So my questions are:

  1. What is the mistake in the last part?
  2. How do I correctly show $K$ is closed?
paxtibimarce
  • 645
  • 5
  • 13

1 Answers1

1

Your mistake is that the preimage will be a closed set in the induced topology on $K$, not in $\mathbb{R^d}$.

Anyway, suppose $K$ is not closed in $\mathbb{R^d}$. Then there is some point $y\in\overline{K}\setminus K$. Now define $f:K\to\mathbb{R}$ by $f(x)=\frac{1}{||x-y||}$. It is well defined, because $y\notin K$, and it's easy to see it is continuous. However, $y\in\overline{K}$, and so there is some sequence $(x_n)$ of elements of $K$ such that $x_n\to y$. For such a sequence we have $f(x_n)\to\infty$, and so $f$ is not bounded, a contradiction.

Mark
  • 39,605
  • Thanks, I got the solution. But I'm not sure yet where is the mistake. Could you explain from an analysis perspective, how is it wrong? Doesn't the first comment here show that I used the theorem correctly?https://math.stackexchange.com/questions/437829/the-preimage-of-continuous-function-on-a-closed-set-is-closed – paxtibimarce Feb 17 '21 at 17:04
  • 1
    If you have a continuous map $f:X\to Y$ then the preimage of a closed set in $Y$ will be closed in $X$, this is true. So if you define a continuous function $f:K\to\mathbb{R}$ (where the topology on $K$ is the induced topology from $\mathbb{R^d}$) then $K=f^{-1}(\mathbb{R})$ will be closed in $K$. But this is nothing but a trivial result, as the whole space is closed in every topological space. It doesn't tell you anything about if $K$ is closed in $\mathbb{R^d}$. – Mark Feb 17 '21 at 17:08
  • I don't think I have the topology background to understand this. But anyway, does this issue also exist for open sets? Or is it always correct that the preimage of an open set by a continuous map is open? – paxtibimarce Feb 17 '21 at 17:13
  • Nevermind I can see that it's just the same. If anyone could explain Mark's comment in "analysis" it would be great. – paxtibimarce Feb 17 '21 at 17:16
  • 1
    Again, what matters is the topology. If your domain is $K$ then you can only say that the preimage of an open/closed set will be open/closed in $K$. In your example $K=f^{-1}(\mathbb{R})$ is also open in $K$, as a preimage of an open set. But as you pointed correctly in the question, $K$ is obviously not open in $\mathbb{R^d}$. Now, if on the other hand you define a continuous map $f:\mathbb{R^d}\to\mathbb{R}$ (the domain is now all $\mathbb{R^d}$) then preimages of open sets will indeed be open in $\mathbb{R^d}$. However, now $f^{-1}(\mathbb{R})=\mathbb{R^d}$, it has nothing to do with $K$. – Mark Feb 17 '21 at 17:18
  • 1
    Not sure how can it be explained with analysis terms. After all, proving continuity by taking preimages is a topological method. – Mark Feb 17 '21 at 17:19
  • Yes I can see the problem but I have no idea what being "open in $K$" means.

    I just read that theorem again and it seems the conditions are a little more delicate then I remembered: $f: E \subset \mathbb{R}^d \to \mathbb{R}^m$ is open $\iff \forall$ open $ U \subset \mathbb{R}^m \exists$ open $V \subset \mathbb{R}^d$ s.t $f^{-1}[U] = V \cap E$

    – paxtibimarce Feb 17 '21 at 17:24
  • 1
    A subset $V\subseteq K$ is "open in $K$" if there is some open set $U\subseteq\mathbb{R^d}$ such that $V=U\cap K$. So yeah, the version of the theorem that you wrote now is correct. If $f:E\to\mathbb{R}$ is continuous then the preimage of an open set in $\mathbb{R}$ is open in $E$, in the sense that I just defined. I also found it hard to understand these things at the beginning. It becomes easier after you learn general topology. – Mark Feb 17 '21 at 17:29