# Prove f(M) is a closed interval given f continuous on M into R, M compact and connected.

I have what I believe is a proof for this question however being how short it is, I have my reservations.

Define the function f continuous on M into R. M compact and connected.

Since M is compact and connected, f(M) is compact and connected. Because M is connected and compact its is either the empty set, {a} the singleton for some a in R, or [a,b] for some a,b in R where a is less than b WLOG. WLOG assume M=[a,b] for some a,b in R (This is where I am not sure if I am allowed to say that) Then f([a,b]) is connected and compact and hence closed and bounded. f(a) does not equal f(b) because f is continuous so by the Intermediate value theorem f takes on every value in-between f(a) and f(b). So f([a,b]) is an interval. Therefore f([a,b]) is an closed interval.

I am sorry for the lack of MathJax I am just learning it now!

• You correctly say that $f(M)$ is a connected and compact subset of $\mathbb{R}$, and you also mentioned what possibilities there are for compact connected subsets of $\mathbb{R}$. These are the two pieces of information needed to prove your result. Jul 10, 2016 at 0:21

Note that since $M$ can be any compact connected space the Intermediate Value Theorem is inapplicable.

Since $f(M)=S$ is a compact connected subspace of $R,$ all you need to show is that if a subspace $S$ of $R$ is compact and connected then it is a closed bounded interval.

First, $S$ is convex. That is, whenever $a,b\in S$ with $a\leq c \leq b$ then $[a,b] \subset S.$ Otherwise $a<b$ and some $c\in [a,b]\backslash S.$ But then $S\cap (-\infty,c)$ and $S\cap (c,\infty)$ are disjoint non-empty open subsets of the space $S$, whose union is $S.$

Second, $S$ is closed in $R.$ Otherwise if $x\in \bar S \backslash S$ then $\{S\backslash [x-1/n,x+1/n] :n\in N\}$ is an open cover (in the space $S$) of $S$ with no finite subcover.

Third, $S$ is bounded,. Otherwise $\{S\cap (-n,n): n\in N\}$ is an open cover (in $S$) of $S$ with no finite subcover.

Finally for $S\ne \emptyset$ let $a=\inf S$ and $b=\sup S,$ which exist because $S$ is bounded and not empty . Since $S$ is convex we have $S\supset [a,b]$. And $S\subset [a,b]$ by def'n of $a,b.$

The converse statement , that a bounded closed real interval is compact, is important but not actually part of your Q.

I think you're making it more complicated than it needs to be?

Why can't f(a) be equal to f(b) for a given continuous function? The constant function in $\mathbb R$ is a continuous function and it's equal at it endpoints for any $a,b\in \mathbb R$.

If we're only talking in $\mathbb R$, then you just need to look at the Weistrass Extreme Value theorem. If M is compact and $f$ is continuous, then f(M) is bounded and attains its bounds. Call its lower bound c and its upper bound C. That means that $c \leq f(x) \leq C$ for all $x \in M$. Doesn't matter if $M$ is the empty set, a singleton, etc. It's compact, end of argument. Since $f(x)$ attains its bounds, we know the inequalities are inclusive, hence $f(x) \in [c,C]$. Again, if $c=C$ we have the closed interval [c,c] which is indeed just {c}, but no fear, singletons are intervals.

Edit: Whoops. Forgot to use connectedness in the argument. If it's a singleton we're done. If $c\neq C$ then if the domain is not connected, you could have the case where the function maps to a non-interval. Connected sets under continuous functions map to connected sets.

• Oh I see that is much easier than going through and showing it is an interval. Thank you!
– Sam
Jul 10, 2016 at 0:55