When is the subspace of functions vanishing on a closed set complemented? Suppose $A$ is a closed subset of a smooth manifold $M$. Denote by $C(M)$ continuous functions with uniform norm. When is the subspace of functions vanishing on $A$ complemented in $C(M)$?
This is true if $A$ is a finite set of points (since then it's finite codimensional and closed) and if $A$ is a retraction of $M$.
An easier question I don't know how to answer is whether continuous functions on the disk that vanish on the boundary are complemented in all continuous functions on the disk.
Thanks in advance!
 A: In the special case of the disk (where the closed set is its boundary), it seems like you have a complement consisting of functions that are harmonic on the interior of the disk and extend continuously to the boundary.
Indeed let $H(D)$ be the space of all such harmonic functions. Then $H(D)$ is a linear subspace because the sum of two functions which are harmonic on the interior is still harmonic on the interior; same story for scalar multiples. Also $H(D)$ is closed because any uniform limit of harmonic functions is harmonic.
Let $S$ denote the subspace of functions vanishing on the boundary. Then $H(D)\cap S = \{0\}$ because any harmonic function vanishing on the boundary is zero, by the maximum principle for instance.
Furthermore, any continuous function on the disk can be expressed as $f = \phi+(f-\phi)$, where $\phi$ solves the Laplace equation with boundary data $f|_{\partial D}$. Then clearly $\phi \in H(D)$ and $f-\phi \in S$.
Edit: I added another answer generalizing this construction to all closed sets $A$.
A: After doing some research, I found out that the answer is always yes: the subspace $S$ of functions vanishing on $A$ is always complemented in $C(M)$, whenever $M$ is any compact metric space and $A$ is any closed subset.
To prove this, it is enough to show that there exists a family $\{\mu_x\}_{x\in M}$ of finite signed measures on $A$ with the following two properties:
(i) $x \mapsto \mu_x$ is weakly continuous.
(ii) $\mu_x=\delta_x$ for every $x \in A$, where $\delta_x$ is a point mass at $x$.
Indeed, if such a family of measures exists, then we can define a map $T:C(A) \to C(M)$ by defining $Tf(x):=\int_A f(y)\mu_x(dy)$. Then the image of $T$ is easily checked to be a complement for $S$. Indeed, the image is closed because $\|Tf\|_{C(M)} \geq \|f\|_{C(A)}$ trivially. It trivially intersects $S$ because any $g=Tf \in S \cap T(C(A))$ satisfies $$f(x)=\int_A f(y) \delta_x(dy)=Tf(x)=g(x)=0 \;\;\;\;for \;\;\;\;x \in A.$$ And finally, $S+T(C(A))=C(M)$ because we can write any function $f\in C(M)$ as $(f-\phi)+\phi$ where $\phi = T(f|_A)$. Then clearly $f-\phi\in S$ and $\phi \in T(C(A))$.

So let's prove that such a family of measures always exists for any closed subset $A$ of a compact metric space $M$. We are going to use a generalization of the Tietze extension theorem which holds whenever the target space is a locally convex topological vector space.
Let $E$ be the space of all finite signed measures on $A$, i.e., $E=C(A)^*$. Equip $E$ with the weak topology, i.e., the topology generated by the family of seminorms $N_f(\mu) = |\mu(f)|$, with $f\in C(A)$.
Define a map $u:A \to E$ by sending $x \mapsto \delta_x$. Obviously this is continuous. Therefore by the Tietze extension theorem, $u$ can be extended continuously to a map $v: M \to E$. Then set $\mu_x:=v(x)$.
