Decompose v into two vectors v1 and v2, where v1 is parallel to w and v2 is orthogonal to w.
v = i - j, w = i + 2j
v = < 1, - 1 >
w = < 1, 2 >
v1 = [ v (dot) w ] / l w l^2 * < w >
v(dot) w = 1* 1 + 2* -1 = 1 - 2 = -1
l w l = sqrt (1^2 + 5^2) = sqrt (5) l w l ^2 = 5
So......
v1 = -1 / (5) * <1, 2 > = < -1/5, -2/ 5 >
v2 = v - v1 = < 1 - -1/5, -1 - - 2/5 > = < 1 + 1/5, -1 + 2/5 > = < 6/5,-3/5 >
Check
Sum of v1 and v2 = < -1/5 + 6/5, -2/5 + - 3/5 > = < 1 -1 > = v
Decompose v into two vectors v1 and v2,
where v1 is parallel to w and v2 is orthogonal to w.
v = i - j, w = i + 2j
\(\vec{v} = \binom{1}{-1}\\ \vec{w} = \binom{1}{2}\)
\(\begin{array}{rcll} \vec{v_1} &=& \lambda \cdot \vec{w} \\ \vec{v_2} &=& \mu \cdot \vec{w_\perp} \\ \hline \vec{v}=\vec{v_1}+\vec{v_2} &=& \lambda \cdot \vec{w} + \mu \cdot \vec{w_\perp} \\ \vec{v} &=& \lambda \cdot \vec{w} + \mu \cdot \vec{w_\perp} \quad &| \quad \cdot \vec{w} \\ \vec{v}\cdot \vec{w} &=& \lambda \cdot \vec{w}\cdot \vec{w} + \mu \cdot \vec{w_\perp} \cdot \vec{w} \quad &| \quad \vec{w_\perp} \cdot \vec{w} = 0 \quad \vec{w}\cdot \vec{w} = w^2 = 1^2+2^2 = 5\\ \vec{v}\cdot \vec{w} &=& \lambda \cdot w^2 +0 \\ \vec{v}\cdot \vec{w} &=& \lambda \cdot w^2 \quad &| \quad : w^2 \\ \lambda &=& \frac{ \vec{v}\cdot \vec{w} } {w^2} \\ \mathbf{ \vec{v_1} } &\mathbf{=}&\mathbf { \left( \frac{ \vec{v}\cdot \vec{w} } {w^2} \right) \cdot \vec{w} } \\ \mathbf{ \vec{v_2} } &\mathbf{=}&\mathbf { \vec{v} - \vec{v1} }\\ \hline \end{array} \)
\(\begin{array}{|rcll|} \hline \mathbf{ \vec{v_1} } &\mathbf{=}&\mathbf { \left( \frac{ \vec{v}\cdot \vec{w} } {w^2} \right) \cdot \vec{w} } \\ & = & \left( \frac{ \binom{1}{-1}\cdot \binom{1}{2} } {5} \right) \cdot \binom{1}{2} \\ & = & \left( \frac{ 1-2 } {5} \right) \cdot \binom{1}{2} \\ & = & \left( \frac{ -1 } {5} \right) \cdot \binom{1}{2} \\ \mathbf{ \vec{v_1} } &\mathbf{=}&\mathbf { \binom{-0.2}{-0.4} } \\\\ \mathbf{ \vec{v_2} } &\mathbf{=}&\mathbf { \binom{1}{-1} - \vec{v1} }\\ & = & \binom{1}{-1} - \binom{-0.2}{-0.4} \\ & = & \binom{1}{-1} + \binom{0.2}{0.4} \\ & = & \binom{1+0.2}{-1+0.4} \\ \mathbf{ \vec{v_2} } &\mathbf{=}&\mathbf { \binom{1.2}{-0.6} } \\ \hline \end{array} \)