# Transformation matrix to go from one vector to another

I've two vectors $a = (a_1, a_2, a_3)$ and $b = (b_1, b_2, b_3)$. How to find transformation matrix for transform from a to b?

-
You need some restrictions. For example if a=(0,0,0) and b is anything else, there's no possible transformation matrix. –  coffeemath Oct 9 '12 at 17:22

Try the dyadic product $$\mathbf{a b} \equiv \mathbf{a}\otimes\mathbf{b} \equiv \mathbf{a b}^\mathrm{T} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix}\begin{pmatrix} b_1 & b_2 & b_3 \end{pmatrix} = \begin{pmatrix} a_1b_1 & a_1b_2 & a_1b_3 \\ a_2b_1 & a_2b_2 & a_2b_3 \\ a_3b_1 & a_3b_2 & a_3b_3 \end{pmatrix}.$$ Maybe you should include a normalization factor.