Proof of existence of square root of unitary and symmetric matrix I'm struggling with this exercise
Let $U$ be a unitary and symmetric matrix ($U^T = U$ and $U^*U = I$).
Prove that there exists a complex matrix $S$ such that:


*

*$S^2 = U$

*$S$ is a unitary matrix

*$S$ is symmetric

*Each matrix that commutes with $U$, commutes with $S$

 A: Let $\lambda_j, j=1 \ldots k$ be the distinct eigenvalues of $U$ (which must be numbers of absolute value $1$).   For each $\lambda_j$ let $\mu_j$ be a square root of $\lambda_j$.  These also have absolute value $1$.  There is a polynomial $p(z)$ such that $p(\lambda_j) = \mu_j$ for each $j$.  Let $S = p(U)$.  
1) $S^2 = p(U)^2 = U$: in fact $p(z)^2 - z$ is divisible by $\prod_j (z - \lambda_j)$, which is the minimal polynomial of $U$. 
2) Since $U$ is normal, the algebra generated by $U$ and $U^*$ is commutative, and in particular $S$ is normal.  Since $S$ is normal and its eigenvalues, which are the $\mu_j$, have absolute value $1$, $S$ is unitary.
3) Any nonnegative integer power of a symmetric matrix is symmetric; $S$ is symmetric because it is a linear combination of the symmetric matrices $U^j$.
4) Every matrix that commutes with $U$ commutes with each $U^j$ and therefore with $S$.  
A: First, solve for the case of diagonal matrices, which shouldn't be too hard. Then, prove $U$ is diagonalisable, and see if you can use that result to reduce to the previous case.
A: Another simple proof based on functional calculus: every unitary is of the form $U=\sum_{j=1}^kc_kE_j$ where $E_j$ are orthogonal projections fulfilling $\sum_jE_j=I$ and $E_jE_{j'}=\delta_{jj'}E_j$, while $c_j\in\mathbb C$, $|c_j|=1$. Its adjoint is
$U^*=\sum_j\bar c_jE_j$; it fulfils  $U=U^*$ if and only if $c_j=\bar c_j$, namely $c_j=\pm 1$. Define $s_j=\sqrt{c_j}\in\{1,i\}$ and $S=\sum_js_jE_j$. Since each $|s_j|=1$, $S$ is unitary. $S^2=\sum_{jj'}s_js_{j'}E_jE_{j'}=\sum_{j}s_j^2E_j=\sum_jc_jE_j=U$. Since every matrix commuting with $U$ is of the form $A=\sum_ja_jE_j$, $SA=\sum_{jj'}a_jc_{j'}E_{j}E_{j'}=\sum_ja_jc_jE_j$ and analogously $AS=\sum_{j}c_ja_jE_j$.
