Is a function that maps every connected set to a connected set continuous? A continuous function maps a connected set to a connected set. Is the converse of this true? That is, is a function that maps every connected set to a connected set necessarily continuous? How about a real-valued function?
 A: No. Let $i: X \to X$ be the identity, where the codomain has the cofinite topology and and the domain has the trivial (indiscrete) topology. If $X$ is infinite then this function maps connected to connected but is not continuous.
A: Yet another example - there are lots of topologies (such as the usual topology on the rationals, or the $p$-adics, or the Cantor set) which are nontrivial and yet totally disconnected - e.g., have no nontrivial connected subsets https://en.wikipedia.org/wiki/Totally_disconnected_space. Any function $f$ from such a space will send connected sets to connected sets, since the only connected sets in such a space are single points (fine, or the emptyset :P).
A: No. There is a function $f:\mathbb R\to\mathbb R$ which takes all real values in every interval. You can get such a function by constructing a sequence of pairwise disjoint Cantor sets (nonempty closed nowhere dense sets with no isolated points, i.e., homeomorphs of the standard Cantor set) so that every rational interval contains one of them, and then defining a function which maps each of those Cantor sets onto the whole line.
Clearly such a function is everywhere discontinuous, and the image of any connected set is either a single point or the whole line.
A: The converse is not true. The function $f : \mathbb{R} \to \mathbb{R}$ defined by $f(x) = \begin{cases}\sin \dfrac{1}{x} & \text{if} \ x \neq 0 \\ 0 & \text{if} \ x = 0\end{cases}$ is discontinuous at $x = 0$, but every connected set is mapped to a connected set.
