Hi, All --
I have what I fear is a too-simple question. For some reason, I am having a real mental block figuring it out, though. Say I have some vector in R3 (x, y, z). I would like to find a vector orthogonal to this one. The obvious solution is (1/x, 1/y, -2/z). However, this blows up if one or more of the components of the original vector is zero (i.e., if the vector lies in a plane defined by the global coordinate system).
We have a way to handle this is an ad hoc fashion (if statements), but it seems to me that there should be some slick linear algebra that we could emply to solve this problem in a more elegant way, but it currently escapes me.
Thoughts?
Thanks in advance.
Matt