11.9 The Dot Product and Projection

A product of two vectors returning a number. Defines it componentwise, establishes its algebraic properties, then proves via the Law of Cosines that it equals the product of the magnitudes times the cosine of the angle between them. From that follow the angle formula, the test for perpendicularity, the projection of one vector onto another with its unique parallel-plus-perpendicular decomposition, and the definition of work as a dot product of force and displacement.

Subject: Trigonometry · 65 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Lesson 11.9 The Dot Product and Projection

Title

Trigonometry · Chapter 11 — Applications of Trigonometry

§11.9 The Dot Product and Projection, pp. 1034-1043

2. By the end of this lesson you can

Objectives

Five outcomes, and the third is the one used most often in practice.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1034-1043 — the pages these objectives are drawn from

3. A product that has been missing

Warm-up

Vectors can be added, subtracted and scaled, but two vectors have never been multiplied together.

Discussion prompt

Suppose someone defines the product of two vectors by multiplying matching components. What would go wrong, and what would be lost?

Hint: What geometric question would that answer?

Answer:

Nothing breaks algebraically — the operation is perfectly well-defined. But it answers no geometric question. The result depends on the coordinate axes chosen, and rotating the picture changes the answer, so it describes the labelling rather than the vectors.

What is wanted is an operation whose answer is the same however the axes are turned, because only such a quantity can describe a genuine relationship between the two vectors.

The dot product is that operation. It is defined componentwise, looks entirely arithmetic, and turns out to compute the cosine of the angle between the two vectors — which is why nobody bothers with the componentwise product.

4. Multiply matching components and add

Concept

The dot product of two vectors is the sum of the products of their corresponding components. Two vectors go in and a single number comes out.

dot product — For two vectors given in component form, the sum of the products of corresponding components. Also called the scalar product, because the result is a scalar rather than a vector.

\[ \vec{v} \cdot \vec{w} = v_1w_1 + v_2w_2 \]

The notation matters: a raised dot for this operation, distinct from the multiplication of a scalar by a vector, which uses no symbol at all.

Figure (svg): The dot product computed from two component pairs, showing that two vectors go in and a single number comes out

Multiply matching components and add. The output is not a vector, and that is the whole point of the operation.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1034-1034

5. The definition and its properties

Section

Section 1

6. It behaves like multiplication, up to a point

Concept

The dot product is commutative, distributes over vector addition, and pulls scalars out. It also relates to the magnitude: a vector dotted with itself gives the square of its length.

Theorem 11.22 — The dot product is commutative; it distributes over vector addition; scalars may be moved freely across it; and a vector dotted with itself equals the square of its magnitude.

\[ \vec{v} \cdot \vec{v} = \|\vec{v}\|^2 \]

There is deliberately no associative property, and there cannot be: the dot product of three vectors is not even a well-formed expression, since the first product returns a number and a number cannot be dotted with a vector.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1034-1035

7. Two vectors in, one number out

Picture it

The output type is the whole character of the operation.

Figure (svg): The dot product computed from two component pairs, showing that two vectors go in and a single number comes out

Multiply matching components and add. The output is not a vector, and that is the whole point of the operation.

Because the answer is a scalar, the dot product can be compared, signed, and used in the middle of ordinary algebra — which is exactly what makes it useful.

8. Worked example: computing and checking

Worked example

The book's introductory example, and the self-dot property.

\[ \text{For } \vec{v} = \langle 3,4\rangle \text{ and } \vec{w} = \langle 1,-2\rangle, \text{ find } \vec{v}\cdot\vec{w} \text{ and } \vec{v}\cdot\vec{v}. \]

Multiply the first components

Why: Three times 1.

\[ 3 \]

Multiply the second components

Why: Four times negative 2.

\[ -8 \]

Add them

Why: The dot product.

\[ -5 \]

Now dot v with itself

Why: Nine plus 16.

\[ 25 \]

Figure (svg): The solution to Worked example computing and checking shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \vec{v}\cdot\vec{w} = -5, \qquad \vec{v}\cdot\vec{v} = 25 = \|\vec{v}\|^2 \]

Verify: check the self-dot against the magnitude

Why: The magnitude of v is 5, and 5 squared is 25 — matching the self-dot exactly. That is the fourth property, and it means the magnitude can always be recovered from the dot product without a separate formula.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1034-1035

9. Finish the dot product

Faded example

Compute the dot product of the vectors with components -2 and 7, and 5 and 3.

Fill in the blanks

(-2)(5) + (7)(3) = -10 + 21 = 11

Why: Matching components are multiplied and the two products added. The result is positive, which by the geometric theorem means the angle between the two vectors is acute — a fact available before any angle is computed.

10. Worked example: expanding like ordinary algebra

Worked example

Example 11.9.1. The identity that the geometric theorem needs.

\[ \text{Prove } \|\vec{v}-\vec{w}\|^2 = \|\vec{v}\|^2 - 2(\vec{v}\cdot\vec{w}) + \|\vec{w}\|^2. \]

Rewrite the left side as a self-dot

Why: By the fourth property.

\[ (v - w) d o t(v - w) \]

Distribute

Why: Exactly as with real numbers.

Use commutativity on the middle two

Why: They are equal.

\[ -2(v d o t w) \]

Rewrite the outer self-dots

Why: As squared magnitudes.

Figure (svg): The solution to Worked example expanding like ordinary algebra shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ (\vec{v}-\vec{w})\cdot(\vec{v}-\vec{w}) = \vec{v}\cdot\vec{v} - 2(\vec{v}\cdot\vec{w}) + \vec{w}\cdot\vec{w} \]

Verify: notice the resemblance

Why: The result looks exactly like the expansion of a difference squared for real numbers, and for the same reason: the properties used were commutativity, distributivity and scalar handling, all of which the dot product shares with ordinary multiplication.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1035-1035

11. Trap: dotting three vectors

Trap

The trap

\[ \vec{u} \cdot \vec{v} \cdot \vec{w} \]

Chain the operation as with ordinary multiplication

Why: Real multiplication is associative, so the same should apply.

But the first dot product produces a number, and a number cannot be dotted with a vector. The expression is not merely ambiguous; it is meaningless.

The fix

\[ (\vec{u} \cdot \vec{v})\,\vec{w} \quad \text{or} \quad \vec{u}\,(\vec{v} \cdot \vec{w}) \]

Bracket it so the result is a scalar times a vector

Why: Both readings are legal and they are different vectors.

Because the two readings differ, there is no associative property to appeal to, and the brackets are compulsory. Checking the type of every subexpression — scalar or vector — catches this immediately.

12. Scalar or vector?

Sorting

The dot product returns a number; scalar multiplication returns a vector.

Sort into buckets

Sort each expression.

A scalar
v dot w; v dot v
A vector
(v dot w) times u; 3v plus w
sca
Both are dot products and therefore numbers. The second of them is also the square of a magnitude, by the fourth property.
vec
In the second expression a number multiplies a vector, and in the fourth two vectors are combined. Both results are vectors.

13. Predict before you compute

Prediction

A vector is dotted with itself.

Predict first

What must the result be?

  • Zero
  • The magnitude
  • The square of the magnitude
  • It depends on the vector

Correct: The square of the magnitude.

Why: Dotting a vector with itself multiplies each component by itself and adds, which is precisely the expression under the square root in the magnitude formula. So the self-dot is the magnitude squared. It follows that a self-dot is never negative, and is zero only for the zero vector.

14. Why is there no associative property?

Socratic

Multiplication of real numbers is associative; the dot product is not.

Discussion prompt

Explain why the question does not even arise here.

Hint: What type is the result of a dot product?

Answer:

Associativity would compare two ways of bracketing a triple product. But the dot product of two vectors is a number, and there is no operation dotting a number with a vector — so one of the two bracketings is not even a legal expression.

What can be written is a scalar times a vector, in two different ways, and those give genuinely different vectors: one points along the third vector and the other along the first.

The lesson generalises: an operation's properties are constrained by what types it accepts and returns. Before asking whether a rule holds, check whether both sides are even well-formed — and here they are not.

15. The geometric interpretation

Section

Section 2

16. The definition secretly knows the angle

Concept

Comparing the algebraic expansion of the squared difference against the Law of Cosines for the triangle the two vectors form gives the theorem: the dot product equals the product of the magnitudes times the cosine of the angle between them.

Theorem 11.23 — For non-zero vectors, the dot product equals the product of their magnitudes times the cosine of the angle between them, where that angle is taken between 0 and pi.

\[ \vec{v}\cdot\vec{w} = \|\vec{v}\|\,\|\vec{w}\|\cos(\theta) \]

The angle is required to lie between 0 and pi, which is exactly the range of the arccosine — so solving for the angle gives a formula with no case analysis and no ambiguity.

Figure (svg): Two vectors drawn from a common point with the angle between them marked, alongside the formula equating the dot product to the product of the magnitudes times the cosine of that angle

A purely arithmetic definition turns out to encode the angle between the two vectors. The Law of Cosines is what connects them.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1035-1036

17. What the sign reports

Picture it

Positive, zero, negative — acute, right, obtuse.

Figure (svg): Three pairs of vectors showing a positive dot product for an acute angle, zero for a right angle, and negative for an obtuse angle

One number, three regimes. The sign alone answers whether two directions are pulling together or against each other.

Because the magnitudes are always positive, the dot product's sign is entirely the cosine's sign, so it classifies the angle without any division.

18. Worked example: proving the theorem

Worked example

Two expressions for the same squared length.

\[ \text{Prove } \vec{v}\cdot\vec{w} = \|\vec{v}\|\,\|\vec{w}\|\cos\theta \text{ for } 0 < \theta < \pi. \]

Form the triangle

Why: Its sides are the two vectors and their difference.

Apply the Law of Cosines

Why: Two sides and the included angle.

\[ | | v - w | | ^{2} = | | v | | ^{2} + | | w | | ^{2} - 2 | | v | | | | w | | \cos \]

Apply the algebraic identity

Why: From the previous section.

\[ | | v - w | | ^{2} = | | v | | ^{2} - 2(v d o t w) + | | w | | ^{2} \]

Equate and cancel

Why: The squared magnitudes drop out.

Figure (svg): The solution to Worked example proving the theorem shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ -2\|\vec{v}\|\,\|\vec{w}\|\cos\theta = -2(\vec{v}\cdot\vec{w}) \]

Verify: check the degenerate cases

Why: For an angle of 0 the two vectors are positive multiples of one another and the dot product is the product of the magnitudes, matching a cosine of 1. For an angle of pi the multiple is negative and the dot product is minus that product, matching a cosine of negative 1. The book proves those separately, and both agree.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1036-1036

19. What does the sign say?

Sorting

The magnitudes are positive, so the sign is the cosine's.

Sort into buckets

Sort each dot product by the angle it implies.

Acute
v dot w = 12; v dot w = 0.001
Right angle
v dot w = 0
Obtuse
v dot w = -7
acute
A positive dot product means a positive cosine, which means an angle under 90 degrees. The size of the number says nothing about how acute; the last one is a very nearly right angle but still acute.
right
A dot product of exactly zero means a cosine of zero, so the angle is exactly 90 degrees and the vectors are perpendicular.
obtuse
A negative dot product means a negative cosine, so the angle exceeds 90 degrees.

20. Worked example: finding an angle

Worked example

Example 11.9.2, part 1. A common angle comes out.

\[ \text{Find the angle between } \langle 3, -3\sqrt{3}\rangle \text{ and } \langle -\sqrt{3}, 1\rangle. \]

Compute the dot product

Why: Negative three root three, twice.

\[ -6 \sqrt{3} \]

Compute both magnitudes

Why: Nine plus 27, and 3 plus 1.

\[ 6\text{ and } 2 \]

Divide

Why: The dot product over the product of magnitudes.

\[ -\sqrt{3} / 2 \]

Take the arccosine

Why: A common value.

\[ 5 \pi / 6 \]

Figure (svg): The solution to Worked example finding an angle shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \theta = \arccos\left(-\tfrac{\sqrt{3}}{2}\right) = \tfrac{5\pi}{6} \]

Verify: check the sign

Why: The dot product was negative, so the angle should be obtuse — and five sixths of pi is 150 degrees, which is. Reading the sign first is a free check on the arithmetic that follows.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1037-1037

21. Find the error: forgetting the magnitudes

Error analysis

A student computes an angle between two vectors.

Annotate

On: \( \vec{v}\cdot\vec{w} = 2 \;\Longrightarrow\; \theta = \arccos(2) \)

  • The dot product is correct, and the arccosine is the right function to reach for.
  • But the arccosine takes a value between -1 and 1, and 2 is outside its domain.
  • The dot product must first be divided by the product of the two magnitudes.
  • That quotient is the cosine, and it is always between -1 and 1.
  • Here the magnitudes are 5 and root 5, so the cosine is 2 over 5 root 5, about 0.179.

An arccosine of anything outside the interval from -1 to 1 is a signal that the division was skipped. The error announces itself, which makes it one of the easier ones to catch.

22. Finish the angle calculation

Faded example

Find the angle between the vectors with components 3 and -4, and 2 and 1.

Fill in the blanks

\vec5\cdot\vec25 = 6 - 4 = 2, \; \|\vec___\| = ___, \; \|\vec___\| = \sqrt___ \;\Longrightarrow\; \cos\theta = \frac______\sqrt___} = \frac___}___}

Why: The magnitude of the first vector is the root of 9 plus 16, namely 5. Rationalising the denominator gives two root five over 25, about 0.179, which is not the cosine of a common angle — so the answer is left as an arccosine.

23. Predict before you compute

Prediction

Two vectors have a dot product of zero, and neither is the zero vector.

Predict first

What is the angle between them?

  • 0
  • pi/4
  • pi/2
  • pi

Correct: pi/2.

Why: A zero dot product with non-zero magnitudes forces the cosine to be zero, and the only angle between 0 and pi with cosine zero is a right angle. So the vectors are perpendicular. This is the single most used consequence of the theorem, and it costs two multiplications and an addition to check.

24. Say it in your own words

Explain it to yourself

The definition mentions no angle at all, yet the theorem produces one.

Discussion prompt

Explain where the angle comes from, and what the proof actually compares.

Hint: What two expressions are being equated?

Answer:

The angle enters through the Law of Cosines. The two vectors and their difference form a triangle, and the Law of Cosines expresses the squared length of the third side using the angle between the first two.

Separately, the algebra of the dot product expresses that same squared length with no angle in it at all. Two expressions for the same quantity, one containing an angle and one not.

Equating them is what forces the connection. The angle was always implicit in the components — it has to be, since the components determine the vectors completely — and the Law of Cosines is the tool that extracts it. That is why this lesson could not have come before Lesson 11.3.

25. Detecting perpendicularity

Section

Section 3

26. Zero means perpendicular

Concept

Two non-zero vectors are perpendicular exactly when their dot product is zero. It is the cheapest possible test and requires no angle to be computed.

Theorem 11.25 — For non-zero vectors, they are orthogonal — that is, perpendicular — if and only if their dot product is zero.

One immediate application recovers a fact from earlier algebra: two lines are perpendicular exactly when the product of their slopes is negative 1.

Figure (svg): Two columns separating what the dot product tells you from what it does not

A dot product of zero is the single most useful fact it reports, and it costs two multiplications and an addition to obtain.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1037-1038

27. What it reports and what it does not

Picture it

One number, carrying a specific and limited amount of information.

Figure (svg): Two columns separating what the dot product tells you from what it does not

A dot product of zero is the single most useful fact it reports, and it costs two multiplications and an addition to obtain.

The right column is worth reading twice. A large dot product does not mean the vectors are aligned; it may only mean one of them is long.

28. Worked example: a perpendicular pair

Worked example

Example 11.9.2, part 2. No magnitudes needed.

\[ \text{Find the angle between } \langle 2,2\rangle \text{ and } \langle 5,-5\rangle. \]

Compute the dot product

Why: Ten plus negative 10.

\[ 0 \]

Note the magnitudes do not matter

Why: Zero divided by anything positive is zero.

\[ \cos = 0 \]

Take the arccosine

Why: Of zero.

\[ \frac{\pi}{2} \]

Write the conclusion

Why: The vectors are orthogonal.

Figure (svg): The solution to Worked example a perpendicular pair shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \vec{v}\cdot\vec{w} = 0 \;\Longrightarrow\; \theta = \tfrac{\pi}{2} \]

Verify: check the slopes

Why: The first vector has slope 1 and the second has slope negative 1. Their product is negative 1, which is the perpendicularity condition from earlier algebra — consistent with the dot product's verdict.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1037-1037

29. Finish the orthogonality test

Faded example

Are the vectors with components 6 and -4, and 2 and 3, perpendicular?

Fill in the blanks

(6)(2) + (-4)(3) = 12 - 12 = 0 \;\Longrightarrow\; \text___

Why: The two products cancel exactly, so the dot product is zero and the vectors are orthogonal. Their slopes are negative two thirds and three halves, whose product is negative 1 — the two tests agree, as they must.

30. Worked example: perpendicular slopes, proved

Worked example

Example 11.9.3. An old fact from a new direction.

\[ \text{Prove two lines are perpendicular exactly when } m_1m_2 = -1. \]

Find a vector along the first line

Why: From two points on it, at x equal to 0 and 1.

\[ < 1, m 1 > \]

Find one along the second

Why: The same construction.

\[ < 1, m 2 > \]

The lines are perpendicular exactly when those are

Why: By definition of a line's direction.

Compute the dot product and set it to zero

Why: One plus the product of the slopes.

\[ 1 + m 1 m 2 = 0 \]

Figure (svg): The solution to Worked example perpendicular slopes, proved shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \langle 1, m_1\rangle \cdot \langle 1, m_2\rangle = 1 + m_1m_2 = 0 \;\Longleftrightarrow\; m_1m_2 = -1 \]

Verify: check what the proof needs

Why: Both lines must have slopes, so neither can be vertical — and indeed a vertical and a horizontal line are perpendicular without any product of slopes existing. The rule's usual exception appears here as the exception to the vector construction, which is a satisfying match.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1037-1038

31. Trap: reading a large dot product as strong alignment

Trap

The trap

\[ \vec{v}\cdot\vec{w} = 100 \;\Longrightarrow\; \text{nearly parallel} \]

Take a large dot product as evidence of a small angle

Why: The cosine is largest when the angle is smallest, so a big answer suggests alignment.

But the dot product also carries both magnitudes. Two long vectors at 80 degrees can easily give 100, while two short ones that are exactly parallel might give 2.

The fix

\[ \cos\theta = \frac{\vec{v}\cdot\vec{w}}{\|\vec{v}\|\,\|\vec{w}\|} = \hat{v}\cdot\hat{w} \]

Divide out the magnitudes before drawing any conclusion about the angle

Why: Equivalently, dot the two unit vectors.

Only the sign of a dot product is meaningful without normalising. Its size confounds the angle with the two lengths, and separating them is exactly what dividing by the magnitudes does.

32. Predict before you compute

Prediction

You need to check whether two vectors are perpendicular.

Predict first

What is the fastest route?

  • Compute both magnitudes and the angle
  • Compute the dot product and see if it is zero
  • Compare their slopes
  • Normalise both and compare

Correct: Compute the dot product and see if it is zero.

Why: It takes two multiplications and one addition, with no square roots, no division and no inverse function. The angle route needs two magnitudes and an arccosine, and the slope route fails for vertical vectors. This is why the dot product is the standard test, and it is the operation a computer performs millions of times a second in graphics work.

33. Perpendicular or not?

Sorting

Compute the dot product in each case.

Sort into buckets

Sort each pair.

Perpendicular
<1, 2> and <-2, 1>; <5, 0> and <0, -7>
Not perpendicular
<3, 1> and <1, 3>; <2, -3> and <6, -9>
perp
Both dot products vanish: negative 2 plus 2, and 0 plus 0. The second pair are along the two axes, which is the clearest possible case of perpendicularity.
not
The first gives 3 plus 3, namely 6, so the angle is acute. The second pair are scalar multiples of one another, so they are parallel rather than perpendicular, and their dot product is 12 plus 27.

34. Push the boundary

Edge cases

The theorem is stated for non-zero vectors.

Discussion prompt

What happens when one of them is the zero vector, and why does the theorem exclude it?

Hint: What is the angle between the zero vector and anything?

Answer:

The dot product with the zero vector is always zero, since every product in the sum has a zero factor. So the algebraic side of the test always says perpendicular.

But the zero vector has no direction, so there is no angle between it and anything, and the geometric side of the statement is undefined. The two sides of the if-and-only-if cannot be compared.

This is the same exclusion as in every previous lesson: the zero object has no direction, so any statement about direction must exclude it. Some texts declare the zero vector orthogonal to everything by convention, which is harmless as long as it is understood to be a convention rather than a fact about angles.

35. Projection

Section

Section 4

36. The shadow one vector casts on another

Concept

Drop a perpendicular from the head of one vector to the line of the other. The vector from the common tail to that foot is the projection, and it measures how much of the first vector lies along the second.

Definition 11.12 — The orthogonal projection of one vector onto another is the scalar projection — the dot product with the second's unit vector — times that unit vector.

\[ \text{proj}_{\vec{w}}(\vec{v}) = (\vec{v}\cdot\hat{w})\,\hat{w} = \left(\frac{\vec{v}\cdot\vec{w}}{\vec{w}\cdot\vec{w}}\right)\vec{w} \]

The decomposition into a parallel and a perpendicular part is unique, which is what makes the projection a well-defined operation rather than one choice among many.

Figure (svg): One vector projected onto another, with a perpendicular dropped from its head to the second vector and the resulting shadow labelled as the projection

The projection is the shadow one vector casts on another. What is left over is perpendicular, always.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1038-1041

37. Three formulas

Picture it

Same vector, three routes, different amounts of arithmetic.

Figure (svg): Three equivalent formulas for the projection of one vector onto another, with a note on when each is convenient

The last is usually fastest by hand because both dot products stay in whole numbers, where normalising introduces a square root immediately.

38. Worked example: computing a projection

Worked example

Example 11.9.4, using the two-dot-product formula.

\[ \text{Find } \text{proj}_{\vec{w}}(\vec{v}) \text{ for } \vec{v} = \langle 1,8\rangle \text{ and } \vec{w} = \langle -1,2\rangle. \]

Compute the numerator

Why: Negative 1 plus 16.

\[ 15 \]

Compute the denominator

Why: One plus 4.

\[ 5 \]

Divide

Why: The scalar multiplier.

\[ 3 \]

Scale w by it

Why: Three times each component.

\[ < -3, 6 > \]

Figure (svg): The solution to Worked example computing a projection shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \text{proj}_{\vec{w}}(\vec{v}) = \tfrac{15}{5}\langle -1,2\rangle = \langle -3, 6\rangle \]

Verify: check both defining properties

Why: The answer is 3 times w, so it points along w as required. And the leftover, v minus the projection, has components 4 and 2, whose dot product with w is negative 4 plus 4, namely zero — so the leftover is perpendicular. Both conditions hold.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1039-1040

39. Finish the projection

Faded example

Project the vector with components 4 and 3 onto the vector with components 1 and 0.

Fill in the blanks

\frac4\cdot\vec0}___\cdot\vec___} = \frac___}___ \;\Longrightarrow\; \text___ = ___\langle 1, 0\rangle = \langle ___, ___\rangle

Why: Projecting onto the horizontal unit vector simply keeps the horizontal component and discards the vertical one, which is what a shadow cast straight down onto the x-axis does. This is the simplest possible projection and worth using as a sanity check on the formula.

40. Worked example: the decomposition

Worked example

Splitting a vector into parallel and perpendicular parts.

\[ \text{Write } \vec{v} = \langle 1,8\rangle \text{ as a part along } \vec{w} = \langle -1,2\rangle \text{ plus a part perpendicular to it.} \]

Take the projection as the parallel part

Why: Computed above.

\[ p = < -3, 6 > \]

Subtract to get the rest

Why: v minus p.

\[ q = < 4, 2 > \]

Check q is perpendicular to w

Why: Its dot product with w.

\[ 0 \]

Write the decomposition

Why: The two parts sum to v.

\[ v = p + q \]

Figure (svg): The solution to Worked example the decomposition shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \langle 1,8\rangle = \langle -3,6\rangle + \langle 4,2\rangle \]

Verify: confirm the sum

Why: Negative 3 plus 4 is 1, and 6 plus 2 is 8, giving back v. The two pieces are perpendicular to each other, so their squared magnitudes should sum to v's: 45 plus 20 is 65, and v's squared magnitude is 1 plus 64, also 65. The Pythagorean check passes.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1040-1041

41. Find the error: projecting the wrong way round

Error analysis

A student is asked for the projection of v onto w.

Annotate

On: \( \text{proj}_{\vec{w}}(\vec{v}) = \left(\frac{\vec{v}\cdot\vec{w}}{\vec{v}\cdot\vec{v}}\right)\vec{v} \)

  • The numerator is right, and the shape of the formula is right.
  • But the denominator and the trailing vector are both v rather than w.
  • That computes the projection of w onto v instead.
  • The result points along the wrong vector entirely.
  • The rule: the vector being projected ONTO appears twice, in the denominator and at the end.

The two projections are genuinely different vectors and are not even parallel. Reading the notation as onto w and checking that w appears twice settles the direction before any arithmetic.

42. Predict before you compute

Prediction

You project a vector onto one perpendicular to it.

Predict first

What is the projection?

  • The original vector
  • The zero vector
  • The perpendicular vector
  • Half the original

Correct: The zero vector.

Why: The dot product in the numerator is zero, so the whole projection is zero times the second vector. Geometrically the shadow has collapsed to a point: none of the first vector lies along the second. This is the extreme case of the scalar projection measuring how much of one vector lies along another, and here the answer is none.

43. Match each quantity to what it is

Matching

The projection has a scalar part and a vector part.

Match the pairs

  • l1. v dot w-hat
  • l2. (v dot w-hat) w-hat
  • l3. v minus the projection
  • l4. the dot product of that leftover with w
  • r1. the scalar projection: how much of v lies along w
  • r2. the vector projection: the shadow itself
  • r3. the component of v perpendicular to w
  • r4. always zero

Why: The scalar projection is a signed length and the vector projection attaches a direction to it. The leftover is what the projection did not account for, and it is perpendicular to w by construction — which is the content of the decomposition theorem.

44. Break the claim

Counterexample

A student proposes: the projection of v onto w is never longer than v.

Discussion prompt

Decide whether this is true, and give the reason or a counterexample.

Hint: What is the scalar projection, in terms of the angle?

Answer:

It is true, and worth seeing why. The scalar projection is the magnitude of v times the cosine of the angle, and a cosine never exceeds 1 in size — so the projection's length is at most v's.

Equality holds exactly when the cosine is plus or minus 1, meaning v is parallel to w, in which case the projection is v itself or its reflection through the origin.

Worth contrasting with a claim that is false: the projection of v onto w can easily be longer than w. Projecting a long vector onto a short one gives a long shadow, since the projection's length depends on v's magnitude and w's direction, not on w's magnitude at all.

45. Work

Section

Section 5

46. Only the aligned part counts

Concept

A constant force applied over a displacement does work equal to the dot product of the two. A force perpendicular to the motion does no work at all, which the dot product reports automatically.

Theorem 11.28 — The work done by a constant force applied along a displacement is the dot product of the force vector and the displacement vector.

\[ W = \vec{F}\cdot\overrightarrow{PQ} = \|\vec{F}\|\,\|\overrightarrow{PQ}\|\cos(\theta) \]

The result can be negative, which is meaningful: a force opposing the motion does negative work, removing energy rather than adding it. Friction is the standard example.

Figure (svg): A wagon being pulled by a force at an angle to the horizontal, with only the horizontal component of the force doing work over the distance travelled

Work is the dot product of force and displacement, which is exactly the statement that only the aligned part counts.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1041-1042

47. Pulling a wagon

Picture it

The handle is at an angle, so part of the pull is wasted.

Figure (svg): A wagon being pulled by a force at an angle to the horizontal, with only the horizontal component of the force doing work over the distance travelled

Work is the dot product of force and displacement, which is exactly the statement that only the aligned part counts.

Lowering the handle would put more of the force along the motion and do more work per pound of pull, which is why a low tow point is preferred when dragging something.

48. Worked example: pulling a wagon

Worked example

Example 11.9.5, both routes.

\[ \text{A } 10 \text{ lb force at } 30^\circ \text{ pulls a wagon } 50 \text{ ft. Find the work done.} \]

Resolve the force

Why: Ten at 30 degrees.

\[ < 5 \sqrt{3}, 5 > \]

Write the displacement

Why: Fifty feet horizontally.

\[ < 50, 0 > \]

Take the dot product

Why: The vertical parts contribute nothing.

\[ 250 \sqrt{3} \]

Or use the magnitude form directly

Why: Ten times 50 times the cosine of 30.

Figure (svg): The solution to Worked example pulling a wagon shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ W = (10)(50)\cos(30^\circ) = 250\sqrt{3} \approx 433 \text{ ft-lb} \]

Verify: compare with a horizontal pull

Why: The same 10 pound force pulled horizontally would do 500 foot-pounds. Angling the handle to 30 degrees loses about 13 percent of that, since the cosine of 30 degrees is about 0.87. The loss is the vertical part of the pull, which lifts nothing and moves nothing.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1042-1042

49. Predict before you compute

Prediction

A satellite moves in a circular orbit, with gravity always pulling it toward the centre.

Predict first

How much work does gravity do over one orbit?

  • A large positive amount
  • A large negative amount
  • Zero
  • It depends on the orbital radius

Correct: Zero.

Why: In a circular orbit the velocity is always tangent to the circle and gravity always points to the centre, so the two are perpendicular at every instant. A perpendicular force does no work, so gravity does none — which is why a circular orbit needs no energy input to sustain and why the satellite's speed stays constant. The dot product reports this immediately.

50. Worked example: negative and zero work

Worked example

Two cases the elementary formula cannot express.

\[ \text{Find the work done by a force perpendicular to the motion, and by one opposing it.} \]

Perpendicular case

Why: The cosine of 90 degrees.

\[ \cos = 0 \]

Read the work

Why: Anything times zero.

\[ W = 0 \]

Opposing case

Why: The cosine of 180 degrees.

\[ \cos = -1 \]

Read the work

Why: The full product, negated.

Figure (svg): The solution to Worked example negative and zero work shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \theta = 90^\circ \;\Rightarrow\; W = 0; \qquad \theta = 180^\circ \;\Rightarrow\; W = -\|\vec{F}\|\,\|\vec{d}\| \]

Verify: check both against intuition

Why: Carrying a heavy box horizontally does no work on it in this sense, because the supporting force is vertical and the motion horizontal — which matches the everyday observation that carrying something level is easier than lifting it. And friction, which always opposes motion, does negative work: it removes energy, which is why things slow down.

51. Trap: using force times distance regardless of angle

Trap

The trap

\[ W = (10 \text{ lb})(50 \text{ ft}) = 500 \text{ ft-lb} \]

Multiply the force by the distance

Why: That is the formula from elementary physics.

But that formula assumes the force acts along the motion. Here it acts at 30 degrees, so only its horizontal component does any work.

The fix

\[ W = \|\vec{F}\|\,\|\vec{d}\|\cos(30^\circ) = 250\sqrt{3} \approx 433 \text{ ft-lb} \]

Include the cosine of the angle between force and motion

Why: Which is what the dot product does automatically.

The elementary formula is the special case where the angle is zero and the cosine is 1. The dot product is the general definition, and the familiar formula is what it reduces to when the force happens to be aligned.

52. Finish the work calculation

Faded example

A 25 newton force at 60 degrees to the motion moves an object 8 metres.

Fill in the blanks

W = (25)(8)\cos(60^\circ) = 200 \cdot 1/2 = 100 \text___

Why: The cosine of 60 degrees is one half, so exactly half the force is doing useful work and the answer is 100 joules. At 60 degrees the loss is substantial — half the applied force is wasted, which is why tow ropes are kept as close to the direction of travel as the geometry allows.

53. Positive, zero, or negative work?

Sorting

The sign follows the cosine, as always.

Sort into buckets

Sort each situation.

Positive work
lifting a box straight up; pushing a cart forward
No work
carrying a box horizontally at constant height
Negative work
friction on a sliding block
pos
In both the force acts in the direction of motion, so the cosine is positive and energy is added to the object.
zero
The supporting force is vertical and the motion is horizontal, so the two are perpendicular and the cosine is zero. No work is done on the box, however tired the carrier gets.
neg
Friction always opposes the motion, so the angle is 180 degrees and the cosine is negative 1. The work is negative and energy is removed, which is why the block slows down.

54. Where else this shows up

Real world

A 3D graphics engine shades a surface by computing, for each point, how brightly it is lit. It has the surface's outward normal vector and a vector pointing toward the light.

Discussion prompt

Explain what quantity the engine computes, and why the dot product is exactly the right tool.

Hint: How does brightness depend on the angle of the light?

Answer:

A surface facing the light directly is brightest; one edge-on to the light is unlit; and one facing away receives nothing. That is the cosine of the angle between the normal and the light direction — which is precisely a normalised dot product.

So the engine normalises both vectors and dots them, clamping negative results to zero since a surface facing away is unlit rather than negatively lit. This is called Lambertian shading, and it is one line of arithmetic per point.

The reason it must be the dot product rather than an arccosine is speed. Two multiplications and an addition, per point, for millions of points, sixty times a second. Computing an actual angle would be hundreds of times slower and the cosine is what was wanted anyway.

The same pattern recurs throughout graphics and physics simulation: the cosine of an angle is needed far more often than the angle itself, and the dot product delivers the cosine without ever forming the angle. That is the practical reason this operation is defined the way it is.

55. The two products so far

Comparison

Fill the blanks from memory. Only one of the two takes two vectors.

Comparison matrix

Scalar multiplicationDot product
inputsa number and a vectortwo vectors
outputa vectora number
geometric effectscales, and reverses if negativereports the cosine of the angle, scaled by both lengths
zero whenthe scalar or the vector is zerothe vectors are perpendicular, or one is zero
associativeyes, with real multiplicationnot even a well-formed question

The last row is the important structural difference. Because the dot product changes the type of its arguments, it cannot be chained, and every triple expression needs brackets.

56. The procedure, in order

Pattern

Five moves, covering every use of the dot product in this lesson.

  1. To compute a dot product, multiply matching components and add. Check the type of the result: it is always a number.
  2. To test for perpendicularity, compute the dot product and see whether it is zero. No magnitudes, no division, no inverse function.
  3. To find an angle, divide the dot product by the product of the two magnitudes, then take the arccosine. A value outside the interval from -1 to 1 means the division was skipped.
  4. To project one vector onto another, divide the dot product of the two by the self-dot of the second, then scale the second by that number. The vector being projected onto appears twice.
  5. To decompose, take the projection as the parallel part and subtract it from the original for the perpendicular part, then verify that part dots to zero with the second vector.

For work, dot the force with the displacement. The elementary formula is the special case where they are aligned.

OpenStax Algebra and Trigonometry 2e, §10.8 Vectors §10.8

57. Check yourself 1 of 3

Check

The definition.

Check your understanding

What is the dot product of the vectors with components -3 and 5, and 4 and 2?

  • A. -2 (correct)
  • B. -22
  • C. 22
  • D. components -12 and 10

Answer: A

Why: Negative 3 times 4 is negative 12, and 5 times 2 is 10. Their sum is negative 2. The result is a single number, and its negative sign says the angle between the vectors is obtuse.

Why B tempts people
This subtracts the two products rather than adding them.
Why C tempts people
This has the sign of the first product wrong.
Why D tempts people
This is the componentwise product, which is not the dot product and is not an operation defined in this course; the dot product's output is a scalar.

58. Check yourself 2 of 3

Check

Orthogonality.

Check your understanding

For what value of k are the vectors with components 3 and k, and 2 and -6, perpendicular?

  • A. k = 1 (correct)
  • B. k = -1
  • C. k = 9
  • D. k = -9

Answer: A

Why: The dot product is 6 minus 6k, and setting that to zero gives k equal to 1. Checking: the vectors with components 3 and 1, and 2 and negative 6, have dot product 6 minus 6, which is zero.

Why B tempts people
This would give a dot product of 6 plus 6, namely 12, so the angle would be acute.
Why C tempts people
Nine comes from solving 6k equal to 54 or similar, which is not the equation here.
Why D tempts people
The sign is wrong as well as the size; this would give a dot product of 60.

59. Check yourself 3 of 3

Check

Projection.

Check your understanding

What is the projection of the vector with components 6 and 2 onto the vector with components 3 and 0?

  • A. components 6 and 0 (correct)
  • B. components 2 and 0
  • C. components 6 and 2
  • D. components 3 and 0

Answer: A

Why: The dot product is 18 and the self-dot of the second vector is 9, so the multiplier is 2. Twice the vector with components 3 and 0 gives components 6 and 0. Projecting onto a horizontal vector keeps the horizontal component and discards the vertical one.

Why B tempts people
This appears to keep the second component instead of the first, which projects onto the wrong axis.
Why C tempts people
This is the original vector unchanged, which would be the projection only if the two vectors were parallel.
Why D tempts people
This is the second vector itself, which would require the multiplier to be 1 rather than 2.

60. Where this shows up outside the textbook

Real world

A recommendation system represents each user by a vector recording how much they liked each of several hundred items. To find users with similar taste, it computes what it calls the cosine similarity between two such vectors.

Discussion prompt

Explain what that quantity is, and why the cosine rather than the raw dot product is the right measure.

Hint: What distinguishes two users with the same taste but different levels of enthusiasm?

Answer:

The cosine similarity is the dot product divided by the product of the magnitudes — exactly the quantity from Theorem 11.24, the cosine of the angle between the two vectors. In hundreds of dimensions rather than two, but the formula is unchanged.

The raw dot product would be dominated by how much each user rated, not by what they liked. An enthusiastic user who rates everything highly would appear similar to everyone, purely because their vector is long.

Dividing by the magnitudes removes that. The cosine compares direction only, so two users with identical taste come out at similarity 1 whether one is generous with high ratings and the other stingy. Only the pattern of preference survives the normalisation, which is precisely what is wanted.

The same normalised dot product underlies document comparison, image search and the attention mechanism inside a language model. Dividing out the magnitudes to compare direction alone is one of the most reused ideas in computing, and it is the trap from this lesson — that a large dot product does not mean alignment — stated as an engineering principle.

61. How sure are you?

Commit first

Answer, then rate your confidence honestly. Confident and wrong is the combination worth finding.

Predict first

Two non-zero vectors have a dot product of zero. What does that tell you?

  • One of them is very short
  • They point in opposite directions
  • They are perpendicular
  • They are parallel

Correct: They are perpendicular.

\[ \vec{v}\cdot\vec{w} = 0, \; \vec{v},\vec{w} \ne \vec{0} \;\Longleftrightarrow\; \vec{v} \perp \vec{w} \]

Why: With both magnitudes non-zero, a dot product of zero forces the cosine to be zero, and the only angle between 0 and pi with cosine zero is a right angle. Opposite directions would give a dot product equal to minus the product of the magnitudes, which is as negative as it can be; parallel gives the largest positive value; and a short vector reduces the size without forcing it to zero.

62. Explain it to someone a year behind you

Explain it

They have learned the dot product as a formula and see no reason for it — it seems like an arbitrary thing to compute.

Discussion prompt

In no more than five sentences, give them the reason.

Hint: What does it tell you that the components alone do not?

Answer:

It tells you the angle between two vectors, which nothing else so far could. The components describe each vector separately; the dot product describes their relationship.

The single most useful case is that a dot product of zero means perpendicular, and that costs two multiplications and an addition — no square roots and no inverse trigonometric functions. Computers do this millions of times a second for exactly that reason.

It also tells you how much of one vector points along another, which is what a projection is and what work is. Any question of the form how aligned are these two things is answered by a dot product.

63. Exit ticket

Exit ticket

Name the weakest spot before you close the deck. That is the one worth ten minutes tonight.

Predict first

Which of these would you least want to be handed cold on a quiz tomorrow?

  • Computing a dot product and naming its type
  • Finding the angle between two vectors
  • Computing a projection the right way round
  • Setting up a work calculation

Correct: Whichever you picked is the right answer — and each one has a specific fix.

Why: The dot product is fixed by multiplying matching components and remembering the result is a number. The angle is fixed by dividing by both magnitudes before the arccosine. The projection is fixed by checking that the vector being projected onto appears twice, in the denominator and at the end. Work is fixed by dotting force with displacement rather than multiplying magnitudes. Pick yours and do five of that kind tonight rather than twenty mixed ones.

64. Draw the lesson on one page

Connect it up

Do this on paper. It is worth more than rereading the slides.

Draw it

At the top of the page write the definition of the dot product and its four properties, noting beside each that it is inherited from real arithmetic, and add a line saying why there is no associative property. Underneath, draw two vectors from a common point with the angle marked, write the geometric interpretation, and sketch the triangle that the proof uses along with the two expressions for its third side. In the middle of the page draw three small pairs of vectors at acute, right and obtuse angles, labelling each with the sign of the dot product. In the bottom left, project the vector with components 1 and 8 onto the one with components negative 1 and 2, showing the parallel and perpendicular parts and verifying the perpendicular one dots to zero. In the bottom right, draw the wagon problem and compute the work two ways. Finally, circle the one thing the dot product tells you that costs no division at all.

The circled item is perpendicularity. Zero dot product means a right angle, and getting that answer requires two multiplications and one addition — no magnitudes, no square roots, no arccosine. That cheapness is why the operation is defined as it is.

65. What you can do now

Recap

Five things, and the second is the bridge between the algebra and the geometry.

If the question saysYour first move is
Are these perpendicular?Compute the dot product; look for zero
Find the angle between themDivide by both magnitudes, then arccosine
Project v onto wDot v with w over w with w, times w
Split v into parallel and perpendicularTake the projection, then subtract
Find the work doneDot the force with the displacement

Every object in this chapter so far has been static: a triangle, a curve, a vector. The final lesson introduces a parameter, so that a curve is traced by a point moving through time — which is what makes all of this usable in motion problems.

Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection §11.9, pp. 1034-1043 — everything on these slides traces back here

Sources

  1. Stitz & Zeager, College Trigonometry, Ch. 11 Applications of Trigonometry — §11.9 The Dot Product and Projection — Stitz & Zeager, College Trigonometry, Version 3 Corrected Edition, July 4 2013, pp. 1034-1043
  2. OpenStax Algebra and Trigonometry 2e, §10.8 Vectors

Want this taught 1-on-1? Alexander tutors Trigonometry — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108