Extension of elements of Spectrum Let $A$ be a commutative $C^*$ algebra with unity, i.e a Banach algebra with an involution operation $^*$ satisfying the identity $\|x^{*}x\|=\|x\|^2$ for all $x\in A$ and $B$ be a $C^*$-subalgebra of $A$ having the same unity as that of $A$. If $f: B\to\mathbb{C}$   be a non-zero complex algebra homomorphism of $B$, then can $f$ be extended to a complex algebra homomorphism of $A$?
I am stuck with this question for a long time now. I think that the result is true, but I am unable to prove it rigorously. Thanks for any help.
 A: This cannot be done in general.  Take $A=B(H)$, for a separable infinite-dimensional Hilbert space $H$.  Fix $x\in B(H)$ nonzero and self-adjoint, and consider the $C^*$-subalgebra $B$ generated by $x$ and $1$.  This will be unital and commutative, so it has plenty of complex homomorphisms by the Gelfand-Naimark theorem.  But the only complex homomorphism on $B(H)$ is the zero functional, since it's only norm-closed ideal is the ideal of compact operators, which is not of codimension one.  
Another slightly easier counterexample is $A=M_n(\mathbb C)$ (for $n>1$), and $B$ is the algebra of diagonal matrices in $A$.  Then $B$ has $n$ complex homomorphisms, namely evaluation on one of the $n$ diagonal entries.  But as $A$ is a simple $C^*$-algebra, it has no nontrivial algebra homomorphisms.
EDIT
Assuming $A$ is commutative, the answer is yes.  Let $\Omega(A)$ denote the space of all nonzero complex homomorphisms of $A$ endowed with the weak$^*$-topology (and define $\Omega(B)$ similarly).  The inclusion $j:B\to A$ induces a continuous map $j^*:\Omega(A)\to\Omega(B)$ via $j^*(\phi)=\phi\circ j$.  Note that it suffices to show that $j^*$ is surjective.
Since $\Omega(A)$ and $\Omega(B)$ are compact Hausdorff, $j^*(\Omega(A))$ is a closed subset of $\Omega(B)$.  Assume towards a contradiction that $j^*(\Omega(A))\neq\Omega(B)$.  Then by Urysohn's lemma, there is some nonzero $f\in C(\Omega(B))$ that vanishes on $j^*(\omega(A))$.  By the Gelfand-Naimark theorem, $f=\Psi(b)$ for some $b\in B$, where $\Psi:B\to C(\Omega(B))$ is the Gelfand representation.  But then $\phi(b)=\phi\circ j(b)=f(j^*(\phi))=0$ for all $\phi\in\Omega(A)$.  This implies $b=0$, but then $f=0$, a contradiction.
