Lesson 6 of 8 · 18 min

Scalar and vector projections

Find how much of one vector lies along another, as a signed length (scalar projection) and as a vector (vector projection), and split a vector into parts parallel and perpendicular to a direction.

What you will be able to do

  • Calculate the scalar projection of a∼\tvec{a} on b∼\tvec{b}, a∼⋅b∼^\tvec{a} \cdot \hat{\tvec{b}}, and interpret its sign.
  • Calculate the vector projection of a∼\tvec{a} on b∼\tvec{b}, (a∼⋅b∼b∼⋅b∼)b∼\left(\dfrac{\tvec{a} \cdot \tvec{b}}{\tvec{b} \cdot \tvec{b}}\right)\tvec{b}.
  • Write a∼\tvec{a} as the sum of a vector parallel to b∼\tvec{b} and a vector perpendicular to b∼\tvec{b}, and use this to find perpendicular distances.

Hold a pencil above your desk with a light shining straight down. Its shadow is the part of the pencil that lies along the desk. A projection is that shadow: the part of one vector that lies along the direction of another.

Interactive

The shadow of a on b

The projection of a∼\tvec{a} on b∼\tvec{b} is drawn along the line of b∼\tvec{b}. Drag a∼\tvec{a} so the angle is obtuse: which way does the projection point now?

Definition

Scalar projection

The scalar projection of a∼\tvec{a} on b∼\tvec{b} is the signed length of the shadow:

∣a∼∣cos⁡(θ)=a∼⋅b∼^=a∼⋅b∼∣b∼∣.|\tvec{a}|\cos(\theta) = \tvec{a} \cdot \hat{\tvec{b}} = \frac{\tvec{a} \cdot \tvec{b}}{|\tvec{b}|}.

For non-zero vectors, it is positive when 0∘≤θ<90∘0^\circ \le \theta < 90^\circ (the shadow points along b∼\tvec{b}), zero when a∼⊥b∼\tvec{a} \perp \tvec{b}, and negative when 90∘<θ≤180∘90^\circ < \theta \le 180^\circ (the shadow points against b∼\tvec{b}).

Find the exact scalar projection of a∼=6i^−2j^\tvec{a} = 6\hat{\mathbf{i}} - 2\hat{\mathbf{j}} on b∼=i^+j^\tvec{b} = \hat{\mathbf{i}} + \hat{\mathbf{j}}.

Reads asYour answer shows here as maths.

Definition

Vector projection

The vector projection of a∼\tvec{a} on b∼\tvec{b} is the shadow as a vector: the scalar projection times the unit vector b∼^\hat{\tvec{b}}.

∣a∼∣cos⁡(θ) b∼^=(a∼⋅b∼^)b∼^=(a∼⋅b∼b∼⋅b∼)b∼.|\tvec{a}|\cos(\theta)\,\hat{\tvec{b}} = (\tvec{a} \cdot \hat{\tvec{b}})\hat{\tvec{b}} = \left(\frac{\tvec{a} \cdot \tvec{b}}{\tvec{b} \cdot \tvec{b}}\right)\tvec{b}.

The last form is the easiest to use: one dot product on top, ∣b∼∣2|\tvec{b}|^2 underneath, and no surds.

Where the last form comes from

b∼^=b∼∣b∼∣\hat{\tvec{b}} = \dfrac{\tvec{b}}{|\tvec{b}|}, so

(a∼⋅b∼^)b∼^=(a∼⋅b∼∣b∼∣)b∼∣b∼∣=a∼⋅b∼∣b∼∣2 b∼=(a∼⋅b∼b∼⋅b∼)b∼,(\tvec{a} \cdot \hat{\tvec{b}})\hat{\tvec{b}} = \left(\tvec{a} \cdot \frac{\tvec{b}}{|\tvec{b}|}\right)\frac{\tvec{b}}{|\tvec{b}|} = \frac{\tvec{a} \cdot \tvec{b}}{|\tvec{b}|^2}\,\tvec{b} = \left(\frac{\tvec{a} \cdot \tvec{b}}{\tvec{b} \cdot \tvec{b}}\right)\tvec{b},

using ∣b∼∣2=b∼⋅b∼|\tvec{b}|^2 = \tvec{b} \cdot \tvec{b}.

a∼\tvec{a} splits into a part along b∼\tvec{b} (the vector projection) and a part perpendicular to b∼\tvec{b}.

Worked example

Projections of a∼\tvec{a} on b∼\tvec{b} and the perpendicular part

  • Complex familiar
  • Technology free

Let a∼=5i^+j^\tvec{a} = 5\hat{\mathbf{i}} + \hat{\mathbf{j}} and b∼=3i^+4j^\tvec{b} = 3\hat{\mathbf{i}} + 4\hat{\mathbf{j}}.

(a) Find the scalar projection of a∼\tvec{a} on b∼\tvec{b}.

(b) Find the vector projection of a∼\tvec{a} on b∼\tvec{b}.

(c) Write a∼\tvec{a} as the sum of a vector parallel to b∼\tvec{b} and a vector perpendicular to b∼\tvec{b}.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Scalar projection =a∼⋅b∼∣b∼∣= \dfrac{\tvec{a} \cdot \tvec{b}}{|\tvec{b}|}.

  2. Vector projection =(a∼⋅b∼b∼⋅b∼)b∼= \left(\dfrac{\tvec{a} \cdot \tvec{b}}{\tvec{b} \cdot \tvec{b}}\right)\tvec{b}.

  3. Perpendicular part =a∼−= \tvec{a} - vector projection; check its dot product with b∼\tvec{b} is 0.

Watch out for

  • Dividing by ∣a∼∣|\tvec{a}| instead of ∣b∼∣|\tvec{b}|.

  • Giving the scalar projection when the vector projection is asked for, or the reverse.

Find the vector projection of a∼=(34)\tvec{a} = \begin{pmatrix} 3 \\ 4 \end{pmatrix} on b∼=(2−1)\tvec{b} = \begin{pmatrix} 2 \\ -1 \end{pmatrix}.

Key idea

Splitting a vector into two perpendicular parts

a∼=(a∼⋅b∼b∼⋅b∼)b∼⏟parallel to b∼+[a∼−(a∼⋅b∼b∼⋅b∼)b∼]⏟perpendicular to b∼\tvec{a} = \underbrace{\left(\frac{\tvec{a} \cdot \tvec{b}}{\tvec{b} \cdot \tvec{b}}\right)\tvec{b}}_{\text{parallel to } \tvec{b}} + \underbrace{\left[\tvec{a} - \left(\frac{\tvec{a} \cdot \tvec{b}}{\tvec{b} \cdot \tvec{b}}\right)\tvec{b}\right]}_{\text{perpendicular to } \tvec{b}}

The magnitude of the perpendicular part is the shortest distance from the tip of a∼\tvec{a} to the line through the origin in the direction of b∼\tvec{b}. Check it by dotting with b∼\tvec{b}: you should get 0.

Worked example

The shortest distance from a point to a line

  • Complex unfamiliar
  • Technology free

A straight path passes through A(−1,1)A(-1, 1) in the direction of d∼=2i^+j^\tvec{d} = 2\hat{\mathbf{i}} + \hat{\mathbf{j}}. A drinking fountain is at P(4,6)P(4, 6). Units are metres. Find the point FF on the path closest to the fountain and the shortest distance from the path to the fountain.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Join a known point on the line to the outside point.

  2. Vector projection onto the direction gives the foot of the perpendicular.

  3. The perpendicular part gives the shortest distance; check with a dot product.

Watch out for

  • Taking ∣AP→∣=52|\overrightarrow{AP}| = 5\sqrt{2} as the shortest distance: that is the distance to AA, not to the path.

Common mistake

Which is which

The scalar projection is a number with ∣b∼∣|\tvec{b}| underneath. The vector projection is a vector with ∣b∼∣2|\tvec{b}|^2 underneath, multiplied by b∼\tvec{b}. And "the projection of a∼\tvec{a} on b∼\tvec{b}" is along b∼\tvec{b}: swapping the vectors changes the answer.

Tip

Reasonableness

A shadow is never longer than the object: ∣scalar projection∣≤∣a∼∣|\text{scalar projection}| \le |\tvec{a}|, with equality only when a∼\tvec{a} and b∼\tvec{b} are parallel.

Summary

  • Scalar projection of a∼\tvec{a} on b∼\tvec{b}: a∼⋅b∼^=a∼⋅b∼∣b∼∣\tvec{a} \cdot \hat{\tvec{b}} = \dfrac{\tvec{a} \cdot \tvec{b}}{|\tvec{b}|}, a signed length.

  • Vector projection of a∼\tvec{a} on b∼\tvec{b}: (a∼⋅b∼b∼⋅b∼)b∼\left(\dfrac{\tvec{a} \cdot \tvec{b}}{\tvec{b} \cdot \tvec{b}}\right)\tvec{b}, a vector along b∼\tvec{b}.

  • The perpendicular part is a∼\tvec{a} minus its vector projection; its magnitude is a shortest distance.

  • Negative scalar projection means the angle between the vectors is obtuse or straight.

Finished the lesson?

Try the 2 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 6 of 80% read

Save your progress with a free account