# given 3 vectors A B C, how would I find the set of 3 orthogonal vectors  X Y Z such that the dot products of AX BY and CZ are all equal?assume 3 dimension unit vectors

mlehuzzah | Certified Educator

If you're looking for orthogonal vectors (and not orthonormal vectors), you have quite a bit of freedom, because you can scale them however you need. Thus, you really only care about whether your dot products are 0 vs nonzero

Here is a nice method for when your vectors are linearly independent, (and an ad-hoc inelegant incomplete solution for when they aren't):

Component-wise, the vectors are <a1,a2,a3>, etc

Call a set of three a "triple" if it contains all distinct numbers and letters. For example, a2, b3, c1 is a triple, a2, b2, c1 is NOT.

If you can find a triple where all the elements are zero:
say a3, b2, c1 = 0, then let (in this case):
X=<0,0,1>, Y=<0,1,0>, Z=<1,0,0>
That is: X is 1 in the component where A was 0, and 0 elsewhere, similarly for Y, Z

If you can find a triple where all the elements are NONzero:
say a1, b3, c2 are all non zero, then let (in this case):
X=<1/a1,0,0>, Y=<0,0,1/b3>, Z=<0,1/c2,0>

If you can't find either of these, then your vectors must be linearly dependent. To see this, multiply any triple together. At least one of the elements is zero (and at least one is nonzero), so a product of any of the triples is zero. But det(A,B,C) is just a difference of sums of these products, so you're adding up a bunch of zeros. Thus det(A,B,C)=0, and A,B,C are linearly dependent.

If A,B,C are linearly dependent, then they all lie in the same plane. (Note: none is the zero vector because they are unit vectors.)

If they all lie in the same plane, and are nonzero:
Almost* any orthogonal system that doesn't contain a vector in the plane (and therefore also doesn't contain the normal to the plane) can be scaled to work. So one thing you could do is start with
A (a vector in the plane)
AxB (the normal to the plane, assuming B isn't parallel to A)
Ax(AxB) (another vector in the plane, orthogonal to A)
rotate these vectors slightly using a rotation matrix to ensure that you've moved off the plane
if you do this, then you have that X.A, Y.B, Z.C are all nonzero, and
and then scale them appropriately to get X.A = Y.B = Z.C

*almost in the mathematical sense