2.6. TIETZE EXTENSION THEOREM 61

Lemma 2.6.4 Suppose M is a closed set in X and suppose f : M→ [−1,1] is continuousat every point of M. Then there exists a function g which is defined and continuous on allof X such that g = f on M and g has its values in [−1,1] .

Proof: Using Lemma 2.6.3, let g1 be such that g1 (X)⊆ [−1/3,1/3] and

∥ f −g1∥M ≤23.

Suppose g1, · · · ,gm have been chosen such that g j (X)⊆ [−1/3,1/3] and∥∥∥∥∥ f −m

∑i=1

(23

)i−1

gi

∥∥∥∥∥M

<

(23

)m

. (2.2)

This has been done for m = 1. Then∥∥∥( 3

2

)m(

f −∑mi=1( 2

3

)i−1gi

)∥∥∥M≤ 1 and so(

32

)m(

f −m

∑i=1

(23

)i−1

gi

)can play the role of f in the first step of the proof. Therefore, there exists gm+1 defined andcontinuous on all of X such that its values are in [−1/3,1/3] and∥∥∥∥∥

(32

)m(

f −m

∑i=1

(23

)i−1

gi

)−gm+1

∥∥∥∥∥M

≤ 23.

Hence∥∥∥( f −∑

mi=1( 2

3

)i−1gi

)−( 2

3

)mgm+1

∥∥∥M≤( 2

3

)m+1. It follows that there exists a se-

quence, {gi} such that each has its values in [−1/3,1/3] and for every m 2.2 holds. Thenlet

g(x)≡∞

∑i=1

(23

)i−1

gi (x) .

It follows |g(x)| ≤∣∣∣∑∞

i=1( 2

3

)i−1gi (x)

∣∣∣≤ ∑mi=1( 2

3

)i−1 13 ≤ 1 and

∣∣∣( 23

)i−1gi (x)

∣∣∣≤ ( 23

)i−1 13

so the Weierstrass M test applies and shows convergence is uniform. Therefore g must becontinuous by Theorem 2.5.34. The estimate 2.2 implies f = g on M. ■

The following is the Tietze extension theorem.

Theorem 2.6.5 Let M be a closed nonempty subset of X a metric space and letf : M→ [a,b] be continuous at every point of M. Then there exists a function, g continuouson all of X which coincides with f on M such that g(X)⊆ [a,b] .

Proof: Let f1 (x) = 1+ 2b−a ( f (x)−b) . Then f1 satisfies the conditions of Lemma

2.6.4 and so there exists g1 : X → [−1,1] such that g1 is continuous on X and equals f1 onM. Let g(x) = (g1 (x)−1)

( b−a2

)+b. This works.

For x ∈M,

g(x) =((

1+2

b−a( f (x)−b)

)−1)(

b−a2

)+b

=

((2

b−a( f (x)−b)

))(b−a

2

)+b = ( f (x)−b)+b = f (x)

Also 1+ 2b−a ( f (x)−b) ∈ [−1,1] so 2

b−a ( f (x)−b) ∈ [−2,0] and

( f (x)−b) ∈ [−b+a,0] , f (x) ∈ [a,b] ■

2.6. TIETZE EXTENSION THEOREM 61Lemma 2.6.4 Suppose M is a closed set in X and suppose f :M — [—1,1] is continuousat every point of M. Then there exists a function g which is defined and continuous on allof X such that g = f on M and g has its values in [—1,1].Proof: Using Lemma 2.6.3, let g; be such that gj (X) C [—1/3, 1/3] and2If—ailly <5.Suppose g1,--- ,%m have been chosen such that gj (X) C [—1/3,1/3] andf-Vls) sill <4) - (2.2)= \3 3i= MThis has been done for m= 1. Then a)" (f-2) (3)' ‘8i)Cy (EQ) «)can play the role of f in the first step of the proof. Therefore, there exists 9,4, defined andcontinuous on all of X such that its values are in [—1/3, 1/3] and5)" (E(B) a) on| (f-) (3) si) — (3) Smt |, < @y"" . It follows that there exists a se-quence, {g;} such that each has its values in [—1/3, 1/3] and for every m 2.2 holds. Thenlet . 4e@)=E (5) at.i=l| <1 and soMMHenceIt follows |g (x)| <|D21 3)" ' gi (w)| < EP (3) F< Land |(3)"' gi] < 3)"so the Weierstrass M test applies and shows convergence is uniform. Therefore g must becontinuous by Theorem 2.5.34. The estimate 2.2 implies f = g on MV.The following is the Tietze extension theorem.Theorem 2.6.5 Let M be a closed nonempty subset of X a metric space and letf:M—= |a,b] be continuous at every point of M. Then there exists a function, g continuouson all of X which coincides with f on M such that g(X) C {a,b}.Proof: Let fi (x) =1+ = (f (x) —b). Then f; satisfies the conditions of Lemma2.6.4 and so there exists g; : X — [—1,1] such that g; is continuous on X and equals f; onM. Let g(x) = (gi (x) — 1) (5%) +b. This works.For x € M,w(x) = ((14 5= 5 7t)-0) -1) (75%) +0=((,2 49-9) (72) += (re) 0) 40=7000 52a (f (x) —b) € [-2,0] and(f(x) —b) € [-b+a,0], f(x) € [a>]