Projection Matrix between two Vectors

459 Views Asked by At

Given a two normal vectors v1 = [a1;b1;c1] and v2 = [a2;b2;c2] as given in Fig1. How I can derive the projection matrix that project vector v2 into vector v1.

I computed the cross product and the angle (θ) between them using the dot product, But I'm little bit confused which is the correct way to derive the projection matrix.

Update: Both vectors have the same origin in 3D space (0,0,0).

1

There are 1 best solutions below

0
On BEST ANSWER

Consider first the case where $v_1$ has unit length. Then $\langle v_1, v_2\rangle$ is the length of the projected $v_2$. It goes in direction $v_1$, so the vector corresponding to that length is $\langle v_1,v_2\rangle v_1$. Now consider a vector which is a multiple of this unit length $v_1$, namely $\lambda v_1$. This factor $\lambda$ will scale the result by $\lambda^2$, one factor of $\lambda$ for each kind of multiplication. Which tells you that you have to divide by the square of the norm of $v_1$ in those cases where $v_1$ is not of unit length:

$$\frac{\langle v_1,v_2\rangle}{\langle v_1,v_1\rangle}v_1$$

Now you can turn this into a matrix by noting $\langle v_1,v_2\rangle=v_1^Tv_2$. Then you can write

$$\frac{\langle v_1,v_2\rangle}{\langle v_1,v_1\rangle}v_1= \left(\frac{1}{\lVert v_1\rVert^2}v_1v_1^T\right)v_2$$

so you have the matrix

$$M = \frac{1}{\lVert v_1\rVert^2}v_1v_1^T$$