Let $f : X \rightarrow f(X)$ be continuous and X connected. Then $f(X)$ is connected. Let $f : X \rightarrow f(X)$ be continuous and X connected. Then $f(X)$ is connected.
I'm coming across a major problem with the following proof:
Suppose $f(X)$ is not connected. Then $\exists$ non-empty sets $U,V$ open in $f(X)$ such that $f(X) = U \cup V$, and $U,V$ are disjoint.
Since $f$ is continuous, $f^{-1}(U)$ and $f^{-1}(V)$ are open in $X$ (where $f^{-1}$ is the pre-image). We want to show $f^{-1}(U)$ and $f^{-1}(V)$ disconnect X for a contradiction.
It is now easy to show that X is the union of $f^{-1}(U)$ and $f^{-1}(V)$ and that $f^{-1}(U)$ and $f^{-1}(V)$ are non-empty. However, it seems to me that $f^{-1}(U)$ and $f^{-1}(V)$ are disjoint if and only if $f$ is 1-1. Am I mistaken?
 A: $f^{-1}(U)\cap f^{-1}(V)=f^{-1}(U\cap V)=$
$f^{-1}(\emptyset)=\emptyset$
because it is always true that the intersection of the inverse image with respect to a function is the inverse image of the intersection 
A: Suppose that $x \in f^{-1}[U]$ and also $x \in f^{-1}[V]$. By definition the former means that $f(x) \in U$ and the latter that $f(x) \in V$. But then $f(x) \in U \cap V = \emptyset$, contradiction. This holds by the definitions, we don't use any property of $f$.
In general, for any family of sets $A_i, i \in I$: 
$$f^{-1}[\bigcap_{i \in I} A_i] = \bigcap_{i \in I} f^{-1}[A_i]$$
which can be shown by showing two inclusions and using the definition
$f^{-1}[A] = \{x \in X: f(x) \in A\}$ of the set $f^{-1}[A]$ for a function $f: X \to Y$.
A: This is not a formal answer; here we offer a 'loose explanation':
Functions do not have to be $\text{1:1}$ since many elements in the domain can be be mapped to the same point in the codomain (target) set.  In general, if $f: X \to Y$ is a function and $y_0$ is any element in $Y$ that is 'hit' by the function $f$, then we have a 'fiber' of the points in $X$ that get mapped to $y_0$, and we can view the function as 'collapsing' $f^{-1}(y_0)$ onto $y_0$.
The set of all fibers partition $X$. But it is easy now to also visualize coarser partitions on $X$ by looking at partitions on the image $f(Y)$ besides the finest one of singleton blocks.
How about a concrete example where all fibers are lines? Consider the set of points $Y \subset \mathbb R \times \mathbb R$ where $(a,b) \in Y \text{ iff } [a^2 + b^2 = 1 \text{ or } a^2 + b^2 = 4]$. Let $X \subset \mathbb R^3$ be all the points $(a,b,c)$ such that $(a,b) \in Y$. 
Now try to visualize the continuous and surective projection mapping $\pi: X \to Y$
$\quad (a,b,c) \mapsto (a,b)$
as collapsing fibers.
Notice that $Y$ is not a connected space, so by our theorem $X$ can't be connected.
A: In general for connected proofs, it is much easier to argue by contradiction. So we shall assume for the sake of contradiction that $f(X)$ is not connected. Hence, we see there exists $B_1, B_2$ where both are non-empty such that $\overline{B_1} \cap B_2 = \emptyset$ and $\overline{B_2} \cap B_1 = \emptyset$ such that $f(X) =B_{1} \cup B_{2}$.
Now we want this to show that $X$ is not connected. So how do we go from our function back to $X$? Well we shall consider the pre-image.
Let $X_1$ = $f^{-1}(B_1) \cap X$, and let $X_2$ = $f^{-1}(B_2) \cap X$. It should be intuitively that these sets make $X$ not connected.
Now we claim that $X = X_1 \cup X_2$. Indeed, $X_1 \cup X_2 = (f^{-1}(B_1) \cap X) \cup (f^{-1}(B_2) \cap X) = f^{-1}(B_1 \cup B_2) \cap X = f^{-1}(f(X)) \cap X = X \cap X = X. $
Now we consider $\overline{X_1} \cap X_2 = \overline{(f^{-1}(B_1) \cap A)} \cap (f^{-1}(B_2) \cap A) \subset \overline{f^{-1}(B_1)} \cap f^{-1}(B_2)$
Now here's the crucial need of continuity: $f: X \rightarrow Y$ is continuous if and only if for every $B \subset Y$ $\overline{f^{-1}(B)} \subset f^{-1}(\overline{B})$ (for the proof of this, it should be in the beginning of Rudin's chapter on continuity). Hence, we see
$\overline{f^{-1}(B_1)} \cap f^{-1}(B_2) \subset f^{-1}(\overline{B_1}) \cap f^{-1}(B_2)$ =$ f^{-1}(\overline{B_1} \cap B_2)$  = $f^{-1}(\emptyset)$ = $\emptyset$, so we have $\overline{B_1} \cap B_2 \subset \emptyset$. S we see $\overline{B_1} \cap B_2 = \emptyset$. 
Now repeat the above proof for $\overline{B_2} \cap B_1$. Now we have shown $X = B_1 \cap B_2$ where $\overline{B_2} \cap B_1 = \overline{B_1} \cap B_2  = \emptyset$, so $X$ is disconnected, but this is our desired contradiction.
