Let $K, K'$ be compact Hausdorff spaces with $K\subseteq K'$. We obtain the $C^*$-algebras $C(K)$ and $C(K')$. I am wondering if we can think of $C(K)$ as a $C^*$-subalgebra of $C(K')$ in the sense that there is a $*$-embedding $C(K)\hookrightarrow C(K')$. Maybe it is obvious but I don't see how to extend a function $f\in C(K)$ suitably.
I appreciate any help.
Assuming the only embeddings we care about are extension operators then no, there need not be a multiplicative (linear) embedding. Note this:
If $K$ is the unit circle in the plane and $K'$ is the unit disk the no-retraction theorem says this is impossible.
Edit: A simpler and stronger counterexample, although less interesting: Say $K'$ is connected but $K$ is not. Then there is no embedding of $C(K)$ in $C(K')$, via an extension operator or otherwise, because $C(K')$ contains no non-trivial idempotent.