# Determining a vector orthogonal to $q_1=(1,1,1)$ and $q_3=(1,1,-2)$, why I'm wrong with my calculations?

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)$$

• I don't know why I don't use cross product before, It is a simple way to solve the problem. – Gödel Nov 22 '18 at 17:10
• @Gödel Yes indeed it is the faster way in that case if we can't see that by inspection. – gimusi Nov 22 '18 at 17:18

None of $$q_1$$ and $$q_2$$ are normalized. Hence, the formula would be $$q_2=v-{\langle v|q_1\rangle \over \langle q_1|q_1\rangle} q_1-{\langle v|q_3\rangle \over \langle q_3|q_3\rangle} q_3 = ({1 \over 2},-{1 \over 2},0)$$.

$$q_2=v-\frac{\langle v|q_1\rangle}{\langle q_1|q_1\rangle} q_1-\frac{\langle v|q_3\rangle}{\langle q_3|q_3\rangle} q_3$$