I'm studying for a test (and prelims) and have been working through Folland. I've been a bit stuck on the following problem. $\overline{A}$ denotes the closure of $A$, $A^o$ the interior, and $g\in C(A)$ means $g$ is continuous on $A$.
If $X$ is a topological space, $A\subset X$ is closed, and $g\in C(A)$ satisfies $g=0$ on $\overline{A}\setminus A^o$, then the extension of $g$ to $X$ defined by $g(x)=0$ for $x\in A^c$ is continuous.
I know that if $A$ is closed then $A^c$ is open, and that $\overline{A}=A$. Also, $(\overline{A}\setminus A^o)^c=A^o\cup A^c$. To show that $g$ is continuous on $A^c$, I need to show for any neighborhood $V$ of $g(x)$ that $g^{-1}(V)$ is a neighborhood of $x$.
I know I should start with an arbitrary $x\in A^c$ and an arbitrary neighborhood $V$ of $g(x)$, however I am not sure how to proceed. Any ideas?
Now let us prove your problem. By the theorem above, it suffices to show that $g$ is continuous at $x$ for all $x\in A^c$. Let $x\in A^c$ and let $V$ be an open set containing $g(x)=0$. Since $A$ is closed, $A^c$ is open (as you mentioned), and $A^c\subset g^{-1}(0)$ (as your definition of extension of $g$ on $A^c$) so that $g(A^c)\subset g(g^{-1}(0))\subset V$ since $V$ contains $g(x)=0$.