# How do I show that the set of continuous real functions is an open set?

I was given this set in my lecture notes $$E= C([0,1],\mathbb{R}) = \{f:[0,1]\longrightarrow \mathbb{R}; \ f \ is \ continuous \}$$ And told to prove/justify that this is an open set. My real analysis/proof writing skills are rusty, but here is my attempt at starting:

We say that E is an open set if for any function $$f \in E$$, there exists another positive function, $$g>0$$ such that $$(f-g,f+g) \subset E$$. I believe this is true because of the properties of functions: We have $$(1) \ \ \ (f+g)(x)=f(x)+g(x), \ \forall \ x\in[0,1]$$ $$(2) \ \ \ \forall \ g \in E, \ \exists \ \ -g \ \ such \ \ that \ \ g(x)+(-g(x))=0$$ With these facts, we have $$(f+(-g))(x):=(f-g)(x) \in E$$ and $$(f+g)(x) \in E$$. So we have this interval $$[f-g,f+g] \subset E$$.

I see that that [f-g,f+g] is closed, but I need the set to be open. I also understand that my approach may be terribly far from correct. If that is so, I apologize. I would like a push in the right direction (assuming there is some correctness to what I wrote). If everything is absolutely wrong, then please let me know. Helpful tips will be appreciated. Thank you in advance.

• Open set in which metric space? – zhw. Sep 17 at 1:04

Let $$g_n(x) = 0$$ if $$0\leq x <1/2$$ and $$=1/n$$ if $$1/2
None of $$g_n$$ is continuous, so the sequence is in the complement of your set.
In most metrics, the sequence $$\{g_n(x)\}$$ converges to a continuous function. Since the complement is not closed, your set isn't open.