f: [-1, 1]---R and the graph of f is compact, prove that f is continuous?

Any hint will be appreciated!!

2. Assume that the graph is compact. Assume for contradiction that $\displaystyle f$ is discontinuous at $\displaystyle x_0 \in [-1,1]$. Then there exists an $\displaystyle \epsilon > 0$ and a sequence $\displaystyle \{x_n \} \subset [-1,1]$ such that $\displaystyle \{x_n \}$ converges to $\displaystyle x_0$. Look at the sequence $\displaystyle \{(x_n, f(x_n)) \}$. Since the graph is compact it has a subsequence $\displaystyle \{(x_{n_{k}}, f(x_{n_{k}})) \}$ which converges to a point $\displaystyle (x_1, f(x_1))$. So $\displaystyle \{x_{n_{k}} \}$ converges to $\displaystyle x_1$. But $\displaystyle \{f(x_{n_{k}}) \}$ converges to $\displaystyle f(x_0)$ which is a contradiction. This implies that $\displaystyle G(f) \to X$ is continuous and onto.

3. Originally Posted by violetsf
f: [-1, 1]---R and the graph of f is compact, prove that f is continuous?

Any hint will be appreciated!!
What about the Dirichlet function . Meaning rationals get mapped into 0 and irrationals into 1. So the image of [-1,1] is {0,1} which is certainly compact.
--------
Tukeywilliams, I think she is asking the converse.

4. I think I proved the right statement?

5. I was thinking whether f(x0)=f(x1) ??
Originally Posted by tukeywilliams
I think I proved the right statement?

6. Originally Posted by tukeywilliams
I think I proved the right statement?
This is my understanding. By "graph" the poster means "image".

So the poster is asking: given a function mapping a compact set ([-1,1] is compact) into a compact set does it mean that the function is continous on the set?
That is what I did.

Now, I gave an example involving the Dirichelt (discontinous) function which shows it is false. You are saying you proved it, if so, then why do I have a conter-example?

7. $\displaystyle f$ is continuous on $\displaystyle [-1,1]$ if and only if $\displaystyle G(f)$ is compact. I proved the $\displaystyle \Leftarrow$ direction.

I defined $\displaystyle G(f) = \{x, f(x))| x \in [0,1] \}$

8. Originally Posted by tukeywilliams
$\displaystyle f$ is continuous on $\displaystyle [-1,1]$ if and only if $\displaystyle G(f)$ is compact. I proved the $\displaystyle \Leftarrow$ direction.

I defined $\displaystyle G(f) = \{x, f(x))| x \in [0,1] \}$
I am not going to read your proof now, but I think I see out difference. You use $\displaystyle \{ (x,f(x)) \}$, i.e. as a point in $\displaystyle \mathbb{R}^2$, while I used $\displaystyle \{ f(x) \}$ as a point in $\displaystyle \mathbb{R}$. So maybe it is necessary for it to be continous.