[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 558

 
If vector1 is orthogonal to vector2 and vector2 is orthogonal to vector3, then vector1 is not always orthogonal to vector3 even in 3-dimensional space, let alone in more dimensions
 
alsu:
It may not become co-directional, but simply at an oblique angle to all or some of the vectors
But it can't! It can't to those already processed, but it can to the next input, but the next iterations will deal with them just the same.
 
MetaDriver:
But it can't! To those already processed, it can't, but to the next input, it can, but the next iterations will deal with them just the same.
The next iterations in general case do not retain the orientation to the previous processed vectors - see my previous post
 
alsu:
If vector1 is orthogonal to vector2 and vector2 is orthogonal to vector3, then vector1 is far from always orthogonal to vector3 even in 3-dimensional space, let alone in more dimensions

So you haven't understood the MAIN point. The transformation at each step is strictly flat - it puts the vector in ortho-position to the previous one, leaving it orthogonal to all the pre-previous ones. That's what I've been aiming for from the start. That was the problem (which has now been solved).

Think again. Check.

 
alsu:
The following iterations generally do not retain an orogonality to the previous processed vectors - see my previous post

retain.

Maybe I didn't make it clear enough. I'll write a full scheme now. it's a small one.

 
MetaDriver:

So you don't understand the MAIN point. The transformation in each step is strictly flat - it puts the vector in ortho-position to the previous one, leaving it orthogonal to all the previous ones. That's what I was aiming for from the start. That was the problem (which has now been solved).

Think again. Check.

Checked it out))

The transformation is, of course, strictly flat, and the result is generally to the exact sign independent of the choice of the initial arbitrary vector - but! only in this plane. Who told us that out of an infinite number of options to draw a plane through a given vector, we chose the right one?

Here's an example. Suppose you have two vectors in 3-dimensional space: (1,0,0) and (0,sqrt(2),sqrt(2)). They are orthogonal, as you can see. You started by taking an arbitrary x1 in the plane z=0 and using it to construct an orthogonal vector (0,1,0) to the first vector. We obtain that the algorithm is complete, but the result is not obtained - the third vector is not orthogonal to the remaining second vector. And in order to get the right answer, you need to take care beforehand to choose the right plane during the first construction - and then you will come to the variant (0,-sqrt(2),sqrt(2)) or the second possible solution.

 
double[dim]  GetOrtoVector(int dim, int count, double[][dim] &Input)

  {

    bool error=false;

    double[dim]  Result = RandomInit(dim);

    for (i=0; i<count; i++)  { Result = Ortogonalize(Result, Input[i], error); }
    
    if (error) return GetOrtoVector(dim,count,Input);  else    return Result;

  }

double[dim] Ortogonalize(double[dim] a, double[dim] b, bool &err)

  {

    double SP = sp(a,b);

    if (sp==1.0) {err = true; return a;} else {return  (a-SP*b);  }

  }

I haven't explained how to get the scalar product and the initial vector generation. It's pretty self-explanatory.

I also didn't describe vector subtraction and vector multiplication by a number. Pseudocode is just as good as...

 
alsu:

Checked))

The transformation is, of course, strictly planar, and the result is generally accurate to a sign regardless of the choice of the original arbitrary vector - but! only in this plane. Who told us that out of an infinite number of options to draw a plane through a given vector we have chosen the right one?

Here's an example. Suppose you have two vectors in 3-dimensional space: (1,0,0) and (0,sqrt(2),sqrt(2)). They are orthogonal, as you can see. You started by taking an arbitrary x1 in the plane z=0 and using it to construct an orthogonal vector (0,1,0) to the first vector. We obtain that the algorithm is complete, but the result is not obtained - the third vector is not orthogonal to the remaining second vector. And in order to get the right answer, you need to take care beforehand to choose the right plane during the first construction - and then you will come to the variant (0,-sqrt(2),sqrt(2)) or the second possible solution.

I won't take in plane Z=0 :))

I'll just take arbitrary x1 = {random, random, random};

What is the probability that it will fall into plane Z=0 ?

;-))

 
MetaDriver:

I won't take Z=0 :))

I'll just take random x1 = {random, random, random};

what is the probability that it will fall into plane Z=0 ?

;-))

exactly the same as the probability of it hitting the "right" plane, i.e. zero ))
 
alsu:
exactly the same as the probability of it hitting the "right" plane, i.e. zero ))
Choosing an arbitrary vector fixes the plane of calculation - a single plane can be drawn through 2 vectors. In my example, you can take any of an infinite number of planes, and get an infinite number of solutions, but until you take the right plane, you won't get the right answer.