# how to find orthogonal vectors of 3 Dimensional point

if A(3,4,5) and B(7,10,12) are two end points of a line segment ,i know that vector V1=B-A i.e V1=(4,6,7) then how to find the other two orthogonal vectors of this

-
This smells like Vector Geometry homework. –  Zéychin Feb 9 '12 at 22:20
no not a vector geometry homework ... i just provided some example for better understanding.........and just now understood that there will be infinite vectors orthogonal to the given vector –  user1198477 Feb 9 '12 at 22:57

## migrated from stackoverflow.comFeb 12 '12 at 8:11

This question came from our site for professional and enthusiast programmers.

Three non-colinear points are needed to define a plane, but you only really have two here. If you just want to find a couple of arbitrary vectors orthogonal vectors, just pick any third point, C, not colinear with A and B, then W = (A-C)×(B-C) (where × is the cross product) is orthogonal to the line segment connecting A and B since any plane containing A and B also contains the line segment connecting them.

If you need a third vector U orthogonal to V = A-B and to W, then just set U = V×W

The first step is probably easiest if you pick C as the origin (again if it's not colinear with A and B); this reduces to setting W = (A×B).

-
could you explain this approach for the above mentioned example in question.....Thanks. –  user1198477 Feb 9 '12 at 19:27
@user1198477: So that I know how detailed to get, do you know what a cross product is? –  andand Feb 10 '12 at 0:53

Use vector product: V1 ^ V2, if they aren't collateral, it will give you an orthogonal vector.

-