Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If a function maps every connected set onto a connected set, is it necessarily continuous? I know the converse is true.

share|cite|improve this question
up vote 5 down vote accepted

No. Consider $f: \mathbb{R} \to \mathbb{R}$ defined by

$$ f(x) = \begin{cases} \left(\sin\frac{1}{ x}\right)&\text{if $\;x> 0$;}\\ \\ \quad\quad0 &\text{if $x \leq 0$.} \\ \end{cases}$$

Then you can see that $f$ is discontinuous at $x=0$.

share|cite|improve this answer

No. For example, let $f:\mathbb R\to \mathbb R$ be defined by $f(x)=0$ if $x\leq 0$, and $f(x)=\sin\left(\frac1{x}\right)$ if $x>0$.

For functions defined on intervals in $\mathbb R$, this is the intermediate value property, a.k.a. Darboux property, after Darboux's theorem stating that derivatives have this property. E.g., $g(x)=x^2\sin(1/x)$, $g(0)=0$ is differentiable everywhere on $\mathbb R$, and its derivative is discontinuous, but still maps intervals to intervals.

There are even functions that map every open interval onto $\mathbb R$, like the Conway base 13 function.

For stronger results, see Characterising Continuous functions.

share|cite|improve this answer

I assigned a question like this to my students recently. Being continuous in $\mathbb{R}$ is equivalent to the graph being path connected. This is because a path-connected graph is compact on each closed interval, which implies continuity (see Munkres topology).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.