Closed Bounded Intervals and Uniform Continuity For this Theorem, the proof on my course notes is like:  

Suppose, for a contradiction,that $f: [a,b] \to \mathbf R$ is continuous but not uniformly continuous on $[a,b]$.
  Choose $\epsilon \gt 0$ so that for all $\delta \gt 0$ there exisit $x,y \in [a,b]$ such that $|x - y| \le \delta$ but $|f(x) - f(y)| \gt \epsilon$. Thus for each $k \in \mathbb Z^{+}$ choose $x_{k},y_{k}\in[a,b]$ with $|x_{k}-y_{k}| \le \frac{1}{k}$ and $|f(x_{k}) -f(y_{k})|\gt \epsilon$
  By the Bolzano Weierstrass Theorem, we can choose a convergent subsequence $(y_{k_{j}})_{k_{j}}$ of $(y_{k})_k$} . Let $c = \lim_{j \to \infty}y_{k_{j}}$. For all $j$ we have $|x_{k_{j}} - y_{k_{j}}| \le \frac{1}{k_{j}}$,hence by sequeeze theorem we have $x_{k_{j}} \to c$.
  Since $f$ is continuous at $c$ and $x_{k_{j}} \to c$, $y_{k_{j}} \to c$, we have $f(x_{k_{j}}) \to f(c) ,f(y_{k_{j}}) \to f(c)$ so that $|f(x_{k_{j}}) - f(y_{k_{j}})| \le \epsilon$ giving a contradiction.  

I just don't understand why this proof only holds for Closed Interval ? Or where we used some special properties of Closed Interval in the above proof?
Can someone help me? Thansk! 


Please see Paramanand Singhs answer for a more detailed and correct exposition. 


Necessary for the application of the Bolzano-Weierstraß Theorem is that the sequence of question is bounded. But this can only happen if $[a,b]$ is a closed interval, making this condition necessary too (otherwise there might be unbounded sequences, ruining the proof). So, the fact that $f$ is defined on a closed bounded interval enables us to use the Bolzano-Weierstraß Theorem here.
EDIT: More important, the declared limit of the given subsequences might not be within the interval, if its not closed.
