In the proof of the theorem $4.1.12$ on the page $120$ in Murphy, he uses a central remark that:
If $p$ is a projection in $B(H)$ , then $p$ belong to $A'$ if and only if the closed vector subspace $p(H)$ of $H$ is invariant for $A$.
Here $A$ is a $C^*$-algebra acting on $H$.
Would you help me to prove the converse: if the closed vector subspace $p(H)$ of $H$ is invariant for $A$ then $p$ belong to $A'$.
Thanks in advance
Let $W = p(H)$, then for any $T \in A, T(W) \subset W$. Hence, $$ pTp = Tp $$ Since $A$ is a $\ast$-algebra, $W$ is invariant under $T^{\ast}$ and hence $W^{\perp}$ is invariant under $T$. Thus, $$ (1-p)T(1-p) = Tp \Rightarrow pTp = pT $$ Hence, $pT = Tp$.