Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two pairs of 3D vectors named $(A_1, B_1)$ and $(A_2, B_2)$. All four vectors have unit length. I'd like to match one pair onto the other. As I am permitted to assume the angle between $A_1$ and $B_1$ is always the same as the angle between $A_2$ and $B_2$, I imagine that some rotation matrix exists that when applied to both vectors in $(A_1, B_1)$ will give me the same vectors as $(A_2, B_2)$.

Below are some numbers for the sake of a concrete example:

$$A_1 = (1, 0, 0),\quad B_1 = \left(\frac{\sqrt{2}}{2}, \frac{\sqrt{2}}{2}, 0\right),\quad A_2 = (0, 1, 0),\quad B_2 = \left(0, \frac{\sqrt{2}}{2}, \frac{\sqrt{2}}{2}\right).$$

Note that the angle between $A_1$ and $B_1$ is equal to the angle between $A_2$ and $B_2$ ($45$ degrees).

share|cite|improve this question
Thanks for the edit, Michael. The question is actually readable now! – Jono Sep 30 '12 at 2:26
up vote 3 down vote accepted

Use procrustes analysis.${}{}{}{}{}{}{}{}$

share|cite|improve this answer
Thanks for pointing me in the right direction (pun not really intended). I waded through a load of academic papers before I found precisely the answer I needed (hidden within the singular value decomposition). – Jono Sep 30 '12 at 2:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.