Extreme points of unit ball in $C(X)$ Let $X$ be a compact Hausdorff space and $C(X)$ be the space of continuos functions in sup-norm.
I read in Douglas' Banach algebra techniques in operator theory that the followings are equivalent: 

1)$f\in C(X)$ is an extreme point of the unit ball;

and

2)$|f(x)|=1$ for all $x\in X$.

It is easy to show that 2) implies 1). However, I am unable to show the converse.
I could show that $f$ is extreme implies $\|f\|=1$ but this is far from what we need.
My guess: if 2) is false. We try to construct a nonnegative function $r$ on $X$ which is strictly positive when $|f(x)|\neq 1$ and meanwhile \begin{equation}
|(1+r)f|\le 1
\end{equation}on $X$.  Then we can decompose  \begin{equation}
f=\frac{1}{2}(1+r)f+\frac{1}{2}(1-r)f.
\end{equation} 
If $|f|$ is bounded away from $0$, then $r=-1+1/|f|$ would be a good choice, but I cannot rule out the case when $f$ vanishes at certain points.
Can somebody help? Thanks!
Also a related problem, Douglas then says these extreme points of the unit ball spans the entire $C(X)$. Can somebody also give a hint on this?
Thanks!
 A: Suppose $\varepsilon=|f(t_0)|<1$ for some $t_0$. By continuity there exists $V\ni t_0$, open, with  $|f(t)-f (t_0)|<(1-\varepsilon)/2$ for all $t\in V$. Now let $g$ be a continuous function, supported on $V$, such that $g(t_0)=(1-\varepsilon)/2$ and $|g|\leq(1-\varepsilon)/2$.
Then $|f\pm g|\leq1$, and $f=\frac12(f+g)+\frac12(f-g)$, so $f$ is not extreme. 
Edit: regarding your second question, it is something you already know. $C(X)$ is a unital C$^*$-algebra, so any element is a linear combination of four unitaries, by the usual trick of writing a complex number $a+ib$ with $|a+ib|\leq 1$ as 
$$
\begin{align}
a+ib=&\frac12\left([a+i(1-a^2)^{1/2}]+[a-i(1-a^2)^{1/2}]\right)\\
&+\frac{i}2\left([b+i(1-b^2)^{1/2}]+[b-i(1-b^2)^{1/2}]\right)
\end{align}
$$
A: You are quite close: don't look at $(1\pm r)f$, look at $f\pm r$ instead.
There is $\varepsilon \gt 0$ such that the set $U = \{x : \lvert f(x)\rvert \lt 1-\varepsilon\}$ is non-empty. Let $u \in U$ be arbitrary. Urysohn's lemma gives a function $g$ such that $g(u) = 1$ and $g|_{U^c} \equiv 0$. Take $r = \varepsilon g$. Then $f = \frac{1}{2}(f+r) + \frac{1}{2}(f-r)$ shows that $f$ is not extremal because $\lvert f(x) \pm r(x)\rvert \leq 1$ for all $x$.
