C*-algebra norm of sum becomes max of norms Let $A$ be a C*-algebra with unit $1_A$. Given $\varepsilon >0$ and a C*-subalgebra $B$ of $A$ with unit $1_B$ such that 
$\mathrm{dist}(1_A, B) = \inf_{x\in B} ||1_A +x|| < \varepsilon$
show that $1_A = 1_B$. A proof that I am following goes like this: If $1_A \neq  1_B$, then $\forall x \in B$, 
$||1_A -x || = ||(1_A -1_B) + 1_B (1_B -x )1_B||$
which 
$ \phantom{} = \max (||1_A -1_B||, ||1_B (1_B -x )1_B||) \geq ||1_A -1_B|| = 1$
The last norm equals one because $1_A-1_B$ is a projection, and this would contradict the distance being less than $\varepsilon$ and be done, but why is there equality with this max? 
If the conditions are not sufficient, it may be added that $B$ is isomorphic to the matrix algebra $M_{r \times r}(\mathbb{C})$ for some $r>0$. 
 A: In any C$^*$-algebra $A$, if $p,q$ are projections with $p+q=1_A$ (in particular, $pq=0$), then 
$$\tag1
\|pxp+qyq\|=\max\{\|pxp\|,\|qyq\|\}. 
$$
Indeed, consider first the case where $x\geq0$, $y\geq0$. Then $pxp+qyq\geq0$. More importantly, 
$$\tag2
\sigma(pxp+qyq)=\sigma(pxp)\cup\sigma(qyq),
$$
where we consider the spectrum of $pxp$ in $pAp$ and of $qyq$ in $qAq$. In particular, $$\tag3 \|pxp+qyq\|=\max\{\|pxp\|,\|qyq\},\ \ \ x,y\geq0. $$
For the general case, 
\begin{align}
\|pxp+qyq\|^2&=\|(pxp+qyq)^*(pxp+qyq)\|=\|px^*pxp+qy^*qyq\|\\ \ \\
&=\max\{\|px^*pxp\|,\|qy^*qyq\|\}
=\max\{\|pxp\|^2,\|qyq\|^2\}.
\end{align}
To see $(2)$, note that  $pxp+qyq$ is invertible if and only if $pxp$, $qyq$ are invertible (in $pAp$, $qAq$ respectively). Indeed, if $(pap)(pxp)=p$, $(qbq)(qyq)=q$, then $$ (pap+qbq)(pxp+qyq)=(pap)(pxp)+(qbq)(qyq)=p+q=1_A.$$ And if $c(pap+qyq)=1_A$, then 
$$
(pcp)(pxp)=p(c(pxp+qyq))=p1_A=p,
$$
and similarly $(qcq)(qyq)=q$. So $pxp$, $qyq$ are invertible. This implies $(2)$. 

As a final comment, the above extends easily (by repeating the argument, or by induction) to pairwise orthogonal projections $p_1,\ldots,p_n$. 
