Step by step
The question
Question: find the projection of (4, 1, 1) onto (1, 1, 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.
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.
2 Work out the number
The top: v • s, matching entries multiplied and added.
The bottom: s • s.
So the number is 5/2.
Careful!
The bottom is s dot s, the vector we project onto.
Not v dot v.
3 Times s
Times s: every entry times 5/2.
So the projection is (5/2, 5/2, 0).
4 Check
Let's check: the leftover, v minus the projection, must be at a right angle to s.
Its dot product with s is 0.
So the leftover is at a right angle to s: the answer is right!
Let's look back.
First: write the rule.
Then: work out the number.
Then: times s.
Last: check.