Posted by Wanda on Sunday, March 2, 2008 at 11:31am.
what you want here is the cross-product for the 2 vectors [4,2,-3] and [2,-3,1]
an algebraic approach is to let that vector be [a,b,c],
then [a,b,c]∙[4,2,-3] = 0
and [a,b,c]∙[2,-3,1] = 0
from the first: 4a+2b-3c=0
from second: 2a-3b+c=0
double the second and subtract it from the first:
8b-5c=0
8b=5c
b/c = 5/8
let b=5 and c=8 back in first
4a + 10 -24 = 0
a=7/2
so a possible vector is [7/2,5,8] or
[7,10,16]
You can check that the dot product with each of the original vectors is zero, it works.
but you wanted a unit vector.
The magnitude of [7,10,16] is √(7^2+10^2+16^2) = √405
so the unit vector which is perpendicular to both is [7/√405,10/√405,16/√405]
there is a nice algorithm to find the cross product between two vectors [a,b,c] and [d,e,f]
line up the numbers above each other
a b c
d e f
the cross product is
[bf-ec,-(af-dc),ae-bd]
I follow this method,
block out the first column with my finger, then take the difference in the products of the diagonals of the remaining 2by2
block out the middle column with my finger , then take the -(difference in the products of the diagonals of the remaining 2by2)
block out the last column with my finger, then take the difference in the products of the diagonals of the remaining 2by2
e.g.
4 2-3
2-3 1
cross product is
[2-9,-(4+6),-12-4]
=[-7,-10,-16] which is a multiple of [7,10,16 from above.
HEYYYYRwei