Take the 2-minute tour ×
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.

This question already has an answer here:

How to find transformation matrix, specifically a rotation, between two given 3d vectors?

I've found something about it but with quaternions. I don't know anything about quaternions. So it would be great to find solutions in terms of vectors.

I mean rotation matrix.

share|improve this question

marked as duplicate by Jonas Meyer, Ivo Terek, 900 sit-ups a day, TooTone, hardmath Aug 14 at 23:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Do you mean to ask, given $\vec{a}, \vec{b} \in \mathbb{R}^3$, find $A$ s.t. $A \vec{a} = \vec{b}$? –  gt6989b Oct 31 '12 at 16:09
    
@gt6989b, yes i mean exactly this –  Yola Apr 9 '13 at 9:42
    
Question body should not be a continuation of the title; it should be readable on its own. Also, proper capitalization is not optional. –  900 sit-ups a day Aug 14 at 22:59

1 Answer 1

up vote 2 down vote accepted

I'm assuming you are asking that given $\vec{x} = (x_k)_{k=1}^3, \vec{y} = (y_k)_{k=1}^3 \in \mathbb{R}^3$, how do you find $A = (a_{i,j})_{i,j=1}^3 \in \mathbb{R}^{3 \times 3}$ so that $A \vec{x} = \vec{y}$.

In case $\{x_i\}_{i=1}^3$ are all non-zero, a simple diagonal matrix would do: define $a_{i,i} = y_i/x_i$ and let all off-diagonal elements be $0$.

If exactly one of the elements of $\vec{x}$ are zero, say $x_1 = 0$ then let $a_{1,1} = 0$ and $a_{1,2} = y_1/x_2$, leving the rest at 0.

If two of the elements of $\vec{x}$ are zero, say $x_1 = x_3 = 0$, define $a_{1,1} = a_{3,3} = 0$, $a_{1,2}$ as above, and $a_{3,2} = y_3/x_2$ to get what you need.

Finally, if $\vec{x} = \vec{0}$, it is not possible unless $\vec{y} = 0$ as well.

share|improve this answer

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