for infinite compact set $X$ the closed unit ball of $C(X)$ will not be compact

Let $(X,d)$ be a compact metric space and let $S= \{f \in C(X):\|f\|\le 1\}$ be the closed unit ball of $C(X)$. Show that if $X$ is an infinite set then $S$ will not be compact.

-
Thanks Michael ,please let me know is this work for the metric space also? –  Athar Raheel Ahmad Oct 4 '12 at 22:36
The space of continuous functions on a compact metric space with the sup-norm is an infinite dimensional normed space. Finite dimensional subspaces are closed. You can use this to find a countable family of disjoint open balls with the same radius in the unit ball. By covering the rest with very small balls, you get an open cover without a countable subcover. –  Michael Greinecker Oct 4 '12 at 22:41
hmmm it seems to be use full,can you explain a bit more so that i can easily do my work on it? –  Athar Raheel Ahmad Oct 5 '12 at 16:40

Let $a$ be an accumulation point of $X$. Let $f_n:X\to\mathbb{R}$ be given by $$f_n(x)=\max\big\{1-n~|a-x|,0\big\}.$$

You can verify that $\|f_n\|=1$ for all $n$. If the sequence would have a convergent subsequence, it would converge to a discontinuous function.

-
which kind of subsequence could I construct so that it could converge to a discontinuous function –  Athar Raheel Ahmad Oct 5 '12 at 18:24
@AtharRaheelAhmad Every subsequence would converge to a function that has the value $1$ at $a$ and $0$ everywhere else. That $a$ is an accumulation point guarantees that such a fnction cannot be continuous and that the sequence cannot be eventually constant. –  Michael Greinecker Oct 5 '12 at 23:14