I'm trying to compute the spectral decomposition of the Hadamard gate but I'm making a mistake somewhere.
Note: I believe (though I may be wrong so correct me if I am) that spectral decomposition is a way to find a diagonalized version of a matrix, additionally I am trying to work out $\sqrt{\operatorname{CNOT}_{12}}$, and based off an exam paper question it said to do so knowing that $\operatorname{CNOT}_{12}=H_2Z_{12}H_2$. I know that $H_2=I \otimes H$, and I thought the best way to do this would be to diagonalize $H_2$ by diagonalizing $H$ then take the square root of the diagonals of $H_2, Z$ to find $\sqrt{\operatorname{CNOT}_{12}}$.
Say we have $$H=\begin{bmatrix} \tfrac{1}{\sqrt{2}} &\tfrac{1}{\sqrt{2}} \\ \tfrac{1}{\sqrt{2}} & -\tfrac{1}{\sqrt{2}} \end{bmatrix}.$$
Now spectral decomposition of this matrix will be $H=\sum_i \lambda_i|\psi_i\rangle \langle\psi_i|$, where $\lambda_i$ corresponds to an eigenvalue and $|\psi_i \rangle$ is its associated eigenvector.
First we find the eigenvalues:
$$\det(H-\lambda I)=\det \begin{bmatrix} \tfrac{1}{\sqrt{2}}-\lambda &\tfrac{1}{\sqrt{2}} \\ \tfrac{1}{\sqrt{2}} & -\tfrac{1}{\sqrt{2}}-\lambda \end{bmatrix}$$ $$=(\tfrac{1}{\sqrt{2}}-\lambda)(-\tfrac{1}{\sqrt{2}}-\lambda)-\tfrac{1}{2}$$ $$=-\tfrac{1}{2}+\lambda^2-\tfrac{1}{2}=-1+\lambda^2\implies \lambda=\pm 1$$
Now we find the eigenvectors:
$\lambda=1$:
$$\begin{bmatrix} x\\y \end{bmatrix}=\begin{bmatrix} \tfrac{1}{\sqrt{2}} &\tfrac{1}{\sqrt{2}} \\ \tfrac{1}{\sqrt{2}} & -\tfrac{1}{\sqrt{2}} \end{bmatrix}\begin{bmatrix} x\\y \end{bmatrix}$$
$$\implies \tfrac{x+y}{\sqrt{2}}=x \implies (\sqrt{2}-1)x=y$$
$$\tfrac{x-y}{\sqrt{2}}=y \implies (\sqrt{2}+1)y=x$$
These equations give eigenvectors $$v_1=\begin{bmatrix} 1 \\(\sqrt{2}-1) \end{bmatrix}, v_2=\begin{bmatrix} (\sqrt{2}+1)\\1 \end{bmatrix}$$
The eigenvectors for $\lambda=-1$ are found, similarly, to be $$v_3=\begin{bmatrix} 1 \\(-\sqrt{2}-1) \end{bmatrix}, v_4=\begin{bmatrix} (-\sqrt{2}+1)\\1 \end{bmatrix}$$ But $$H=-\begin{bmatrix} 1 \\(-\sqrt{2}-1) \end{bmatrix}\begin{bmatrix} 1 &(-\sqrt{2}-1) \end{bmatrix}- \begin{bmatrix} (-\sqrt{2}+1)\\1 \end{bmatrix}\begin{bmatrix} (-\sqrt{2}+1)&1 \end{bmatrix}+\begin{bmatrix} 1 \\(\sqrt{2}-1) \end{bmatrix}\begin{bmatrix} 1 &(\sqrt{2}-1) \end{bmatrix}+\begin{bmatrix} (\sqrt{2}+1)\\1 \end{bmatrix}\begin{bmatrix} (\sqrt{2}+1)&1 \end{bmatrix}$$
Doesn't give me a diagonal matrix, where have I gone wrong?