Proof that if f is function, continuous on an interval I then f(I) is also an interval The theorem would be:
Let $f:E\to\mathbb{R}$ a continuous function and $I$ and interval, $ I \subseteq E $. Then $f(I)$ is also an interval.
I'm not sure if I've understood completely what I have to prove. So, I need to prove that f takes all the values in $f(I)$, which is easy, using the intermediate value theorem. 
But how do I know that $\forall x \in f(I)$, then $f(x) \in I$ ? Isn't it necesary to also prove this? I know for sure that $\forall \lambda \in f(I)$  ,  there is an $x_{\lambda}$ such that $f(x_{\lambda})=\lambda$, given the fact that $I=[a,b]$ , and $f(I)=[f(a),f(b)]$. That is, forbsure, every value in $f(I)$ is taken by f. So, what I don't know how to prove is how do I know that for any value in $I$  , the function sends me for sure in $f(I)$??
 A: The comments already answer the questions raised in your last paragraph so I'm not sure my answer adds much. But I can always delete it later. As for proving that $f(I)$ is an interval if $I$ is, here is how I would do it:
First I'd prove that in $\mathbb R$ a set is connected if and only if it is an interval. But this was probably done in the book you are reading or the lecture you are taking. 
Next I'd prove that a continuous function maps connected sets to connected sets: By contradiction assume that not. Then there are open disjoint sets $U,V$ such that $f(I) = U \cup V$. Then $I = f^{-1}U \cup f^{-1}V$ is disjoint, a contradiction. 
Note that this is exactly what you are asked to show when the statement is restricted to $\mathbb R$. So perhaps what I wrote earlier is not true and this exercise is exactly asking you to prove that a set in $\mathbb R$ is connected if and only it is an interval. Since if you assumed both that and the intermediate value theorem there is nothing left to prove. 
A: It seems that the biggest problem I had proving this, is that I didn't know how to rigurously define an interval. So, let me first state the rigurous definition of an interval, for those who may end up here, and who don't already know it, but they are also asking themselves how to prove the theorem in my question.
We say that the set $I$ is an interval if for any $a,b\in I$, with $a<b$ we have that if $a\leq c\leq b$, for a number $c$ , then also $c\in I$.
Now, if $\alpha,\beta \in f(I)$ , there is $a,b\in I$, such that $f(a)=\alpha$ and $f(b) = \beta$. Let $\lambda$ , with $f(\alpha) \leq \lambda \leq f(\beta)$ . We want to show that $\lambda \in f(I)$. If $\lambda=f(\alpha)=f(\beta)$, then obsiously $\lambda \in f(I)$, so  we now have to deal only with the case when the inequality is strict: $f(\alpha) < \lambda < f(\beta)$
But we know from the intermediate value theorem that that there is an $x_{\lambda}\in (a,b)$ such that $f(x_{\lambda})=\lambda$, that is $\lambda \in f(I)$, because obsiously $f(x_{\lambda})\in f(I)$. Q.E.D.
Is this correct? I haven't been able to find any flaw in my proof.
