$A$ is a symmetric real matrix. Show that there is $B$ such that $B^3=A$

Note that $\forall \mathbf{M}\in\mathbb{R}^{n\times n}$ such that $\mathbf{M}$ is symmetric, we have $\mathbf{M}=\mathbf{P}\mathbf{\Lambda}\mathbf{P}^{-1}=\mathbf{P}\mathbf{\Lambda}\mathbf{P}^{T}$, for some orthogonal matrix $\mathbf{P}$.

Therefore we have $\mathbf{B}^{3}=\left(\mathbf{P}\mathbf{\Lambda}_{\mathbf{B}}\mathbf{P}^{T}\right)^{3}=\mathbf{P}\mathbf{\Lambda}_{\mathbf{B}}^{3}\mathbf{P}^{T}$, and $\mathbf{A}=\mathbf{P}\mathbf{\Lambda}_{\mathbf{A}}\mathbf{P}^{T}$, therefore we have $\mathbf{\Lambda}_{B}^{3}=\mathbf{\Lambda}_{\mathbf{A}}$, where $\mathbf{\Lambda}_{\mathbf{A}}=\operatorname{diag}(\lambda_{1},\dots,\lambda_{n})$ and $\lambda_{i}$ are the eigenvalues of $\mathbf{A}$.

Therefore we have:

$$\mathbf{B}=\mathbf{P}\operatorname{diag}(\sqrt[3]{\lambda_{1}},\dots,\sqrt[3]{\lambda_{n}})\mathbf{P}^{T}$$


Note that, every symmetric $A\in\mathbb R^{n\times n}$ matrix is diagonalisable, it has real eigenvalues $d_1,\ldots,d_n$, and its diagonalization is realised with an orthogonal matrix $U$, i.e., $$ A=U^TDU, $$ where $D=\mathrm{diag}(d_1,\ldots,d_n)$, and $U^TU=I$. Now let $$ B=U^T\mathrm{diag}(d_1^{1/3},\ldots,d_n^{1/3})U. $$ Clearly $B^3=A$ and $$ B^T=\big(U^T\mathrm{diag}(d_1^{1/3},\ldots,d_n^{1/3})U\big)^T=U^T\mathrm{diag}(d_1^{1/3},\ldots,d_n^{1/3})U=B. $$ Hence $B$ is symmetric.