Help using Gram-Schmidt

51 Views Asked by At

I want to use Gram-Schmidt to turn the vectors $v_{1}=(1,\sqrt{2},1,0)$, $v_{2} = (\sqrt{2},1,0,1)$, $v_{3}= (\frac{-\sqrt{2}+\sqrt{2}i}{2},-i,\frac{\sqrt{2}+\sqrt{2}i}{2},1)$ and $v_{4} = (\frac{-(\sqrt{2}+\sqrt{2}i)}{2},i,\frac{\sqrt{2}-\sqrt{2}i}{2},1)$ into an orthonormal system.

My work: The first vector, let us call it $\hat{v}_{1}$, is simply $\hat{v}_{1} = \frac{v_{1}}{||v_{1}||} = \frac{1}{2}v_{1} = \frac{1}{2}(1,\sqrt{2},1,0)$. Now, using $\langle v_{2},\hat{v}_{1}\rangle = \sqrt{2}$, and $||v_{2}||=2$, I got: $$\hat{v}_{2} = \frac{1}{||v_{2}||}(v_{2} -\langle v_{2},\hat{v}_{1}\rangle \hat{v}_{1}) = \frac{1}{2}(\frac{\sqrt{2}}{2},0,-\frac{\sqrt{2}}{2},1)$$

Now, using $\langle v_{3}, \hat{v}_{1}\rangle = \langle v_{3},\hat{v}_{2}\rangle = 0$, and $||v_{3}|| = 2$, I got $\hat{v}_{3} = \frac{1}{||v_{3}||}v_{3} = \frac{1}{2}(\frac{-\sqrt{2}+\sqrt{2}i}{2},-i,\frac{\sqrt{2}+\sqrt{2}i}{2},1)$.

Finally, using $\langle v_{4},\hat{v}_{1}\rangle = \langle v_{4},\hat{v}_{2}\rangle = \langle v_{4},\hat{v}_{3}\rangle = 0$ and $||v_{4}|| = 2$, I got $\hat{v}_{4} = \frac{1}{||v_{4}||}v_{4} = \frac{1}{2}(\frac{-(\sqrt{2}+\sqrt{2}i)}{2},i,\frac{\sqrt{2}-\sqrt{2}i}{2},1)$.

The point is: if I define a matrix $U$ whose columns are, respectively, the vectors $\hat{v}_{1}$, $\hat{v}_{2}$, $\hat{v}_{3}$ and $\hat{v}_{4}$, that is: $$U = \frac{1}{2}\begin{pmatrix} 1 & 0 & \frac{-\sqrt{2}+\sqrt{2}i}{2} & \frac{-(\sqrt{2}+\sqrt{2}i)}{2}\\ \sqrt{2} & -1 & -i & i \\ 1 & -\sqrt{2} & \frac{\sqrt{2}+\sqrt{2}i}{2} & \frac{\sqrt{2}-\sqrt{2}i}{2} \\ 0 & 1 & 1 & 1 \end{pmatrix} $$ and evaluate the product $UU^{*}$ it is not the identity map. Can someone help me spot the mistake? Thanks!