# Math Help - LinearAlgebra- Gram-Schmidt Algorithm and linear combinations

1. ## LinearAlgebra- Gram-Schmidt Algorithm and linear combinations

Hey guys, I have a problem relating to the Gram-Schmidt algorithm and expressing a vector as a linear combination of other vectors.

Here is my attempt at doing the question.

A
B

So I would like to know if I have done this correctly, and if not, how do I go about solving this question?

Help would be much appreciated.

2. ## Re: LinearAlgebra- Gram-Schmidt Algorithm and linear combinations

At the end, you have (1, 0, 1), (0, 2, 0), and (-1, 0, 1) as orthogonal vectors and then divide the vectors by $\sqrt{2}$, 2, and $\sqrt{2}$ to get unit vectors. That is correct even with this non-standard inner product. The last part asks you to write (2, 1, -1) as a linear combination of these basis vectors. That means you want to find numbers, a, b, and c, such that $a(\frac{1}{\sqrt{2}}, 0, \frac{1}{\sqrt{2}})+ b(0, 1, 0)+ c(-\frac{1}{\sqrt{2}}, 0, \frac{1}{\sqrt{2}})= (2, 1, -1)$.

You could do this by solving the three equations $\frac{a}{\sqrt{2}}- \frac{c}{\sqrt{2}}= 2$, $b= 1$, $\frac{a}{\sqrt{2}}+ \frac{c}{\sqrt{2}}= 1$

But because this is an "orthonormal basis" there is a simpler way: take the dot product of [tex](\frac{1}{\sqrt{2}}, 0, \frac{1}{\sqrt{2}}) with both sides of the equation. That will give $a= (\frac{1}{\sqrt{2}}, 0, \frac{1}{\sqrt{2}})\cdot (2, 1, -1)= \frac{2}{\sqrt{2}}- \frac{1}{\sqrt{2}}= \frac{1}{\sqrt{2}}$

Take the dot product of (0, 1, 0) with both sides of the equation. That will give $b= (0, 1, 0)\cdot (2, 1, -1)= 1$

Finally, take the dot product of $(-\frac{1}{\sqrt{2}}, 0, \frac{1}{\sqrt{2}})$ with both side of the equation to get $c= (-\frac{1}{\sqrt{2}}, 0, \frac{1}{\sqrt{2}})\cdot (2, 1, -1)= -\frac{2}{\sqrt{2}}- \frac{1}{\sqrt{2}}= -\frac{3}{\sqrt{2}}$.