Gram-Schmidt Question Could someone explain how to do this question? I'm a bit stuck.

Apply the Gram-Schmidt orthogonalization process to vectors $(1, -2, 3)$ and $(-1, 0, -1)$.

 A: The key aspect of this problem is that you need to perform the Gram-Schmidt process on these two vectors that form a basis for their span. I believe since they are linearly independent, we can go ahead and assume that they form a basis for their span. For Getting our orthogonal vectors, we set the first one
$$u_1 = v_1 = [1,-2,3]^T.$$
and then we set
$$u_2 = v_2 - proj_{u_1}(v_2) = v_2 - \frac{v_2^Tu_1}{u_1^T u_1}u_1$$
$$= [-1,0,-1]^T - \frac{-1 \times 1 + 0 \times (-2) + (-1) \times 3}{
1 \times 1 + (-2) \times (-2) + 3 \times 3}[1,-2,3]^T$$
$$= [-1,0,-1]^T - \frac{-4}{14}[1,-2,3]^T.$$
We can get the orthonormal set of vectors by performing
$$e_1 = \frac{u_1}{\|u_1\|}$$
and
$$e_2 = \frac{u_2}{\|u_2\|}.$$
A: Given two vectors $u=(u_1,u_2,u_3)$ and $v=(v_1,v_2,v_3)$, the Gram-Schmidt process is as follows:


*

*Split the second vector into two parts, one which is parallel to the first vector, and the second which is perpendicular to the first vector.

*Subtract the parallel part from the second vector -- the remainder is the perpendicular part.


Note that this leaves us with two vectors. If they were linearly independent, then we now have two linearly independent and perpendicular vectors. 
If they were linearly dependent, we now have the first vector and the zero vector.


*Normalize the two vectors (divide them by their norms, provided that the norm is non-zero, which is the case if and only if the vector is non-zero).


Now we have two orthonormal vectors.
The only tricky part might be 1. Remember that the dot product gives the length of the part of the second vector which is parallel to the first vector (this is called the "projection" onto the first vector).
Dot product:
$$\langle u, v \rangle = u \cdot v = u_1v_1 + u_2v_2 + u_3v_3 \\= v_1u_1 + v_2u_2 + v_3u_3 = \langle v, u \rangle = v \cdot u$$
EDIT: here's a picture you might find useful in order to get the geometric intuition from parts 1. and 2.

