Step by step
The question
Question: find the dot product of (1, 2, 3) and (4, −5, 6).
u = [1; 2; 3], v = [4; −5; 6]
The dot product u dot v: multiply matching entries, top with top and so on.
Then add them all.
The answer is one number.
u • v: matching entries multiplied, then added
1 Multiply matching entries
1 × 4 + 2 × (−5) + 3 × 6.
u • v = 1 × 4 + 2 × (−5) + 3 × 6
We work out each times.
u • v = 4 − 10 + 18
2 Add them
Then we add: u • v = 12.
u • v = 12
Careful!
The dot product is one number, not a vector.
The products are added together.
Careful: one number, not a vector
3 Check
Let's check the other way round: v dot u.
The same products, so the same number.
v • u = 4 × 1 + (−5) × 2 + 6 × 3
= 4 − 10 + 18 = 12
We get 12 again.
So the answer is right!
Let's look back.
First: multiply matching entries.
Then: add them.
Last: check.
Answer
Careful: one number, not a vector