M5.6.4 Chapter 4
The scalar product
How can you find the angle between two arrows from their numbers alone?
Your guess
Pick one before you read on. It is fine to be wrong.
By the end you can
- Find the angle between two vectors with the scalar product
- Show that two vectors are perpendicular
There are two ways to multiply vectors, and this chapter has the first. The scalar product of two vectors a and b is written a · b and said "a dot b". Multiply the matching parts and add the results. In a plane, a · b = a₁b₁ + a₂b₂. In space, there is a third term, a₃b₃. The answer is a single number, a scalar, not a vector.
Worked example
Find a · b for a = (3, 1) and b = (1, 2), and find (2, −1, 2) · (1, 2, 2).
- Multiply the matching parts: 3 × 1 = 3 and 1 × 2 = 2.
- Add them: 3 + 2 = 5. So a · b = 5.
- In space, there are three terms: 2 + (−2) + 4.
- The total is 4. So (2, −1, 2) · (1, 2, 2) = 4.
Answer: 5 and 4
The scalar product has a second form that gives angles. Draw a and b from one point. Let θ be the angle between them, with 0° ≤ θ ≤ 180°. Then a · b = |a||b| cos θ. Here is why. The two vectors and the vector a − b make a triangle. The cosine rule for it says |a − b|² = |a|² + |b|² − 2|a||b| cos θ.
Now work out |a − b|² a second way, from the parts: (a₁ − b₁)² + (a₂ − b₂)². Multiplying out, this is a₁² + a₂² + b₁² + b₂² − 2(a₁b₁ + a₂b₂), which is |a|² + |b|² − 2(a · b). The two results agree when 2|a||b| cos θ = 2(a · b). So a · b = |a||b| cos θ, and cos θ = (a · b) ÷ (|a||b|).
Worked example
Find the angle between a = (3, 1) and b = (1, 2).
- a · b = 3 × 1 + 1 × 2 = 5.
- |a| = √(3² + 1²) = √10, and |b| = √(1² + 2²) = √5.
- cos θ = 5 ÷ (√10 × √5) = 5 ÷ √50 ≈ 0.7071.
- θ = cos⁻¹(0.7071) ≈ 45°.
Answer: 45°
Always draw both vectors from the same point before you read an angle. If you put b at the end of a, the angle at the joint is not the angle between them. It is 180° minus the angle between them.
Worked example
Find the angle between a = (2, −1, 2) and b = (1, 2, 2).
- a · b = 2 + (−2) + 4 = 4.
- |a| = √(2² + (−1)² + 2²) = √9 = 3. Also |b| = √9 = 3.
- cos θ = 4 ÷ (3 × 3) = 4 ÷ 9.
- θ = cos⁻¹(4 ÷ 9) ≈ 63.6°.
Answer: 63.6°
Now look at the sign of a · b. Since |a| and |b| are positive, the sign of a · b is the sign of cos θ. A positive scalar product means an acute angle, below 90°. A negative one means an obtuse angle, above 90°. And a · b = 0 means cos θ = 0, so θ = 90°. Two non-zero vectors are perpendicular exactly when a · b = 0.
Worked example
Find k so that (k, 3, 2) and (4, −2, −1) are perpendicular.
- The vectors are perpendicular when their scalar product is 0.
- (k, 3, 2) · (4, −2, −1) = 4k + 3 × (−2) + 2 × (−1).
- That is 4k − 6 − 2, which is 4k − 8.
- Set it equal to 0: 4k = 8.
- So k = 2.
Answer: k = 2
The scalar product has rules that you can check with numbers. It does not matter in which order: a · b = b · a. It spreads over a sum: a · (b + c) = a · b + a · c. A number can move in or out: (ma) · b = m(a · b). And a · a = |a|², because the angle between a vector and itself is 0° and cos 0° = 1.
The same idea gives the length of a shadow. Shine a torch straight down on a table. The shadow of the vector b on the line of a has length |b| cos θ. Since a · b = |a| × |b| cos θ, the shadow is (a · b) ÷ |a|. This length is the projection of b on a.
Worked example
Find the length of the shadow of b = (2, 3) on the line of a = (4, 1).
- a · b = 4 × 2 + 1 × 3 = 11.
- |a| = √(4² + 1²) = √17, which is 4.123.
- The shadow is (a · b) ÷ |a| = 11 ÷ 4.123 ≈ 2.67.
Answer: 2.67
See it three ways
With things
Hold a pencil at a slant above a table and shine a torch straight down on it from above. Its shadow lies on the table. The more tilted the pencil is, the shorter the shadow, and a pencil standing upright has almost no shadow.
As a picture
In words
The scalar product is the length of a times the length of the shadow of b on a. It is zero when the shadow has no length, which happens when the vectors are at right angles.
In symbols
a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ.
Try it
Check the angle with a protractor
You need: squared paper, a ruler, a protractor, a pencil.
- Mark a point O near the left of the paper. Draw an arrow from O, 3 squares across and 1 up. Call it a.
- From O, draw a second arrow, 1 square across and 2 up. Call it b.
- Measure the angle between the two arrows with the protractor.
- Work out a · b, |a| and |b|, and then cos⁻¹ of a · b ÷ (|a||b|) with a calculator. Compare.
What you will see: The protractor reads 45°, and so does the calculation. The numbers alone were enough to find the angle.
A wrong idea many people have
The scalar product of two vectors is a vector.
Why it feels right: You are combining two vectors, and the sum or difference of two vectors is a vector.
The test that breaks it: Work out (3, 1) · (1, 2). You get 3 × 1 + 1 × 2 = 5. That is one number, with no direction.
What is true: The scalar product takes two vectors and gives a scalar. That is why it has "scalar" in its name. The answer has a size and a sign, and no direction.
A wrong idea many people have
To find the angle between two vectors, put one at the end of the other.
Why it feels right: This is how you add vectors, so the picture of two arrows joined end to end feels natural.
The test that breaks it: Take a = (1, 0) and b = (1, 1). They are 45° apart when drawn from one point. Joined head to tail, the path goes 1 across and then 1 across and 1 up, and the angle inside the corner is 135°, not 45°.
What is true: The angle between two vectors is measured with their tails together, as in the formula. If you join them head to tail, the angle at the corner is 180° minus the angle between them.
Key words
- scalar product
- a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ, a single number. Also called the dot product.
- perpendicular
- at right angles. Two non-zero vectors are perpendicular when their scalar product is 0.
- projection
- the length of the shadow of one vector on the line of another, (a · b) ÷ |a|.
- acute
- an angle below 90°, which has a positive scalar product.
- obtuse
- an angle between 90° and 180°, which has a negative scalar product.
Back to your guess
The answer is C: The vectors (2, 3) and (3, −2) are at right angles.
Multiply the across parts and the up parts, and add: 2 × 3 + 3 × (−2) = 0. A total of 0 is the sign of a right angle. This sum is called the scalar product, and it gives angles from numbers alone.
Check yourself
Try each one before you look. A wrong answer tells you where to go next.
What is (2, −3) · (4, 5)?
See the answer
−7
2 × 4 + (−3) × 5 = 8 + (−15) = −7.
- If you chose A: You multiplied the matching parts but did not add them. The scalar product is a single number. Read this page again.
- If you chose C: You lost the minus sign. The two products are 8 and −15. The second is larger in size, so the total is negative. Read this page again.
- If you chose D: You added all four numbers. Multiply the matching parts first: first with first, second with second. Read this page again.
What is the angle between (4, 3) and (1, 2), to 1 decimal place?
See the answer
26.6°
a · b = 10, |a| = 5 and |b| = √5 ≈ 2.236. cos θ = 10 ÷ (5 × 2.236) ≈ 0.8944, so θ ≈ 26.6°.
- If you chose B: That is 90° minus the angle. You may have used sin instead of cos. Use cos θ = (a · b) ÷ (|a||b|). Read this page again.
- If you chose C: That is cos θ. Take cos⁻¹ of it to get the angle. Read this page again.
- If you chose D: The scalar product is not the angle. Divide it by |a||b|, and then take cos⁻¹. Read this page again.
Which pair of vectors is perpendicular?
See the answer
(6, −4) and (2, 3)
(6, −4) · (2, 3) = 12 + (−12) = 0. A scalar product of 0 means the vectors are perpendicular. The other three pairs have scalar products −1, 20, 12.
- If you chose A: The scalar product is −1, not 0, so these are not at right angles. Read this page again.
- If you chose B: The scalar product is 20, not 0, so these are not at right angles. Read this page again.
- If you chose C: The scalar product is 12, not 0, so these are not at right angles. Read this page again.
The picture shows a = (4, 1) and b = (−2, 3) drawn from one point. Is a · b positive, zero or negative?
See the answer
Negative
The angle θ is obtuse, and cos θ is negative for an obtuse angle. By the numbers, a · b = 4 × (−2) + 1 × 3 = −5.
- If you chose A: A positive scalar product goes with an angle below 90°. This angle is larger than a right angle. Read this page again.
- If you chose B: A scalar product of 0 goes with exactly 90°. The marked angle is larger than that. Read this page again.
From an earlier chapter
What is the length of the vector (2, −3, 6)?
Find (5, −2) · (3, 4).
See the answer
7
5 × 3 + (−2) × 4 = 15 + (−8) = 7.
The vectors (k, 6) and (3, −2) are perpendicular. Find k.
See the answer
4
The scalar product must be 0: 3k + 6 × (−2) = 3k − 12 = 0. So 3k = 12 and k = 4.
Find the angle between (2, 3, 6) and (1, −2, 2), in degrees to 1 decimal place.
See the answer
67.6
a · b = 2 + (−6) + 12 = 8. |a| = 7 and |b| = 3. cos θ = 8 ÷ 21, so θ ≈ 67.6°.
a · b = −8, |a| = 4 and |b| = 4. What is the angle between a and b?
See the answer
120°
cos θ = −8 ÷ (4 × 4) = −0.5. The angle with cosine −0.5 is 120°.
- If you chose A: That is the angle for cos θ = +0.5. The scalar product is negative, so cos θ is negative and the angle is obtuse. Read this page again.
- If you chose C: The cosine of this angle is not −0.5. Find cos θ = (a · b) ÷ (|a||b|), and then take cos⁻¹. Read this page again.
Keep it
Copy this into your exercise book.
a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ. cos θ = (a · b) ÷ (|a||b|). a · b = 0 means perpendicular. Positive means acute, negative means obtuse. Tails together.
Draw: Two arrows from one point with the angle θ between them, and a dashed shadow of one on the other.