Let $V$ be a finite-dimensional complex inner product space. Prove that given any self-adjoint linear transformation $f:V\rightarrow V$ there exists a self-adjoint linear transformation $g:V\rightarrow V$ such that $f=g^5$.
I'm not sure how to even begin so I would appreciate some guidance if it's not too much to ask. Thank you in advance!
Hint: We need to use the spectral theorem. In particular, we know that there exists a diagonal transformation and unitary $u$ such that $d_f:V \to V$ such that $f = u \; d_f \; u^*$.
Start by finding a diagonal $d_g$ such that $d_g^5 = d_f$. Then, it suffices to note that $$ [u \;d_g\;u^* ]^5 = u \; d_g^5 \; u^* = f $$