mathrotationorthogonal

What is the necessary condition for two vector set be aligned by an orthogonal matrix?


Suppose there are two vector sets $A$ and $B \in \mathbb{R}^{f \times 3}$

If there is an orthogonal matrix $R \in \mathbb{R}^{3 \times 3}$ can align there two vector set perfectly, e.g. $RA = B$

What is the necessary condition for A and B to satisfy that?

I know the orthogonal matrix can be solved by orthogonal procrustes algorithm, but that only gives the solution. I want to know the condition for A and B to make them be perfectly aligned by the $R$.

Thanks.


Solution

  • The necessary and sufficient condition is that

    A'*A = B'*B
    

    Unfortunately I've not been able to find a reference for this. Here, though is an outline of a proof. We work inductively on the number of rows.

    If this is 1 then each of A and B are column vectors, and the condition reads

    A[i]*A[j] = B[i]*B[j] for all i,j
    

    When i=j, this implies that |A[i]| = |B[i]| and so there are s[i] (each +-1) with

    B[i] = s[i]*A[i]
    

    If both A[i] and A[j] are non zero (then so are both B[i] and B[j]) we see

    s[i]*s[j] = 1, so s[i] = s[j]
    

    Since we can choose s[i] arbitrarily when A[i] (hence B[i]) is zero, it follows that we can choose all the s[i] to be the same so that B = s*A, as required

    If the number of rows is greater than 1, write

    A = (a A1) 
    B = (b B1) 
    

    (where a is the first column of A, etc)

    Note

    A'*A = ( a'*a   a'*A1)
           ( A1'*a  A1'*A1)
    

    and similarly for B. If a is zero, so too is b, and

    U*a = U*b for any U.
    

    Thus we can assume a != 0 (and so b != 0). if l is the length of a (and of b) we can find orthogonal U and V so that

    U*a = l*e1
    V*b = l*e1
    

    (where e1 is (1,0,..0)') Let

    U*A = (l*e1 A2)
    V*B = (l*e1 B2)
    

    In terms of these we have

    A'*A = (U*A)'*(U*A) = (l*l      l*e1'*A2)
                          (l*A2'*e1 A2'*A2  )
    

    and similarly for B. Note that e1'*A2 is the first row of A2, so our condition implies that the first rows of A2 and B2 are the same. If we write

    A2 = ( x )
         ( A3)
    

    (and similarly for B2) then

    A2'*A2 = x'*x + A3'*A3 = x'*x + B3'*B3 
    

    So, by induction, there is a orthogonal Q with

    B3 = Q*A3
    

    But this implies

    B2 = (1 0 ) * A2
         (0 Q )
    

    and, unraveling the definitions, that there is an orthogonal W with

    B = W*A