3The topology of C(K)
II Linear Analysis
3.4 Stone–Weierstrass theorem
Here we will prove the Stone–Weierstrass theorem, which is a generalization of
the classical Weierstrass approximation theorem.
Theorem
(Weierstrass approximation theorem)
.
The set of polynomials are
dense in C([0, 1]).
This tells us that
C
([0
,
1]) is not too “big” because it is has a dense subset
of “nice” functions.
We will try to generalize this for more general domains. Note that for this
section, real-valued and complex-valued continuous functions are somewhat
differentiable. So we will write these as C
R
(K) and C
C
(K).
To state this theorem, we need some definitions.
Definition
(Algebra)
.
A vector space (
V,
+) is called an algebra if there is an
operation (called multiplication)
·
:
V → V
such that (
V,
+
, ·
) is a rng (i.e. ring
not necessarily with multiplicative identity). Also,
λ
(
v ·w
) = (
λv
)
·w
=
v ·
(
λw
)
for all λ ∈ F, v, w ∈ V .
If V is in addition a normed vector space and
kv · wk
V
≤ kvk
V
· kwk
V
for all v, w ∈ V , then we say V is a normed algebra.
If V complete normed algebra, we say V is a Banach algebra.
If
V
is an algebra that is commutative as a rng, then we say
V
is a commutative
algebra.
If V is an algebra with multiplicative identity, then V is a unital algebra.
Example. C(K) is a commutative, unital, Banach algebra.
Example. Recall from the example sheets that if T
1
, T
2
: V → V , then
kT
1
◦ T
2
k
B(V,V )
≤ kT
1
k
B(V,V )
kT
2
k
B(V,V )
.
So B(V, V ) is a unital normed algebra.
We will need this language to generalize the Weierstrass approximation
theorem. The main problem in doing so is that we have to figure out what we
can generalize polynomials to. This is why we need these funny definitions.
Theorem
(Stone-Weierstrass theorem)
.
Let
K
be compact, and
A ⊆ C
R
(
K
)
be a subalgebra (i.e. it is a subset that is closed under the operations) with the
property that it separates points, i.e. for every
x, y ∈ K
distinct, there exists
some
f ∈ A
such that
f
(
x
)
6
=
f
(
y
). Then either
¯
A
=
C
R
(
K
) or there is some
x
0
∈ K such that
¯
A = {f ∈ C
R(K)
: f(x
0
) = 0}.
Note that it is not possible that
¯
A
is always zero on 2 or more points, since
A separates points.
This indeed implies the Weierstrass approximation theorem, since polynomials
separates points (consider the polynomial
x
), and the polynomial 1 is never 0
for all x. In fact, this works also for polynomials on compact subsets of R
n
.
Note, however, that the second case of Stone-Weierstrass theorem can actually
happen. For example, consider
K
= [0
,
1] compact, and
A
be the algebra
generated by x. Then
¯
A = {f ∈ C
R
(K) : f(0) = 0}.
We will prove this in using two lemmas:
Lemma.
Let
K
compact,
L ⊆ C
R
(
K
) be a subset which is closed under taking
maximum and minimum, i.e. if
f, g ∈ L
, then
max{f, g} ∈ L
and
min{f, g} ∈ L
(with
max{f, g}
defined as
max{f, g}
(
x
) =
max{f
(
x
)
, g
(
x
)
}
, and similarly for
minimum).
Given
g ∈ C
R
(
K
), assume further that for any
ε >
0 and
x, y ∈ K
, there
exists f
x,y
∈ L such that
|f
x,y
(x) − g(x)| < ε, |f
x,y
(y) −g(y)| < ε.
Then there exists some f ∈ L such that
kf − gk
C
R
(K)
< ε,
i.e. g ∈
¯
L.
This means that if we are allowed to take maximums and minimums, to be
able to approximate a function, we just need to be able to approximate it at any
two points.
The idea is to next show that if
A
is a subalgebra, then
¯
A
is closed under
taking maximum and minimum. Then use the ability to separate points to find
f
x,y
, and prove that we can approximate arbitrary functions.
Proof. Let g ∈ C
R
(K) and ε > 0 be given. So for every x, y ∈ K, there is some
f
x,y
∈ L such that
|f
x,y
(x) − g(x)| < ε, |f
x,y
(y) −g(y)| < ε.
Claim.
For each
x ∈ K
, there exists
f
x
∈ L
such that
|f
x
(
x
)
− g
(
x
)
| < ε
and
f
x
(z) < g(z) + ε for all z ∈ K.
Since f
x,y
is continuous, there is some U
x,y
containing y open such that
|f
x,y
(z) − g(z)| < ε
for all z ∈ U
x,y
. Since
[
y∈K
U
x,y
⊇ K,
by compactness of K, there exists a some y
1
, ··· , y
n
such that
n
[
i=1
U
x,y
i
⊇ K.
g
g + ε
x
y
1
y
2
y
3
f
y
1
f
y
2
f
y
3
We then let
f
x
(z) = min{f
x,y
1
(z), ··· , f
x,y
n
(z)}
for every
z ∈ K
. We then see that this works. Indeed, by assumption,
f
x
∈ L
.
If z ∈ K is some arbitrary point, then z ∈ U
x,y
i
for some i. Then
f
x,y
i
(z) < g(z) + ε.
Hence, since f
x
is the minimum of all such f
x,y
i
, for any z, we have
f
x
(z) < g(z) + ε.
The property at x is also clear.
Claim. There exists f ∈ L such that |f(z) − g(z)| < ε for all z ∈ K.
We are going to play the same game with this. By continuity of
f
x
, there is
V
x
containing x open such that
|f
x
(w) − g(w)| < ε
for all w ∈ V
x
. Since
[
x∈K
V
x
⊇ K,
by compactness of K, there is some {x
1
, ··· , x
m
} such that
m
[
j=1
V
x
j
⊇ K.
Define
f(z) = max{f
x
1
(z), ··· , f
x
m
(z)}.
Again, by assumption, f ∈ L. Then we know that
f(z) > g(z) − ε.
We still have our first bound
f(z) < g(z) + ε.
Therefore we have
kf − gk
C
R
(K)
< ε.
Lemma.
Let
A ⊆ C
R
(
K
) be a subalgebra that is a closed subset in the topology
of C
R
(K). Then A is closed under taking maximum and minimum.
Proof. First note that
max{f(x), g(x)} =
1
2
(f(x) + g(x)) +
1
2
|f(x) − g(x)|,
min{f(x), g(x)} =
1
2
(f(x) + g(x)) −
1
2
|f(x) − g(x)|.
Since
A
is an algebra, it suffices to show that
f ∈ A
implies
|f| ∈ A
for every
f
such that kfk
C
R
(K)
≤ 1.
The key observation is the following: consider the function
h
(
x
) =
√
x + ε
2
.
Then
h
(
x
2
) approximates
|x|
. This has the property that the Taylor expansion
of
h
(
x
) centered at
x
=
1
2
is uniformly convergent for
x ∈
[0
,
1]. Therefore there
exists a polynomial S(x) such that
|S(x) −
p
x + ε
2
| < ε.
Now note that
S
(
x
)
− S
(0) is a polynomial with no constant term. Therefore,
since A is an algebra, if f ∈ A, then S(f
2
) − S(0) ∈ A by closure.
Now look at
k|f|−(S(f
2
) −S(0))k
C
R
(K)
≤ k|f|−
p
f
2
+ ε
2
k+k
p
f
2
+ ε
2
−S(f
2
)k+kS(0)k.
We will make each individual term small. For the first term, note that
sup
x∈[0,1]
|x −
p
x
2
+ ε
2
| = sup
x∈[0,1]
ε
2
|x +
√
x
2
+ ε
2
|
= ε.
So the first term is at most
ε
. The second term is also easy, since
S
is chosen
such that
|S
(
x
)
−
√
x + ε
2
| <
1 for
x ∈
[0
,
1], and
|f
(
x
)
2
| ≤
1 for all
x ∈
[0
,
1].
So it is again bounded by ε.
By the same formula, |S(0) −
√
0 + ε
2
| < ε. So |S(0)| < 2ε. So
k|f| − (S(f
2
) − S(0))k
C
R
(K)
< 4ε.
Since
ε >
0 and
A
is closed in the topology of
C
R
(
K
),
f ∈ A
and
kfk
C
R
(K)
≤
1
implies that |f| ∈ A.
Note that if we have already proven the classical Weierstrass approximation
theorem, we can just use it to get a polynomial approximation for |f| directly.
We will now combine both lemmas and prove the Stone-Weierstrass theorem.
Theorem
(Stone-Weierstrass theorem)
.
Let
K
be compact, and
A ⊆ C
R
(
K
)
be a subalgebra (i.e. it is a subset that is closed under the operations) with the
property that it separates points, i.e. for every
x, y ∈ K
distinct, there exists
some
f ∈ A
such that
f
(
x
)
6
=
f
(
y
). Then either
¯
A
=
C
R
(
K
) or there is some
x
0
∈ K such that
¯
A = {f ∈ C
R(K)
: f(x
0
) = 0}.
Proof.
Note that there are two possible outcomes. We will first look at the first
possibility.
Consider the case where for all
x ∈ K
, there is some
f ∈ A
such that
f
(
x
)
6
= 0.
Let
g ∈ C
R
(
K
) be given. By our previous lemmas, to approximate
g
in
¯
A
, we
just need to show that we can approximate
g
at two points. So given any
ε >
0,
x, y ∈ K, we want to find f
x,y
∈ A such that
|f
x,y
(x) − g(x)| < ε, |f
x,y
(y) −g(y)| < ε. (∗)
For every
x, y ∈ K
,
x 6
=
y
, we first show that there exists
h
x,y
∈ A
such that
h
x,y
(
x
)
6
= 0, and
h
x,y
(
x
)
6
=
h
x,y
(
y
). This is easy to see. By our assumptions, we
can find the following functions:
(i) There exists h
(1)
x,y
such that h
(1)
x,y
6= h
(1)
x,y
(y)
(ii) There exists h
(2)
x,y
such that h
(2)
x,y
(x) 6= 0.
(iii) There exists h
(3)
x,y
such that h
(3)
x,y
(y) 6= 0.
Then it is an easy exercise to show that some linear combination of
h
(1)
x,y
and
h
(2)
x,y
and h
(3)
x,y
works, say h
x,y
.
We will want to find our
f
x,y
that satisfies (
∗
). But we will do better. We
will make it equal
g
on
x
and
y
. The idea is to take linear combinations of
h
x,y
and
h
2
x,y
. Instead of doing the messy algebra to show that we can find a working
linear combination, just notice that (
h
x,y
(
x
)
, h
x,y
(
y
)) and (
h
x,y
(
x
)
2
, h
x,y
(
y
)
2
)
are linearly independent vectors in
R
2
. Therefore there exists
α, β ∈ R
such that
α(h
x,y
(x), h
x,y
(y)) + β(h
x,y
(x)
2
, h
x,y
(y)
2
) = (g(x), g(y)).
So done.
In the other case, given
A
, suppose there is
x
0
∈ K
such that
f
(
x
0
) = 0 for
all f ∈ A. Consider the algebra
A
0
= A + λ1 = {f + λ1 : f ∈ A, λ ∈ R}
Since
A
separates points, and for any
x ∈ K
, there is some
f ∈ A
0
such that
f(x) 6= 0 (e.g. f = 1), by the previous part, we know that
¯
A
0
= C
R
(K).
Now note that
¯
A ⊆ {f ∈ C
R
(K) : f(x
0
) = 0} = B.
So we suffices to show that we have equality, i.e. for any
g ∈ B
and
ε >
0, there
is some f ∈ A such that
kf − gk
C
R
(K)
< ε.
Since
¯
A
0
=
C
R
(
K
), given such
g
and
ε
, there is some
f ∈ A
and
λ
0
∈ R
such
that
kg −(f + λ1)k
C
R
(K)
< ε.
But
g
(
x
0
) =
f
(
x
0
) = 0, which implies that
|λ| < ε
. Therefore
kg −f k
C
R
(K)
<
2
ε
.
So done.
What happens for C
C
(K)?
Example.
Let
K
=
B(0, 1) ⊆ C
, and let
A
be the set of polynomials on
B(0, 1)
.
We will show that
¯
A 6= C
C
(B(0, 1)).
Consider
f
(
z
) =
¯z
. This is not in the closure of
A
, since this is not holomor-
phic, but the uniform limit of any sequence of holomorphic is holomorphic (by
Morera’s theorem, i.e.
f
is holomorphic iff
H
γ
f
(
z
) d
z
= 0 for all closed piecewise
smooth curve γ).
Hence we need an additional condition on this. It turns out that this rather
simple example is the only way in which things can break. We have the following:
Theorem
(Complex version of Stone-Weierstrass theorem)
.
Let
K
be compact
and
A ⊆ C
C
(
K
) be a subalgebra over
C
which separates points and is closed
under complex conjugation (i.e. if
f ∈ A
, then
¯
f
=
A
). Then either
¯
A
=
C
C
(
K
)
or these is an x
0
such that
¯
A = {f ∈ C
C
(K) : f(x
0
) = 0}.
Proof.
It suffices to show that either
¯
A ⊇ C
R
(
K
) or there exists a point
x
0
such that
¯
A ⊇ {f ∈ C
R
(
K
) :
f
(
x
0
) = 0
}
, since we can always break a complex
function up into its real and imaginary parts.
Now consider
A
0
=
f +
¯
f
2
: f ∈ A
∪
f −
¯
f
2i
: f ∈ A
.
Now note that by closure of
A
, we know that
A
0
is a subset of
A
and is
a subalgebra of
C
R
(
K
) over
R
, which separates points. Hence by the real
version of Stone-Weierstrass, either
¯
A
0
=
C
R
(
K
) or there is some
x
0
such that
¯
A
0
= {f ∈ C
R
(K) : f(x
0
) = 0}. So done.