Skip to lesson

Math · Multivariable Calculus

Chapter 1: Vectors and Space

The Dot Product

A number that measures agreement.

Lesson
2
Time
About 23 minutes
0 of 22 done
Part 1 of 8Picture It

Step 1: Picture It

Start with something you already know.

Pulling a wagon

  1. You pull a wagon along a flat path by its handle.
  2. Pull straight along the path, and all of your pull moves it forward.
  3. Tilt the handle up, and only part of your pull moves it forward.
  4. Pull straight up, and none of your pull moves it along the path.
  5. Pull backward, and your pull works against the way it rolls.

The dot product of two vectors is how much one goes along the other, times the other’s length.

Along each other it is large and positive, straight across it is zero, and against each other it is negative.

It is a single number, not a vector, and it comes out the same whichever vector you call the pull.

The same idea with numbers. A pull of 10 newtons, at different angles to the path.

Angle between pull and pathPart of the pull along the path (newtons)
0°10
60°5
90°0
120°−5
180°−10

The part along the path is 10 cos θ. Times the length of the path vector, that is the dot product: |u||v| cos θ.

Step 2: Let's Learn

Read it, or press Listen and follow the words.

Try it first

u = ⟨3, 4, 0⟩ and v = ⟨−4, 3, 0⟩ start at the same point. The side joining their tips is u − v, so the three make a triangle. Using only lengths, do u and v meet at a right angle?

Stuck is fine. Let’s Learn shows the way next. Got it first time? You can jump ahead to Watch an Example.

Watch the idea first — 58 seconds. Then read on, and try it yourself in the next step.

Are u = ⟨3, −2, 1⟩ and v = ⟨2, 4, 2⟩ perpendicular?

  1. 13 × 2 + (−2) × 4 + 1 × 2multiply matching components
  2. 26 − 8 + 2 = 0add
  3. Answeru · v = 0: perpendicularcos θ = 0

The dot product multiplies matching components and adds, giving a number. It measures agreement: u · v = |u||v| cos θ, so it delivers the angle between two vectors in any number of dimensions. Zero means perpendicular. The projection of u onto v is the shadow u casts on v.

What the number means

Same direction: large positive. Opposite: negative. Perpendicular: zero. ⟨1, 0, 0⟩ · ⟨1, 0, 0⟩ = 1; ⟨1, 0, 0⟩ · ⟨−1, 0, 0⟩ = −1; ⟨1, 0, 0⟩ · ⟨0, 1, 0⟩ = 0.

The angle formula

u = ⟨1, 2, 2⟩, v = ⟨2, 2, 1⟩: u · v = 2 + 4 + 2 = 8; |u| = |v| = 3. cos θ = 8/9, θ ≈ 27.3°. The dot product turns two lists of numbers into an angle.

Sign first

Positive, zero and negative already tell you acute, right or obtuse. ⟨1, 2, 2⟩ · ⟨−2, 1, 0⟩ = 0: right angle, no cosine needed. Check the sign before computing an angle.

A vector with itself

u · u = |u|², since cos 0 = 1. ⟨1, 2, 2⟩ · ⟨1, 2, 2⟩ = 1 + 4 + 4 = 9 = 3². A fast check on any magnitude.

Why it matters

Work is force dotted with displacement. A force ⟨3, 4, 0⟩ N moving an object through ⟨2, 0, 0⟩ m does 6 J: only the 3 N along the motion counts. A sideways force does no work.

Projection

The scalar projection of u onto v is u · v/|v|: the length of the shadow. ⟨3, 4, 0⟩ onto ⟨1, 0, 0⟩: 3/1 = 3. The vector projection is that length times the unit vector along v: ⟨3, 0, 0⟩.

Step 3: Try It Yourself

Tap and try it out.

Press Next step. Dot product, magnitudes, cosine, angle, then the shadow.

u = ⟨1, 2, 2⟩, v = ⟨2, 2, 1⟩. Find the angle between them, and the projection of u onto v

  1. 1u · v = 2 + 4 + 2 = 8positive: acute
Step 0 of 4
Make the two vectors perpendicular and check that the products of the components cancel.
  • Vector a(4, 2) · length 4.47
  • Vector b(-2, 4) · length 4.47

Step 4: In Real Life

Solar panels

A panel’s output is proportional to the dot product of the sun’s direction and the panel’s normal. Facing the sun, the dot product is largest. Installers tilt panels to maximize it.

Step 5: Watch an Example

One step at a time.

Watch Priya Find an Angle in Space

Priya wants the angle between u = ⟨2, 1, 2⟩ and v = ⟨2, −2, 1⟩, to the nearest tenth of a degree.

  1. Step 1

    The dot product comes first. Matching components multiply to 2 × 2 = 4, 1 × (−2) = −2 and 2 × 1 = 2, and those add to 4 − 2 + 2 = 4.

Watch Noor Find a Shadow, Then Finish It Yourself

Noor wants the projection of u = ⟨5, 10, 5⟩ onto v = ⟨0, 3, 4⟩: first the length of the shadow, then the shadow as a vector. She does the first two steps; the rest are yours.

  1. Step 1

    The dot product comes first: 5 × 0 + 10 × 3 + 5 × 4 = 0 + 30 + 20 = 50. It is positive, so the shadow falls along v, not behind it.

Step 6: Your Turn

Practice makes it stick.

The Loading Dock

Problem 1 of 17

A winch cable pulls a crate with a force of ⟨20, 10, 15⟩ newtons while the crate moves through ⟨8, −2, 0⟩ meters across a flat floor (the third component is up). How much work does the cable do, in joules?

joules

The Café Order

Problem 2 of 17

A café orders ⟨40, 25, 10⟩ bags of coffee beans, sugar and flour. The prices are ⟨9, 2, 3⟩ dollars a bag, in the same order. The total bill is the dot product of the two vectors. What is it, in dollars?

dollars

Dot Them Together

Some ask for the dot product, and some use it. Read which before you start.

Problem 3 of 17

What is ⟨3, 1, −2⟩ · ⟨2, 5, 4⟩?

Problem 4 of 17

u has length 6 and v has length 3, and the angle between them is 120°. What is u · v?

Problem 5 of 17

What is the angle between ⟨1, 1, 0⟩ and ⟨0, 1, 1⟩, in degrees?

degrees

Problem 6 of 17

⟨k, 2, −1⟩ is perpendicular to ⟨3, 1, 5⟩. What is k?

Problem 7 of 17

What is the scalar projection of ⟨4, 5, 1⟩ onto ⟨2, 1, 2⟩, the length of the shadow?

Whose Step?

One line on each page is a slip. Find it, then put it right.

Problem 8 of 17

Leo worked out the dot product of u = ⟨3, −1, 2⟩ and v = ⟨1, 4, 2⟩. One line is a slip. Which?

Leo’s dot product of ⟨3, −1, 2⟩ and ⟨1, 4, 2⟩

  1. 13 × 1 + (−1) × 4 + 2 × 2
  2. 23 + 4 + 4
  3. Answeru · v = 11

Problem 9 of 17

Worked correctly, what is ⟨3, −1, 2⟩ · ⟨1, 4, 2⟩?

Problem 10 of 17

Ana found the angle between u = ⟨2, 3, 6⟩ and v = ⟨2, −2, −1⟩. One line is a slip. Which?

Ana’s angle between ⟨2, 3, 6⟩ and ⟨2, −2, −1⟩

  1. 1u · v = 4 − 6 − 6 = −8
  2. 2|u| = √49 = 7, |v| = √9 = 3
  3. 3cos θ = 8/21
  4. Answerθ ≈ 67.6°

Problem 11 of 17

Worked correctly, what is the angle between ⟨2, 3, 6⟩ and ⟨2, −2, −1⟩, in degrees? Round to the nearest degree.

degrees

Problem 12 of 17

Sam found the scalar projection of u = ⟨2, 4, 4⟩ onto v = ⟨3, 0, 4⟩. One line is a slip. Which?

Sam’s scalar projection of ⟨2, 4, 4⟩ onto ⟨3, 0, 4⟩

  1. 1u · v = 6 + 0 + 16 = 22
  2. 2|v| = √(4 + 16 + 16) = 6
  3. Answeru · v/|v| = 22/6 ≈ 3.67

Problem 13 of 17

Worked correctly, what is the scalar projection of ⟨2, 4, 4⟩ onto ⟨3, 0, 4⟩? Give it as a decimal.

Pick the Move

Choose the move that answers the question. Neither needs working all the way through.

Problem 14 of 17

All you need to know is whether the angle between ⟨5, −2, 1⟩ and ⟨1, 3, 2⟩ is acute, right or obtuse. Which move settles it with the least work?

Problem 15 of 17

u and v are both unit vectors: each has length 1. What is the quickest way to find cos θ, the cosine of the angle between them?

Same Number?

Judge each one. Select every entry that fits.

Problem 16 of 17

Without finding any angle, select every pair that meets at a right angle.

Problem 17 of 17

u = ⟨2, −1, 2⟩. Select every entry that equals u · u.

Step 7: Quick Check

Show what you know.

Question 1 of 2

⟨2, −1, 3⟩ · ⟨1, 4, 1⟩. What is the result?

Question 2 of 2

A dot product of zero tells you what?

Ready for more?Optional. Past the lesson, for anyone who wants it.

Stretch 1 of 2

w = ⟨a, b, 1⟩ is perpendicular to both ⟨1, 2, 1⟩ and ⟨0, 1, −1⟩. What is a?

Stretch 2 of 2

u = ⟨2, 6, 3⟩, and v can be any vector of length 2. What is the largest value u · v can take?

What You Learned

  • The dot product multiplies matching components and adds, giving a number.
  • u · v = |u||v| cos θ, so it measures the angle between the vectors; the sign alone says acute, right or obtuse.
  • A dot product of zero means the vectors are perpendicular, and u · u = |u|².
  • The projection of u onto v has length u · v/|v|.
For the grown-up

The misconception this lesson targets is that the dot product is another vector: a student who multiplies matching components and stops, writing ⟨6, −8, 2⟩ where the answer is 6 − 8 + 2 = 0, has a list of numbers with no meaning, and cannot see why a zero should say anything about a right angle. Its partner is reading the sign as size, so that a negative dot product is "a small angle" rather than an obtuse one, which is how a minus sign gets dropped on the way to cos θ without anything looking wrong. Both go when the dot product is held as one number measuring agreement: positive along, zero across, negative against. The habit that guards it is cheap: read the sign before computing any angle, and check that the angle found agrees with it.