# Projection of a Vector on a Line

In this article, we will learn about how to project a vector on a line and the angle between two vectors. The two vectors here are the vector to be projected and the vector of the line on which the projection is done.

## Angle Between Two Vectors

Look at the figures given below:

If a vector $$\vec{AB}$$ makes an angle $$\theta$$ with a given directed line l, in theÂ anticlockwise direction, then the projection of $$\vec{AB}$$ on l is a vector $$\vec{p}$$ with magnitude |$$\vec{AB}$$|Â $$\cos \theta$$.

Also, the direction of $$\vec{p}$$Â is the same (or opposite)Â to that of the line l, depending upon whether $$\cos \theta$$ is positive or negative. The vector $$\vec{p}$$ is the projection vector and has magnitude |$$\vec{p}$$|. It is also called the projection of vectorÂ $$\vec{AB}$$ on the directed line l.

In each of the figures shown above, the projection vector ofÂ $$\vec{AB}$$ along the line l is theÂ vector:Â $$\vec{AC}$$.

### Browse more Topics under Vector Algebra

You can download Vector Algebra Cheat Sheet by clicking on the download button below

## Important Observations

• If $$\hat{p}$$ is the unit vector along a line l, then the projection of a vector $$\vec{a}$$ on the lineÂ l is,

$$\vec{a}$$.$$\hat{p}$$

• The projection of a vectorÂ $$\vec{a}$$ on other vectorÂ $$\vec{b}$$, is

$$\vec{a}$$.$$\hat{b}$$
Or,Â $$\vec{a}$$.$$\frac{\vec{b}}{|\vec{b}|}$$
Or,Â $$\frac{1}{|\vec{b}|}$$($$\vec{a}$$.$$\vec{b}$$)

• IfÂ $$\theta$$ = 0, then the projection vector ofÂ $$\vec{AB}$$ isÂ $$\vec{a}$$ itself. Also, ifÂ $$\theta$$ =Â $$\pi$$, then the projection vector ofÂ $$\vec{AB}$$ isÂ $$\vec{BA}$$.
• IfÂ $$\theta$$ = $$\frac{\pi}{2}$$ orÂ $$\theta$$ = $$\frac{3\pi}{2}$$, then the projection vector ofÂ $$\vec{AB}$$ is zero.

### Remark

IfÂ $$\alpha$$,Â $$\beta$$, andÂ $$\gamma$$ are the direction angles of the vectorÂ $$\vec{a}$$ = a1$$\hat{i}$$ + a2$$\hat{j}$$ + a3$$\hat{k}$$, then its direction cosines are,

$$\cos{\alpha}$$ =Â $$\frac{\vec{a}.\hat{i}}{|\vec{a}||\hat{i}|}$$ =Â $$\frac{a_1}{|\vec{a}|}$$

Similarly, $$\cos{\beta}$$ = $$\frac{a_2}{|\vec{a}|}$$
And,Â $$\cos{\gamma}$$ = $$\frac{a_3}{|\vec{a}|}$$

It is important to note that, |$$\vec{a}$$|$$\cos{\alpha}$$,Â |$$\vec{a}$$|$$\cos{\beta}$$, andÂ |$$\vec{a}$$|$$\cos{\gamma}$$ are the projections of $$\vec{a}$$ along the OX, OY, and OZ respectively. Or, the scalar components a1, a2, and a3 of the vector $$\vec{a}$$ are the projections of $$\vec{a}$$ along the x, y, and z-axis respectively.

Lastly, ifÂ $$\vec{a}$$ is a unit vector, then the vector can be expressed as

$$\vec{a}$$ =Â $$\cos{\alpha}$$$$\hat{i}$$ +Â $$\cos{\beta}$$$$\hat{j}$$ +Â $$\cos{\gamma}$$$$\hat{k}$$

Let’s look at an example to understand the angle between two vectors well.

### Example

Question: Find the angle between two vectorsÂ $$\vec{a}$$ andÂ $$\vec{b}$$ with magnitudes 1 and 2 respectively. Also, given $$\vec{a}$$.$$\vec{b}$$ = 1.

Solution: We know that, $$\vec{a}$$.$$\vec{b}$$ = 1
|$$\vec{a}$$| = 2 and |$$\vec{b}$$| = 1
Therefore, the angle between two vectorsÂ $$\theta$$ is,
$$\theta$$ = cos-1 ($$\frac{\vec{a}.\vec{b}}{|\vec{a}||\vec{b}|}$$) = cos-1 ($$\frac{1}{2}$$) =Â $$\frac{\pi}{3}$$

## More Solved Examples for You

Question 1: Find the angle between two vectorsÂ $$\hat{i}$$ – 2$$\hat{j}$$ + 3$$\hat{k}$$ and 3$$\hat{i}$$ – 2$$\hat{j}$$ + $$\hat{k}$$.

Answer : Let, $$\vec{a}$$ =Â $$\hat{i}$$ – 2$$\hat{j}$$ + 3$$\hat{k}$$ and $$\vec{b}$$ =Â 3$$\hat{i}$$ – 2$$\hat{j}$$ + $$\hat{k}$$

Now, $$\vec{a}$$.$$\vec{b}$$ = ($$\hat{i}$$ – 2$$\hat{j}$$ + 3$$\hat{k}$$).(3$$\hat{i}$$ – 2$$\hat{j}$$ + $$\hat{k}$$)

Now, using properties of multiplication of vectors, we get $$\vec{a}$$.$$\vec{b}$$ = 1 x 3 + (- 2) x (- 2) + 3 x 1 = 10.

Next, the magnitude ofÂ $$\vec{a}$$ is, |$$\vec{a}$$| =Â $$\sqrt{1^2 + (-2)^2 + 3^2}$$ =Â $$\sqrt{14}$$

And, the magnitude ofÂ $$\vec{b}$$ is, |$$\vec{b}$$| =Â $$\sqrt{3^2 + (-2)^2 + 1^2}$$ =Â $$\sqrt{14}$$

We know that, $$\vec{a}$$.$$\vec{b}$$ =Â |$$\vec{a}$$||$$\vec{b}$$|$$\cos{\theta}$$

Substituting the values, we get
10 =Â $$\sqrt{14}$$ xÂ $$\sqrt{14}$$Â $$\cos{\theta}$$
Or, $$\cos{\theta}$$ =Â $$\frac{10}{14}$$ =Â $$\frac{5}{7}$$
Therefore, $$\theta$$ = cos-1 ($$\frac{5}{7}$$)

Question 2: How to find the angle between two vectors with the use of the cross product?

Answer: Firstly, the cross product of the 2 vectors a and b represented by a x b is the vector ab sin Î¸ n, here, a and b are the magnitudes for the vector a and vector b, Î¸ is the angle measured from a to b in the anti-clockwise direction and n here is said to be the unit vector, perpendicular to â€˜aâ€™ as well asâ€˜bâ€™.

Question 3: What is the formula for the angle between two vectors?

Answer: A simpler way to find out the angle between 2 vectors is the dot product formula. Here, (A.B =|A|x|B|xcos(X)) let vector â€˜Aâ€™ be â€˜2iâ€™ and vector â€˜Bâ€™ be â€˜3i+4jâ€™. According to the question, â€˜Xâ€™ is the angle between the vectors. Therefore, A.B = |A|x|B|xcos(X) = 2i.

Question 4: What is the angle that forms between 2 equal vectors?

Answer: That angle is 180Â° – 60Â° = 120Â°. So, when 2 vectors of the same magnitude form a vector of the same magnitude, then the angle between the 2 vectors is 120Â°.

Question 5: How to find out if 2 vectors are parallel?

Answer: The 2 vectors A and B are parallel only if they are scalar multiples of each other.

Share with friends

## Customize your course in 30 seconds

##### Which class are you in?
5th
6th
7th
8th
9th
10th
11th
12th
Get ready for all-new Live Classes!
Now learn Live with India's best teachers. Join courses with the best schedule and enjoy fun and interactive classes.
Ashhar Firdausi
IIT Roorkee
Biology
Dr. Nazma Shaik
VTU
Chemistry
Gaurav Tiwari
APJAKTU
Physics
Get Started