Let $A$ be a $C^*$-algebra and $mathcal{E}colon A to A$ a conditional expectation. The Kadison-Schwarz inequality for completely positive maps, $$mathcal{E}(x)^* mathcal{E}(x) leq mathcal{E}(x^* x),$$implies that$$leftVertmathcal{E}(x)rightVert^2 leq leftVertmathcal{E}(x^* x)rightVert.$$In this note we show that $mathcal{E}$ is homomorphic (in the sense that $mathcal{E}(xy) = mathcal{E}(x)mathcal{E}(y)$ for every $x, y$ in $A$) if and only if$$leftVertmathcal{E}(x)rightVert^2 = leftVertmathcal{E}(x^*x)rightVert,$$for every $x$ in $A$. We also prove that a homomorphic conditional expectation on a commutative $C^*$-algebra $C_0(X)$ is given by composition with a continuous retraction of $X$. One may therefore consider homomorphic conditional expectations as noncommutative retractions.