# Given vector vecA=2hati + 1hatj and vector vecB=3hatj, how do you find the component of vecA in the direction of vecB?

Apr 15, 2017

#### Explanation:

Compute unit vector in the direction of $\vec{B}$:

$\hat{B} = \frac{\vec{B}}{| \vec{B} |}$

$| \vec{B} | = \sqrt{{0}^{2} + {3}^{2}}$

$| \vec{B} | = 3$

$\hat{B} = \frac{3 \hat{j}}{3}$

$\hat{B} = 1 \hat{j}$

Let ${\vec{A}}_{B} =$ the projection of $\vec{A}$ in the direction of $\vec{B}$

${\vec{A}}_{B} = \frac{\vec{A} \cdot \vec{B}}{|} \vec{B} | \left(\hat{B}\right)$

$\vec{A} \cdot \vec{B} = \left(2\right) \left(0\right) + \left(1\right) \left(3\right) = 3$

${\vec{A}}_{B} = \frac{3}{3} \left(\hat{j}\right)$

${\vec{A}}_{B} = \hat{j}$

The would be more instructional, if $\vec{B}$ had a non-zero $\hat{i}$ component but I hope that this helps.