Math Core

Lesson 9.2 · Vectors and Polar Form

The dot product

You can add vectors and stretch them, but can you multiply two vectors together? One useful way to do it produces a single number called the dot product. That number turns out to measure how much two vectors point in the same direction, which lets you find the angle between them, test whether they are perpendicular, and compute the work done by a force.

Computing a dot product

The definition is simple: multiply matching components and add.

Definition

Dot product

The dot product of u=⟨a,b⟩\mathbf{u} = \langle a, b \rangle and v=⟨c,d⟩\mathbf{v} = \langle c, d \rangle is the number

u⋅v=ac+bd.\mathbf{u} \cdot \mathbf{v} = ac + bd.

For example, ⟨2,5⟩⋅⟨3,−1⟩=2(3)+5(−1)=6−5=1\langle 2, 5 \rangle \cdot \langle 3, -1 \rangle = 2(3) + 5(-1) = 6 - 5 = 1. Notice the answer is a scalar, not a vector. That is why the dot product is sometimes called the scalar product.

The dot product follows rules that look a lot like ordinary multiplication:

  • u⋅v=v⋅u\mathbf{u} \cdot \mathbf{v} = \mathbf{v} \cdot \mathbf{u} (order doesn't matter)
  • u⋅(v+w)=u⋅v+u⋅w\mathbf{u} \cdot (\mathbf{v} + \mathbf{w}) = \mathbf{u} \cdot \mathbf{v} + \mathbf{u} \cdot \mathbf{w} (it distributes)
  • (ku)⋅v=k(u⋅v)(k\mathbf{u}) \cdot \mathbf{v} = k(\mathbf{u} \cdot \mathbf{v})
  • v⋅v=∥v∥2\mathbf{v} \cdot \mathbf{v} = \|\mathbf{v}\|^2

The last rule is worth a second look. If v=⟨a,b⟩\mathbf{v} = \langle a, b \rangle, then v⋅v=a2+b2\mathbf{v} \cdot \mathbf{v} = a^2 + b^2, which is the square of the magnitude. So the dot product already knows about length.

The angle between two vectors

Place two nonzero vectors tail to tail. The angle between them is the angle θ\theta from one to the other, with 0∘≤θ≤180∘0^\circ \le \theta \le 180^\circ.

The angle θ between u = ⟨4, 1⟩ and v = ⟨1, 3⟩, placed tail to tail.Open in grapher →

Applying the law of cosines to the triangle formed by u\mathbf{u}, v\mathbf{v} and u−v\mathbf{u} - \mathbf{v} leads to a striking formula. Expanding ∥u−v∥2=(u−v)⋅(u−v)\|\mathbf{u} - \mathbf{v}\|^2 = (\mathbf{u} - \mathbf{v}) \cdot (\mathbf{u} - \mathbf{v}) gives ∥u∥2−2 u⋅v+∥v∥2\|\mathbf{u}\|^2 - 2\,\mathbf{u} \cdot \mathbf{v} + \|\mathbf{v}\|^2, while the law of cosines says the same length squared is ∥u∥2+∥v∥2−2∥u∥∥v∥cos⁡θ\|\mathbf{u}\|^2 + \|\mathbf{v}\|^2 - 2\|\mathbf{u}\|\|\mathbf{v}\|\cos\theta. Matching the two:

The angle formula

For nonzero vectors u\mathbf{u} and v\mathbf{v} with angle θ\theta between them:

u⋅v=∥u∥ ∥v∥cos⁡θsocos⁡θ=u⋅v∥u∥ ∥v∥.\mathbf{u} \cdot \mathbf{v} = \|\mathbf{u}\|\,\|\mathbf{v}\|\cos\theta \qquad\text{so}\qquad \cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\|\,\|\mathbf{v}\|}.

Because cos⁡θ\cos\theta is positive for acute angles, zero at 90∘90^\circ and negative for obtuse angles, the sign of the dot product tells you a lot at a glance:

u⋅v\mathbf{u} \cdot \mathbf{v}angle θ\theta
positiveacute (0∘≤θ<90∘0^\circ \le \theta < 90^\circ)
zeroright (θ=90∘\theta = 90^\circ)
negativeobtuse (90∘<θ≤180∘90^\circ < \theta \le 180^\circ)

Worked example: Finding the angle between vectors

Find the angle between u=⟨4,1⟩\mathbf{u} = \langle 4, 1 \rangle and v=⟨1,3⟩\mathbf{v} = \langle 1, 3 \rangle (the vectors in the picture).

u⋅v=4(1)+1(3)=7∥u∥=17∥v∥=10\mathbf{u} \cdot \mathbf{v} = 4(1) + 1(3) = 7 \qquad \|\mathbf{u}\| = \sqrt{17} \qquad \|\mathbf{v}\| = \sqrt{10}cos⁡θ=71710=7170≈0.5369⟹θ≈57.5∘.\cos\theta = \frac{7}{\sqrt{17}\sqrt{10}} = \frac{7}{\sqrt{170}} \approx 0.5369 \quad\Longrightarrow\quad \theta \approx 57.5^\circ.

Orthogonal vectors

When θ=90∘\theta = 90^\circ, cos⁡θ=0\cos\theta = 0, so the dot product is 00. The reverse is also true, which gives a fast test for perpendicular vectors with no angles or square roots required.

Orthogonality test

Two nonzero vectors are orthogonal (perpendicular) exactly when u⋅v=0\mathbf{u} \cdot \mathbf{v} = 0.

Worked example: Testing and forcing perpendicularity

a. Are ⟨6,−4⟩\langle 6, -4 \rangle and ⟨2,3⟩\langle 2, 3 \rangle orthogonal?

6(2)+(−4)(3)=12−12=06(2) + (-4)(3) = 12 - 12 = 0. Yes.

b. Find kk so that ⟨k,5⟩\langle k, 5 \rangle is orthogonal to ⟨3,−2⟩\langle 3, -2 \rangle.

Set the dot product equal to zero: 3k+5(−2)=03k + 5(-2) = 0, so 3k=103k = 10 and k=103k = \dfrac{10}{3}.

Common mistake

The dot product is a number, not a vector. Writing ⟨2,5⟩⋅⟨3,−1⟩=⟨6,−5⟩\langle 2, 5 \rangle \cdot \langle 3, -1 \rangle = \langle 6, -5 \rangle is a common mistake. After multiplying matching components, add the results to get one number.

Projection and work

Often you want to know how much of one vector points along another. Picture shining a light straight down onto v\mathbf{v}: the shadow that u\mathbf{u} casts is the projection of u\mathbf{u} onto v\mathbf{v}.

proj⁡vu=(u⋅v∥v∥2)v\operatorname{proj}_{\mathbf{v}}\mathbf{u} = \left( \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{v}\|^2} \right) \mathbf{v}

The number u⋅v∥v∥\dfrac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{v}\|} is the signed length of that shadow, called the scalar component of u\mathbf{u} along v\mathbf{v}.

In physics, only the part of a force that points along the motion does work. If a constant force F\mathbf{F} moves an object along a displacement d\mathbf{d}, the work done is

W=F⋅d=∥F∥ ∥d∥cos⁡θ.W = \mathbf{F} \cdot \mathbf{d} = \|\mathbf{F}\|\,\|\mathbf{d}\|\cos\theta.

Worked example: Pulling a wagon

A child pulls a wagon 3030 meters along level ground with a force of 4040 newtons, using a handle that makes a 35∘35^\circ angle with the ground. How much work is done?

W=40⋅30⋅cos⁡35∘≈1200(0.8192)≈983 joules.W = 40 \cdot 30 \cdot \cos 35^\circ \approx 1200(0.8192) \approx 983 \text{ joules}.

Only the horizontal part of the pull, about 32.832.8 N, moves the wagon forward.

Tip

A dot product of 00 means no work at all. Carrying a box horizontally while pushing straight up on it does no work on the box in the physics sense, because the force and motion are perpendicular.

Practice

Practice 1

Find ⟨3,−4⟩⋅⟨2,5⟩\langle 3, -4 \rangle \cdot \langle 2, 5 \rangle.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Which vector is orthogonal to ⟨4,6⟩\langle 4, 6 \rangle?

Practice 3

Find kk so that ⟨k,3⟩\langle k, 3 \rangle and ⟨2,−8⟩\langle 2, -8 \rangle are orthogonal.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Vectors u\mathbf{u} and v\mathbf{v} have ∥u∥=4\|\mathbf{u}\| = 4, ∥v∥=6\|\mathbf{v}\| = 6 and the angle between them is 120∘120^\circ. Find u⋅v\mathbf{u} \cdot \mathbf{v}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Find the angle, in degrees, between ⟨2,2⟩\langle 2, 2 \rangle and ⟨0,3⟩\langle 0, 3 \rangle.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find the angle between ⟨3,4⟩\langle 3, 4 \rangle and ⟨−5,12⟩\langle -5, 12 \rangle in degrees, rounded to the nearest tenth.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Find proj⁡vu\operatorname{proj}_{\mathbf{v}}\mathbf{u} for u=⟨6,2⟩\mathbf{u} = \langle 6, 2 \rangle and v=⟨3,4⟩\mathbf{v} = \langle 3, 4 \rangle. Enter it as (a,b)(a, b).

Enter a point like (2, -3)

Practice 8

A force of 5050 newtons, directed 30∘30^\circ above the horizontal, drags a sled 1212 meters horizontally. Find the work done in joules, rounded to the nearest tenth.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.