Originally posted by yanyin
find two perpendicular vectors u and v such that each is perpendicular to w = <-4, 2, 5>
Gramm-Schmidt procedure:
1) Start with the given vector to which you want all others to be perpendicular. Normalize it (Not really necessary, but useful for step 2).
2) Take
any other vector and subtract from it its own projection along the first vector (absolutely, completely, and by all means arbitrary, no eyeballing required (well, except, of course, that it can't be a scaled version of the first vector)). Normalize the result (Again, not necessary, but useful for step 3).
3) Take any other vector that is not a scaled version of the previous two, and subtract from it its own projection along the previous two vectors. ...
To make it more concrete, an example:
1) Let's say that we're starting with
w. That takes care of step (1). But, for posterity, let's normalize:
w' =
w/w = <-4,2,5>/5
2) Just as a randomly selected vector, I will take
v'' = <1,0,0>. Nice and simple. Now I will subtract its projection:
v' =
v'' - (
v''.
w')
w'
= <1,0,0> - (-4/5)(<-4,2,5>/5) = <1,0,0> + <-16/25,8/25,4/5> = <9/25,8/25,4/5>
Normalizing:
v = <9,8,20>/(√545)
(At this point, the advantage of initial eyeballing is aparent.)
3) To find the last vector:
u'' = <0,1,0>. Subtracting the projection: ...
Oh hell, I don't want to do it. Suffice it to say that you don't
have to eyeball. Hopefully that makes you more comfortable with the procedure. Also note that you don't have to normalize either, but it makes the projection a simpler calculation.
I just thought of an alternative approach. Find the matrix that either rotates
w to be along the z axis. Then, operate the inverse of the matrix on <1,0,0> and <0,1,0>. Does anyone know if this would work? I'll see if the matrix is too difficult.
OK, I can't remember. Given two matrices, Ω and Λ, and a vector, φ, does this relationship hold:
Ω(Λφ) = (ΩΛ)φ?