Steply

Projection of (5, 1) onto (2, 0)

Step by step, with the reason for every step · Projection onto a vector · Linear Algebra

Step by step

The question

Question: find the projection of (5, 1) onto (2, 0).

v = [5; 1], s = [2; 0]

The projection of v onto s is the part of v that goes along s.

Think of the shadow of v on the line through s, with the light straight above.

projection: the part of v along s
like the shadow of v on the line of s

1 Write the rule

The rule: v dot s, over s dot s, times s.

The fraction is one number: how much of s we need.

proj = v • ss • s × s

2 Work out the number

The top: v • s, matching entries multiplied and added.

v • s = 5 × 2 + 1 × 0 = 10 + 0 = 10

The bottom: s • s.

s • s = 2 × 2 + 0 × 0 = 4 + 0 = 4

So the number is 10/4, made simpler: 5/2.

number = 104 = 52

Careful!

The bottom is s dot s, the vector we project onto.

Not v dot v.

Careful: the bottom is s • s, not v • v

3 Times s

Times s: every entry times 5/2.

So the projection is (5, 0).

proj = 52 × [2; 0] = [5; 0]

4 Draw it

The line through s.

s goes to (2, 0).

v goes to (5, 1).

From the tip of v, straight down onto the line: at a right angle.

The projection ends where it lands: (5, 0).

5 Check

Let's check: the leftover, v minus the projection, must be at a right angle to s.

v − proj = [5; 1] − [5; 0]
v − proj = [5 − 5; 1 − 0]
v − proj = [0; 1]

Its dot product with s is 0.

So the leftover is at a right angle to s: the answer is right!

(v − proj) • s = 0 × 2 + 1 × 0 = 0 + 0 = 0

Let's look back.

First: write the rule.

Then: work out the number.

Then: times s.

Then: draw it.

Last: check.

Answer
proj = 52 × [2; 0] = [5; 0]

Your turn

Try this one yourself, then check:

Project [3; 1] onto [2; 0]
Show the answer
[3; 0]

More from Projection onto a vector

The whole lesson: Projection onto a vector →