We say that a matrix $A$ in $\mathbb{R}^{n\times n}$ is symmetric if $A^T=A$, and that $U\in \mathbb{R}^{n\times n}$ is orthogonal if $U^TU=UU^T=I$. Show the following.
(a) Let $V$ be a finite dimensional vector space over $\mathbb{R}$ and let $g$ be an inner product on $V$. Let $E$ and $B$ be two orthonormal bases on $V$. Show that the change of basis matrix $[I]^E_B$ is orthogonal.
(b) Let $A\in\mathbb{R}^{n\times n}$ be symmetric. Show that there is an orthogonal matrix $U\in\mathbb{R}^{n\times n}$ such taht $U^TAU$ is diagonal.
I've done part (a), but I cannot do part (b).
I had a plan to somehow use the spectral theorem, but I cannot do it.
Any help!