2
$\begingroup$

I'm reading about Gram-Schmidt procedure in 3 dimensions. From what I understand the idea is to "fix" one of the vectors and alter the other 2 so they are all perpendicular. So say i have three vectors $u_1,u_2, u_3$ and I do Gram-Schimdt procedure to get $v_1,v_2,v_3$, firstly is there anyway to tell I have done the process correctly, and what is and how do I get a "orthonormal basis" from here, and once done can I check this step also? Thanks.

$\endgroup$
  • 4
    $\begingroup$ well, you can just check that the inner product of any two vectors is 0, or equivalently put all vectors in a matrix and see that the product of that matrix by its transpose is diagonal. Finally, to obtain an orthonormal basis, just divide every vector by it's norm (to check this, do the same as in the previous step, but here the matrix should be the identity) $\endgroup$ – John C May 6 '15 at 13:36
  • $\begingroup$ Thanks for the quick reply, by "norm" i simply square every element in the vector, sum them, and then square root, and then divide my vector by this number?. Will the dot product of the any 2 vectors in a orthonormal basis be 0 also? $\endgroup$ – MathsPro May 6 '15 at 13:40
  • 1
    $\begingroup$ yes, since the original vectors were perpendicular (which amounts to the dot product being 0) and rescaling the vectors doesn't change the angle, they remain prependicular after rescaling, and so the dot product of any two (different) vectors is still 0 $\endgroup$ – John C May 6 '15 at 13:46
  • 1
    $\begingroup$ Thank you for your help, i fully understand now $\endgroup$ – MathsPro May 6 '15 at 13:47
  • $\begingroup$ @JohnC Sorry that my answer pretty much just repeats your comment. If you're going to answer the question, though, you should do it in an answer, not a comment. $\endgroup$ – Mike Haskel May 6 '15 at 13:47
1
$\begingroup$

There is an easy test to see if your end result is valid. Arrange your vectors as column vectors of a matrix, and call that matrix $A$. Since you are looking for a basis, $A$ should be square (otherwise you have the wrong number of vectors). Now, compute $A^TA$. If you get a diagonal matrix (i.e., the only nonzero entries lie along the top-left to bottom-right diagonal), your vectors were orthogonal. If you get the identity matrix, your vectors were orthonormal.

To answer the other part of your question, once you have an orthogonal basis, you can turn it into an orthonormal basis by dividing each vector by its norm, i.e. find $\frac{v_i}{||v_i||}$ for each $i$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.