I've been trying to apply the Gram-Schmidt procedure to $v_1=(1,1,0)^t$, $v_2=(1,0,1)^t,v_3=(0,1,1)^t$ to get an orthonormal basis of $\mathbb R^3$.
Start with $w_1=\frac{1}{\sqrt 2}(1,1,0)^t$. The orthogonal projection of $V$ onto the span of $v_1$ is given by $\pi(v_2)={(v_2,w_1})w_1=\frac{1}{\sqrt 2}w_1=\frac{1}{2}(1,1,0)$. The vector $v_2-\pi(v_2)=(1/2,-1/2,1)^t$ is orthogonal to all vectors in the span of $v_1$. After normalizing we get $w_2=\frac{1}{\sqrt 6}(1,-1,2)^t$/
Up to that point (I believe) everything was fine. I have problems with $w_3$. The orthogonal projection of $V$ onto the span of $v_1,v_2$ is given by $v_3\mapsto (w_1,v_3)w_1+(w_2,v_3)w_2=\frac{1}{\sqrt 2}w_1+\frac{1}{\sqrt 6}w_2=(2/3,1/3,1/3)$. Substracting this from $v_3$ we should get a vector orthogonal to the span of $v_1,v_2$. What I actually get is $(-1/3,2/3,2/3)$. This vector is not orthogonal to either $w_1$ or $w_2$.
What is wrong with my calculations?