# Extension of continuous function

The question is: Let $(K,\rho)$ be compact metric space. $F\subset K$ closed. $f:F\rightarrow \mathbb{R}$ continuous. Is there a continuous extension of $f$ on $K$?

Attempt: Suppose there exists neighbourhood $G$ of $F$; $G=\{x\in K : \rho(x,F)\leq \epsilon\}$. That for every $x\in G$ there exists exactly one $y\in F$ that $\rho (x,F) = \rho (x,y)$.

Than define $f(x) = f(y)\frac{\epsilon - \rho(x,y)}{\epsilon}$ for $x\in G$. Where $y\in F$ and $\rho(x,F) = \rho(x,y)$.

$f(x)=0$ for $x\in K \setminus G$

Function defined like this should be continuous. Problem is that not for every $F$ exists neighbourhood $G$ with desired properties. Is there a way to fix this?

Like define functions $f_\epsilon$ for $\epsilon > 0$. And than somehow mix those functions.

-

## 1 Answer

Yes, this follows from the Tietze Extension Theorem http://en.wikipedia.org/wiki/Tietze_extension_theorem.

-
Thank you, I knew that there is a standard theorem that states that but I couldn't remember its name. But as well I asked if it is possible to finish off my proof attempt. Do you have any idea? – tom Feb 1 '13 at 0:01
Yea I don't think you can remedy this problem. For example, what if F is a Cantor set inside a closed disc? – mck Feb 1 '13 at 15:28
Yeh that sounds nasty. – tom Feb 1 '13 at 17:51