Invertibility in subalgebra 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!
 A: (I am assuming that $\mathcal A$ is the closed unital subalgebra of $\mathcal B$ generated by $A$.)
Here I will not be worried about what background is expected in the problem or potential circular reasoning (as in, the tools used may depend somewhere on the fact to be proved).
The fundamental fact at the heart of continuous functional calculus says that there is a $*$-isomorphism $\Gamma:\mathcal A\to C(\sigma(A))$, such that $\Gamma(1)$ is the constant function $x\mapsto 1$, and $\Gamma(A)$ is the function $x\mapsto x$.  (The operations on $C(\sigma(A))$ are pointwise addition, multiplication, and complex conjugation.)  If $A$ is invertible, and $f:\sigma(A)\to\mathbb C$ is defined by $f(x)=1/x$, then $f\in C(\sigma(A))$, and $f=\Gamma(A)^{-1}$.  Therefore $\Gamma^{-1}(f)=A^{-1}$ is in $\mathcal A$.
An alternative approach is to use spectral permanence for Banach algebras.  Let $\sigma_{\mathcal A}(A)$ and $\sigma_{\mathcal B}(A)$ denote the spectra of $A$ relative to $\mathcal{A}$ and $\mathcal B$, respectively.  It is clear that $\sigma_{\mathcal B}(A)\subseteq \sigma_{\mathcal A}(A)$, because invertibility in $\mathcal A$ implies invertibility in $\mathcal B$.  The spectral permanence theorem implies that the boundary $\partial\sigma_{\mathcal A}(A)$ in the complex plane is a subset of $\sigma_{\mathcal B}(A)$. Since $A$ is a self-adjoint element of the C*-algebra $\mathcal A$, $\sigma_{\mathcal A}(A)$ is a closed subset of the real line, and therefore $\partial\sigma_{\mathcal A}(A)=\sigma_{\mathcal A}(A)$.  Therefore, $\sigma_{\mathcal A}(A)=\sigma_{\mathcal B}(A)$.  In particular, $0$ is in $\sigma_{\mathcal A}(A)$ if and only if $0$ is in $\sigma_{\mathcal B}(A)$.
In the case where $A$ is a self-adjoint finite matrix, the spectral theorem yields $A=\sum_k \lambda_k P_k$, where $\lambda_1,\lambda_2,\ldots$ are the distinct eigenvalues of $A$, and $P_k$ is the orthogonal projection onto the eigenspace for the eigenvalue $\lambda_k$.  The $P_k$s are self-adjoint idempotents satisfying $P_kP_j=0$ for $j\neq k$.  If $A$ is invertible, then $\lambda_k\neq 0$ for each $k$, and there is an interpolating polynomial $f$ such that $f(\lambda_k)=1/\lambda_k$ for each $k$.  You can check that $f(A)=A^{-1}$, and since $f$ is a polynomial, $f(A)$ is in $\mathcal A$.
