$V=\mathbb{R^4}$ is an inner product space, with the standard inner product.find symmetric operator $T: V \to V$ $V=\mathbb{R^4}$ is an inner product space, with the standard inner product.
$W=Sp\{1,0,1,0),(0,1,0,1) \}$
I have to find symmetric operator $T: V \to V$ such that $W$ is eigenspace of $\lambda_1=2$ and $W^\perp$ is eigenspace of $\lambda_2=3$.
First, I found the orthonormal basis
$W=Sp{ (\frac{1}{\sqrt{2}},0,\frac{1}{\sqrt{2}},0 )},(0,-\frac{1}{\sqrt{2}},0,\frac{1}{\sqrt{2}})$
$W^\perp=Sp\{ (\frac{1}{{2}},-\frac{1}{{2}},-\frac{1}{{2}},-\frac{1}{{2}}),(\frac{1}{{2}},\frac{1}{{2}},-\frac{1}{{2}},-\frac{1}{{2}})\}$
I have no idea how to find this transformation, I will be grateful for help.
Thanks !
 A: In terms of the basis
$$B=\{(\frac{1}{\sqrt{2}},0,\frac{1}{\sqrt{2}},0),(0,-\frac{1}{\sqrt{2}},0,\frac{1}{\sqrt{2}}),(\frac 12,-\frac 12,-\frac 12,-\frac 12),(\frac 12,\frac 12,-\frac 12,\frac 12)\}=\{v_1,v_2,v_3,v_4\}$$
(the last component of the last vector needs to be positive $\frac 12$, becase otherwise it is not an orthonormal basis)
we can say that $T$ should have the representation matrix
$$M_B(T)=\begin{pmatrix} 2&0&0&0\\0&2&0&0\\0&0&3&0\\0&0&0&3\end{pmatrix}$$
To get to the representation matrix of $T$ in terms of the standard basis (so we want to find a matrix $A$ with $T(v)=Av$) we apply a base change:
$$A=M_C^B M_B(T) \cdot M_B^C$$
where $C$ is the standard basis $$C=\{(1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)\}$$
We know that $M_C^B$ is simply the matrix with columns $v_1, v_2, v_3, v_4$. And since these form an orthonormal basis the inverse $M_B^C$ is simply the transpose. Calculating
$$A=M_C^BM_B(T)(M_C^B)^T=\begin{pmatrix}5/2&0&-1/2&0\\0&5/2&0&1/2\\-1/2&0&5/2&0\\0&1/2&0&5/2 \end{pmatrix}$$
we have the symmetric operator we were looking for, namely
$$T:V \to V, x \mapsto Ax$$
A: You know the eigenvalues and the eigenvectors of $W$, so you can use the Jordan canonical form to find $W$:
$$
W=PJP^{-1}
$$
where
$$
P=\begin{bmatrix}
1&0&0&1\\
0&1&1&0\\
1&0&0&-1\\
0&1&-1&0
\end{bmatrix}
\qquad
J=\begin{bmatrix}
2&0&0&0\\
0&2&0&0\\
0&0&3&0\\
0&0&0&3
\end{bmatrix}
$$
WolframAlpha say that
$$
W= \frac{1}{2}\begin{bmatrix}
5&0&-1&0\\
0&5&0&-1\\
-1&0&5&0\\
0&-1&0&5
\end{bmatrix}
$$
