# Component of a vector along another vector.

Tags:
1. Oct 22, 2014

### Hijaz Aslam

1. The problem statement, all variables and given/known data
Given $\vec{A}=2\hat{i}+3\hat{j}$ and $\vec{B}=\hat{i}+\hat{j}$.Find the component of $\vec{A}$ along $\vec{B}$.

2. Relevant equations
$\vec{A}.\vec{B}=ABcosθ$ where θ is the angle between both the vectors.

3. The attempt at a solution
I attempted the question as follows:
Let the angle between $\vec{A}$ and $\vec{B}$ be 'θ'. So the component of $\vec{A}$ along $\vec{B}$ is given by $Acosθ\hat{B}$ => $Acosθ(\frac{\vec{B}}{B})$

As $\vec{A}.\vec{B}=ABcosθ$ => $[( 2\hat{i}+3\hat{j})(\hat{i}+\hat{j})]/B=Acosθ$ => $\frac{5}{\sqrt{2}}=Acosθ$

Therefore the component is : $\frac{5}{\sqrt{2}}(\frac{\hat{i}+\hat{j}}{\sqrt{2}})$ => $\frac{5}{2}({\hat{i}+\hat{j}})$

But my text produces the solution as follows:
$A_B=(\vec{A}.\vec{B})\hat{B}=\frac{5}{\sqrt{2}}(\hat{i}+\hat{j})$.

2. Oct 22, 2014

### RUber

I usually see this process broken down into basis components.
That is $\hat B =\sqrt{2}/2 \hat i + \sqrt{2}/2 \hat j.$
Then the component is $A\cdot \hat B_i \hat i + A\cdot \hat B_j \hat j$.
Somewhere in your process, you divided by the magnitude of B twice.

3. Oct 23, 2014

### willem2

You're right and the book is wrong. The book answer as well as the formula for AB they use.
The length of your answer is smaller than the length of A as it should be. The book answer is larger.
The projection of A on B should only depend on the direction of B, not the magnitude. The formula used for AB in the book does depend on the magnitude of B.

4. Oct 23, 2014

### Delta²

Book is wrong . We can verify this by standard euclidean geometry easily because by the definition of cosine, it will be cos(θ)=(component of A along B)/A hence Acos(θ)=(component of A along B). And we have to multiply this by the unit vector of B to get the required result.