I have some trouble proving the following statement:
Let $A$ be a self-adjoint element of a $C^*$-algebra $\mathcal{B}$ and let $\mathcal{A}$ denote the unital subalgebra of $\mathcal{B}$ that is generated by 1 and $A$.
If $A$ is invertible in $\mathcal{B}$, then it is invertible in $\mathcal{A}$.
I got a hint to consider the subalgebra $\mathcal{A}_0$ of $\mathcal{B}$ generated by adding $A^{-1}$ to $\mathcal{A}$ and then use functional calculus with the map $z \mapsto \frac{1}{z}$ but I do not see quite how to do this.
Thanks for any help!