# Prove that $f$ continuous if and only if $f([a,b])=[c,d]$ for $f:[a,b]\rightarrow \mathbb{R}$ strictly increasing and $a,b,c,d \in \mathbb{R}$

So I'm trying to prove the following:

Suppose $$a,b\in\mathbb{R},\quad a and $$f:[a,b]\rightarrow \mathbb{R}$$ a strictly increasing function.

Prove that $$f$$ continuous if and only if there exist $$c,d\in\mathbb{R}$$ with $$f([a,b])=[c,d]$$

My attempt: Suppose $$f([a,b])=[c,d]$$ with $$c,d$$ like above. Then $$f$$ is invertible because it is both injective (strictly increasing) and surjective. Consider a point $$f(p)\in [c,d]$$, and let $$\epsilon>0$$. Pick $$f(x)\in [c,d]\setminus f(p)$$ such that $$d(f(x),f(p))<\epsilon$$ and assume without loss of generality that $$f(x). (The other case is entirely analogous.) Then there exists some $$f(x) and because $$f(x_0)\in [c,d],\quad x_0\in f^{-1}([c,d])=[a,b]$$. Here we'll use the strictly increasing nature of $$f$$ to conclude $$x with $$x,x_0,p\in[a,b]$$ Thus, if we let $$d(x_0,p) Which is exactly the definition of continuity.

Conversely, suppose $$f$$ is continuous on $$[a,b]$$. Knowing that the image of a closed set is against closed under a continuous function, $$f([a,b])$$ is closed. Suppose $$t\in [a,b]$$, then because $$f$$ is strictly increasing, $$f(a)\leq f(t)\leq f(b)$$, and $$f([a,b])\subset [f(a),f(b)]$$. Consider $$f(s)\in[f(a),f(b)]$$, then $$f(a)\leq f(s) \leq f(b)$$ so $$a\leq s \leq b$$ and $$s\in [a,b]$$. Therefore $$[f(a),f(b)]\subset f([a,b])$$ and $$f([a,b])=[c,d]$$ for some $$c, d\in \mathbb{R}$$.

Comments: Now, I'm pretty sure that this proof is fine, but the exercise is an old exam question which makes me think that the proof is overly convoluted and could be done much simpler. I'd like some help in that.

• For one direction, you can use the fact (if you know it) that the image of a compact set under a continuous function is compact. It is not true that the image of a closed set under a continuous functions needs to be closed -- see math.stackexchange.com/questions/147879/… for some examples. – Not a grad student Jun 24 '17 at 12:39
• Image of a closed set under a continuous function need not be closed. For example, $f(x)=\frac1x, f[2,\infty)=[\frac12,0)$. But it is true that continuous image of closed and bounded interval is a closed and bounded interval. – Sahiba Arora Jun 24 '17 at 14:33

To prove that $f$ is continuous: let $U$ be an open interval in $[c,d]$. Then it is either of the form $(e,e')$ where $c<e<e'<d$, or of the form $[c,e)$, or of the form $(e,d]$. In the first case one proves that $f^{-1}(e,e')=(f^{-1}e,f^{-1}e')$ by showing that each side is contained in the other. The remaining cases are proved similarly.
The converse follows immediately from the fact that the image of a compact set (= closed and bounded in the case of $\mathbb{R}^n$) under a continuous map is compact.
• Topology shouldn't be a problem (used Rudin), but let me attempt to make a proof, because I don't know that theorem by rote and the proof seems pretty simple: Suppose $f$ a continuous function and $X$ a compact set. Then there exists finite indices such that $\{S_n\}$ covers $X$ (with $S_i$ an open set). Since $f$ maps open sets to open sets, there exists a finite cover $\{f(S_n)\}$ of $f(X)$, making $f(X)$ compact. Is this correct? – Mitchell Faas Jun 24 '17 at 13:00
• That is not correct because $f$ does not need to map open sets to open sets! The inverse image of closed must be closed, and the inverse image of open must be open, but $f$ doesn't necessarily take open sets to open sets. Also, let's clarify the definition of compact. Compact doesn't mean that there exists a finite open cover -- it means that for every open cover there exists a finite subcover. So to prove that $f(x)$ is compact, the first sentence should be: Let $\{U_\alpha\}$ be an open cover of $f(X)$. Then you want to show that there exists a finite subcover. – Not a grad student Jun 24 '17 at 13:02
• Oh, sure I see. So then it continues: Since $f$ is continuous, each of the sets $f^{-1}(U_\alpha)$ is open and $f^{-1}(\{U_\alpha\})$ covers $X$. Then there exist finite indices such that $X\subset f^{-1}(U_{\alpha_1})\cup...\cup f^{-1}(U_{\alpha_n})$ and thus, $f(X)\subset U_{\alpha_1}\cup...\cup U_{\alpha_n}$. – Mitchell Faas Jun 24 '17 at 13:17
• Right. Here by open cover I mean a collection of open sets whose union is that set -- i.e. $f(X) = \cup_\alpha U_\alpha$. Then $X=\cup_\alpha f^{-1}(U_\alpha)$. Like you said, continuity implies that for each $\alpha, f^{-1}(U_\alpha)$ is open. By compactness of $X$, $X$ is the union of finitely many of these open sets, say, $X=f^{-1}(U_{\alpha_i})$ where each $U_{\alpha_i}$ is one of the $U_\alpha$'s. Then $f(X)=\cup U_{\alpha_i}$. – Not a grad student Jun 24 '17 at 13:31
• Just to clarify, the epsilon-delta definition of continuity in real analysis is really just the statement that the inverse image of any open set is open, which is the definition of continuity in topology. The balls of radius epsilon form a basis for the topology of $\mathbb{R}$. So that explains the connection between the "real analysis" definition of continuity and the general one you see in topology. My mind was blown when I realized that! – Not a grad student Jun 24 '17 at 13:33