E. The Weierstrass theorem and the Stone-Weierstrass theorem
The following result of Weierstrass is a very useful tool in analysis.
Theorem E.1. Given a compact interval I, any continuous function f on I is a uniform
limit of polynomials.
Otherwise stated, our goal is to prove that the space C(I) of continuous (real valued)
functions on I is equal to P(I), the uniform closure in C(I) of the space of polynomials.
Our starting point will be the result that the power series for (1 − x)a converges uniformly
on [−1, 1], for any a > 0. This was established in §D, and we will use it, with a = 1/2.
From the identity x1/2 = (1 − (1 − x))1/2 , we have x1/2 ∈ P([0, 2]). More to the point,
from the identity
¡
¢1/2
|x| = 1 − (1 − x2 )
,
(E.1)
√ √
we have |x| ∈ P([− 2, 2]). Using |x| = b−1 |bx|, for any b > 0, we see that |x| ∈ P(I) for
any interval I = [−c, c], and also for any closed subinterval, hence for any compact interval
I. By translation, we have
(E.2)
|x − a| ∈ P(I)
for any compact interval I. Using the identities
(E.3)
max(x, y) =
1
1
(x + y) + |x − y|,
2
2
min(x, y) =
1
1
(x + y) − |x − y|,
2
2
we see that for any a ∈ R and any compact I,
(E.4)
max(x, a), min(x, a) ∈ P(I).
We next note that P(I) is an algebra of functions, i.e.,
(E.5)
f, g ∈ P(I), c ∈ R =⇒ f + g, f g, cf ∈ P(I).
Using this, one sees that, given f ∈ P(I), with range in a compact interval J, one has
h ◦ f ∈ P(I) for all h ∈ P(J). Hence f ∈ P(I) ⇒ |f | ∈ P(I), and, via (E.3), we deduce
that
(E.6)
f, g ∈ P(I) =⇒ max(f, g), min(f, g) ∈ P(I).
Suppose now that I 0 = [a0 , b0 ] is a subinterval of I = [a, b]. With the notation x+ =
max(x, 0), we have
(E.7)
¡
¢
fII 0 (x) = min (x − a0 )+ , (b0 − x)+ ∈ P(I).
1
2
This is a piecewise linear function, equal to zero off I \ I 0 , with slope 1 from a0 to the
midpoint m0 of I 0 , and slope −1 from m0 to b0 .
Now if I is divided into N equal subintervals, any continuous function on I that is linear
on each such subinterval can be written as a linear combination of such “tent functions,”
so it belongs to P(I). Finally, any f ∈ C(I) can be uniformly approximated by such
piecewise linear functions, so we have f ∈ P(I), proving the theorem.
A far reaching extension of Theorem E.1, due to M. Stone, is the following result, known
as the Stone-Weierstrass theorem.
Theorem E.2. Let X be a compact metric space, A a subalgebra of CR (X), the algebra
of real valued continuous functions on X. Suppose 1 ∈ A and that A separates points of
X, i.e., for distinct p, q ∈ X, there exists hpq ∈ A with hpq (p) 6= hpq (q). Then the closure
A is equal to CR (X).
We present the proof in eight steps.
Step 1. By Theorem E.1, if f ∈ A and ϕ : R → R is continuous, then ϕ ◦ f ∈ A.
Step 2. Consequently, if fj ∈ A, then
(E.8)
max(f1 , f2 ) =
1
1
|f1 − f2 | + (f1 + f2 ) ∈ A,
2
2
and similarly min(f1 , f2 ) ∈ A.
Step 3. It follows from the hypotheses that if p, q ∈ X and p 6= q, then there exists
fpq ∈ A, equal to 1 at p and to 0 at q.
Step 4. Apply an appropriate continuous ϕ : R → R to get gpq = ϕ ◦ fpq ∈ A, equal to 1
on a neighborhood of p and to 0 on a neighborhood of q, and satisfying 0 ≤ gpq ≤ 1 on X.
Step 5. Fix p ∈ X and let U be an open neighborhood of p. By Step 4, given q ∈ X \ U ,
there exists gpq ∈ A such that gpq = 1 on a neighborhood Oq of p, equal to 0 on a
neighborhood Ωq of q, satisfying 0 ≤ gpq ≤ 1 on X.
Now {Ωq } is an open cover of X \ U , so there exists a finite subcover Ωq1 , . . . , ΩqN . Let
(E.9)
gpU = min gpqj ∈ A.
1≤j≤N
Then gpU = 1 on O = ∩N
1 Oqj , an open neighborhood of p, gpU = 0 on X \ U , and
0 ≤ gpU ≤ 1 on X.
Step 6. Take K ⊂ U ⊂ X, K closed, U open. By Step 5, for each p ∈ K, there exists
gpU ∈ A, equal to 1 on a neighborhood Op of p, and equal to 0 on X \ U .
Now {Op } covers K, so there exists a finite subcover Op1 , . . . , Opm . Let
(E.10)
gKU = max gpj U ∈ A.
1≤j≤M
3
We have
(E.11)
gKU = 1 on K,
0 on X \ U,
and 0 ≤ gKU ≤ 1 on X.
Step 7. Take f ∈ CR (X) such that 0 ≤ f ≤ 1 on X. Fix k ∈ N and set
n
`o
(E.12)
K` = x ∈ X : f (x) ≥
,
k
so X = K0 ⊃ · · · ⊃ K` ⊃ K`+1 ⊃ · · · Kk ⊃ Kk+1 = ∅. Define open U` ⊃ K` by
n
n
` − 1o
` − 1o
(E.13)
U` = x ∈ X : f (x) >
, so X \ U` = x ∈ X : f (x) ≤
.
k
k
By Step 6, there exist ψ` ∈ A such that
(E.14)
ψ` = 1 on K` ,
ψ` = 0 on X \ U` ,
and 0 ≤ ψ` ≤ 1 on X.
Let
(E.15)
fk = max
0≤`≤k
`
ψ` ∈ A.
k
It follows that fk ≥ `/k on K` and fk ≤ (` − 1)/k on X \ U` , for all `. Hence fk ≥ (` − 1)/k
on K`−1 and fk ≤ `/k on U`+1 . In other words,
(E.16)
`−1
`
`−1
`
≤ f (x) ≤ =⇒
≤ fk (x) ≤ ,
k
k
k
k
so
(E.17)
|f (x) − fk (x)| ≤
1
,
k
∀ x ∈ X.
Step 8. It follows from Step 7 that if f ∈ CR (X) and 0 ≤ f ≤ 1 on X, then f ∈ A. It is
an easy final step to see that f ∈ CR (X) ⇒ f ∈ A.
Theorem E.2 has a complex analogue. In that case, we add the assumption that f ∈
A ⇒ f ∈ A, and conclude that A = C(X). This is easily reduced to the real case.
Here are a couple of applications of Theorem E.2, in its real and complex forms:
Corollary E.3. If X is a compact subset of Rn , then every f ∈ C(X) is a uniform limit
of polynomials on Rn .
Corollary E.4. The space of trigonometric polynomials, given by
(E.18)
N
X
k=−N
is dense in C(S 1 ).
ak eikθ ,
© Copyright 2026 Paperzz