Consider the vectors $q_1=(1,1,1)$ and $q_3=(1,1,-2)$. I need to find a third vector $q_2$ such that $\{q_1,q_2,q_3\}$ is a arthogonal basis for $\mathbb{R}^3$.
My problem is the following: I did take $v=(1,0,0)$ and I did verify that $\{q_1,q_3,v\}$ is a basis for $\mathbb{R}^3$. Then I did take $$q_2=v-\langle v|q_1\rangle q_1-\langle v|q_3\rangle q_3=(-1,-2,1)$$
And, by Gram-Schmidt process, $q_2$ must be orthogonal to $q_1$ and $q_3$. But, as we can see, it does not happen. So, where is my mistake?
HINT
Since $q_1$ and $q_3$ are orthogonal it suffices to find $q_3$ by
$$q_2=q_1\times q_3$$
As an alternative by GS we have
$$q_2=v-\langle v|\hat q_1\rangle \hat q_1-\langle v| \hat q_3\rangle \hat q_3=(1,0,0)-\frac13(1,1,1)-\frac16(1,1,-2)=\left(\frac12,-\frac12,0\right)$$