← Chapter 2 §2.3 The Dot Product 点积 · Chapter 2 · Vectors in Space

Calculus Volume 3 · Chapter 2 · Section 2.3

The Dot Product

Two vectors in, one number out. It says how much they agree: positive, zero at a right angle, negative when they point apart.

Colour key u v, F projection remainder q key idea · 3D figures turn when dragged · page links open the textbook

Level 1 · see itWhat the dot product measuresbefore any formula

How much of the pull moves the wagon?

A child pulls a wagon 50 ft with 8 lb, at 55° to the ground (p140).

229 ft·lb

of work — not 8 × 50 = 400. Only the part of the pull along the motion, 8 cos 55° ≈ 4.59 lb, moves the wagon.

W=FdW=Fd assumes the force points along the motion (p143). The dot product counts only the part that agrees.

Red: the part along the ground, 4.59 lb. Dashed: the upright part, 6.55 lb, which does no work.

A number that measures agreement

  1. A number. Multiply matching components and add: uv=u1v1+u2v2+u3v3\mathbf u\cdot\mathbf v=u_1v_1+u_2v_2+u_3v_3 (p132).
  2. Length × length × cos θ. uv=uvcosθ\mathbf u\cdot\mathbf v=\|\mathbf u\|\|\mathbf v\|\cos\theta (p134). Largest pointing the same way, zero at a right angle, negative pointing apart.
  3. Length × shadow. vcosθ\|\mathbf v\|\cos\theta is the shadow of v\mathbf v on the line of u\mathbf u. The shadow, as a vector, is the projection.

Example 2.27a (p140): u=1,4,3\mathbf u=\langle -1,4,3\rangle, v=3,5,1\mathbf v=\langle 3,5,1\rangle. uv=20\mathbf u\cdot\mathbf v=20, θ48.47\theta\approx48.47^\circ, shadow 20/263.9220/\sqrt{26}\approx3.92, and 5.10×3.92205.10\times3.92\approx20.

Red: projuv0.77,3.08,2.31\operatorname{proj}_{\mathbf u}\mathbf v\approx\langle -0.77,3.08,2.31\rangle. Amber dashed: the rest, at right angles to u. Drag to turn.

Positive, zero, negative

u=3,0\mathbf u=\langle 3,0\rangle stays; v\mathbf v, length 2.5, turns: uv=7.5cosφ\mathbf u\cdot\mathbf v=7.5\cos\varphi.

60°
Arc green: acute · grey: right · red: obtuse (p136).

The sign alone tells acute from obtuse — no inverse cosine needed.

angle θu · vshadow of v on u
acute, 0θ<π/20\le\theta<\pi/2positivealong u
right, θ=π/2\theta=\pi/20none
obtuse, π/2<θπ\pi/2<\theta\le\pinegativeagainst u

One picture

u=4\|\mathbf u\|=4, v=3\|\mathbf v\|=3 at 50°, 90°, 135°. Shadow forward: positive. No shadow: zero. Shadow backward: negative.

The dot product measures how much two vectors agree.

Level 2 · compute itAngles, projections, workand four labs

The definition and its rules

Dot product · p132 uv=u1v1+u2v2+u3v3(2.3) \mathbf u\cdot\mathbf v=u_1v_1+u_2v_2+u_3v_3 \tag{2.3}

A scalar. In the plane, drop the third term.

Theorem 2.3 (p132).

rulenamemeans
uv=vu\mathbf u\cdot\mathbf v=\mathbf v\cdot\mathbf ucommutativeagreement is mutual
u(v+w)=uv+uw\mathbf u\cdot(\mathbf v+\mathbf w)=\mathbf u\cdot\mathbf v+\mathbf u\cdot\mathbf wdistributiveshadows of a sum add
c(uv)=(cu)v=u(cv)c(\mathbf u\cdot\mathbf v)=(c\mathbf u)\cdot\mathbf v=\mathbf u\cdot(c\mathbf v)scalars factor outdouble a vector, double the product
vv=v2\mathbf v\cdot\mathbf v=\|\mathbf v\|^2magnitudea length squared is a dot product

(ab)c(\mathbf a\cdot\mathbf b)\,\mathbf c is a number times a vector; a(bc)\mathbf a\cdot(\mathbf b\cdot\mathbf c) means nothing.

Angles, right angles, direction cosines

Angle · p134 cosθ=uvuv(2.5) \cos\theta=\frac{\mathbf u\cdot\mathbf v}{\|\mathbf u\|\,\|\mathbf v\|} \tag{2.5}

0θπ0\le\theta\le\pi: the smaller angle.

Orthogonal · p136 uv    uv=0 \mathbf u\perp\mathbf v\iff\mathbf u\cdot\mathbf v=0

For nonzero vectors; no lengths needed.

Direction cosines · p138 cosα,cosβ,cosγ=vv \langle\cos\alpha,\cos\beta,\cos\gamma\rangle=\frac{\mathbf v}{\|\mathbf v\|}

The angles with i,j,k\mathbf i,\mathbf j,\mathbf k.

Dividing by both lengths leaves pure direction: two vectors agree as much as their unit vectors do.

Projections and work

Vector projection · p140 projuv=uvu2u(2.6) \operatorname{proj}_{\mathbf u}\mathbf v=\frac{\mathbf u\cdot\mathbf v}{\|\mathbf u\|^2}\,\mathbf u \tag{2.6}
Scalar projection compuv=uvu(2.7) \operatorname{comp}_{\mathbf u}\mathbf v=\frac{\mathbf u\cdot\mathbf v}{\|\mathbf u\|} \tag{2.7}
Work · p143 W=FPQ(2.8) W=\mathbf F\cdot\overrightarrow{PQ} \tag{2.8}

lb × ft = ft·lb; N × m = J.

Decomposition (p141): v=p+q\mathbf v=\mathbf p+\mathbf q with p=projuv\mathbf p=\operatorname{proj}_{\mathbf u}\mathbf v and q=vpu\mathbf q=\mathbf v-\mathbf p\perp\mathbf u. One part along u, one at right angles; only the part along the motion does work.

Examples 2.21–2.30

Examplegivenresult
2.21 · p1323,5,21,3,0\langle 3,5,2\rangle\cdot\langle -1,3,0\rangle; (10i4j+7k)(2i+j+6k)(10\mathbf i-4\mathbf j+7\mathbf k)\cdot(-2\mathbf i+\mathbf j+6\mathbf k)12; 18
2.22 · p133a=1,2,3\mathbf a=\langle 1,2,-3\rangle, b=0,2,4\mathbf b=\langle 0,2,4\rangle, c=5,1,3\mathbf c=\langle 5,-1,3\rangle(ab)c=40,8,24(\mathbf a\cdot\mathbf b)\mathbf c=\langle -40,8,-24\rangle; a(2c)=12\mathbf a\cdot(2\mathbf c)=-12; b2=20\|\mathbf b\|^2=20
2.23 · p135(a) i+j+k\mathbf i+\mathbf j+\mathbf k, 2ij3k2\mathbf i-\mathbf j-3\mathbf k; (b) 2,5,6\langle 2,5,6\rangle, 2,4,4\langle -2,-4,4\rangle(a) arccos(2/42)1.88\arccos(-2/\sqrt{42})\approx1.88 rad; (b) π/2\pi/2
2.24 · p1361,0,5\langle 1,0,5\rangle, 10,3,2\langle 10,3,-2\rangleorthogonal: 10+010=010+0-10=0
2.25 · p137direction angles of 2,3,3\langle 2,3,3\rangleα1.130\alpha\approx1.130, β=γ0.877\beta=\gamma\approx0.877 rad
2.26 · p139prices, costs, quantities as 4-vectorssales $16,267.50; profit $14,383.70
2.27 · p140(a) 3,5,1\langle 3,5,1\rangle onto 1,4,3\langle -1,4,3\rangle; (b) 3i2j3\mathbf i-2\mathbf j onto i+6j\mathbf i+6\mathbf j(a) 1013,4013,3013\langle -\tfrac{10}{13},\tfrac{40}{13},\tfrac{30}{13}\rangle; (b) 937i5437j-\tfrac{9}{37}\mathbf i-\tfrac{54}{37}\mathbf j
2.28 · p1418,3,3\langle 8,-3,-3\rangle along 2,3,2\langle 2,3,2\ranglep=1172,3,2\mathbf p=\tfrac{1}{17}\langle 2,3,2\rangle, q=117134,54,53\mathbf q=\tfrac{1}{17}\langle 134,-54,-53\rangle
2.29 · p14220 knots; a 2-knot current 30° off the course20+2cos3021.7320+2\cos30^\circ\approx21.73 knots
2.30 · p144F=5i3j+k\mathbf F=5\mathbf i-3\mathbf j+\mathbf k N, (1,1,1)(9,4,7)(1,1,1)\to(9,4,7) mPQ=8,3,6\overrightarrow{PQ}=\langle 8,3,6\rangle, W=37W=37 J

Also: 6,4\langle 6,-4\rangle along 3,1\langle 3,1\rangle splits into 215,75+95,275\langle \tfrac{21}{5},\tfrac75\rangle+\langle \tfrac95,-\tfrac{27}{5}\rangle (Lab 2's start); the wagon does 8(50)cos552298(50)\cos55^\circ\approx229 ft·lb (p144).

A tiny dot product means nearly perpendicular: in Example 2.28 almost all of v is in q.

Lab 1 · the angle between two vectors

1 1 1 2 −1 −3
presets

Try: Ex 2.23b and Ex 2.24 — a right-angle mark appears. same way: cos θ = 1; opposite: −1.

Lab 2 · drag a projection

3 1 6 −4
presets

Drag the tips. Try: perpendicular — no shadow. obtuse — the shadow points backward. Lengthening u changes nothing: the projection depends only on u's line.

Lab 3 · direction angles in space

2 3 3
presets

cos2α\cos^2\alpha cos2β\cos^2\beta cos2γ\cos^2\gamma always fill the bar.

Try: ⟨1, 1, 1⟩ — all three angles 54.74°. along j — the bar is all teal. The direction cosines forget the length.

Lab 4 · pull the wagon

8 55° 50 0%

Try: θ = 0° — 400 ft·lb. θ = 90° — none. Past 90° — negative: the force takes energy out. Checkpoint 2.29: 30 lb at 60° for 10 ft, 150 ft·lb.

Common mistakes

MistakeResultFix
u1v1,u2v2,u3v3\langle u_1v_1,u_2v_2,u_3v_3\ranglea vector where a number belongsadd the products
Not dividing by the lengthsarccos(2)\arccos(-2) in Example 2.23(a)cosθ=uv/(uv)\cos\theta=\mathbf u\cdot\mathbf v/(\|\mathbf u\|\|\mathbf v\|)
Mixing radians and degrees"1.88°" for Example 2.23(a)1.88 rad = 107.98°
u\|\mathbf u\| for u2\|\mathbf u\|^2 in (2.6)the shadow u\|\mathbf u\| times too long(2.6) has the square; (2.7) does not
projvu\operatorname{proj}_{\mathbf v}\mathbf u for projuv\operatorname{proj}_{\mathbf u}\mathbf va vector along the wrong linethe subscript is the line projected onto
Endpoint for displacementF9,4,7=40\mathbf F\cdot\langle 9,4,7\rangle=40 in Example 2.30PQ=QP\overrightarrow{PQ}=Q-P: 37 J
sin for work8(50)sin553288(50)\sin55^\circ\approx328 ft·lbθ is measured from the motion: cos, 229
a(bc)\mathbf a\cdot(\mathbf b\cdot\mathbf c)a vector dotted with a numberonly (ab)c(\mathbf a\cdot\mathbf b)\,\mathbf c makes sense
"uv=0\mathbf u\cdot\mathbf v=0, so one is 0\mathbf 0"number rules applied to vectorszero means perpendicular

Practice and answers

Exercises from p145; the book's key: p834835, p840.

Checkpoints 2.21–2.29
#taskanswer
2.212,9,13,1,4\langle 2,9,-1\rangle\cdot\langle -3,1,-4\rangle6+9+4=7-6+9+4=7
2.22p=7,0,2,q=2,2,2,r=0,2,3\mathbf p=\langle 7,0,2\rangle,\mathbf q=\langle -2,2,-2\rangle,\mathbf r=\langle 0,2,-3\rangle: (rp)q(\mathbf r\cdot\mathbf p)\mathbf q; p2\|\mathbf p\|^26q=12,12,12-6\mathbf q=\langle 12,-12,12\rangle; 53
2.23angle between 1,2,0,2,4,1\langle 1,2,0\rangle,\langle 2,4,1\ranglearccos(10/105)0.22\arccos(10/\sqrt{105})\approx0.22 rad
2.24x with 2,8,1x,1,2\langle 2,8,-1\rangle\perp\langle x,-1,2\rangle2x82=0x=52x-8-2=0\Rightarrow x=5
2.25direction angles of 3,5,1\langle 3,-5,1\rangleα1.04, β2.58, γ1.40\alpha\approx1.04,\ \beta\approx2.58,\ \gamma\approx1.40 rad
2.26AAA in June: new prices and quantitiessales $15,685.50; profit $14,073.15
2.275ij5\mathbf i-\mathbf j along 4i+2j4\mathbf i+2\mathbf jp=185i+95j, q=75i145j\mathbf p=\tfrac{18}{5}\mathbf i+\tfrac95\mathbf j,\ \mathbf q=\tfrac75\mathbf i-\tfrac{14}{5}\mathbf j
2.28Example 2.29 with the current southeast20+2cos60=2120+2\cos60^\circ=21 knots
2.2930 lb at 60°, 10 ft30(10)cos60=15030(10)\cos60^\circ=150 ft·lb
Exercises
#taskanswerkey step
1233,02,2\langle 3,0\rangle\cdot\langle 2,2\rangle (p145)6two terms in the plane
1252,2,11,2,2\langle 2,2,-1\rangle\cdot\langle -1,2,2\rangle0perpendicular
127(ab)c(\mathbf a\cdot\mathbf b)\mathbf c, (ac)b(\mathbf a\cdot\mathbf c)\mathbf b for 2,0,3,4,7,1,1,1,1\langle 2,0,-3\rangle,\langle -4,-7,1\rangle,\langle 1,1,-1\rangle11,11,11\langle -11,-11,11\rangle; 20,35,5\langle -20,-35,5\ranglenumber first, then scale
131angle, 3,1,4,0\langle 3,-1\rangle,\langle -4,0\rangle2.82 rad; not acutecosθ=12/(410)\cos\theta=-12/(4\sqrt{10})
133angle, 3i, 4i+4j3\mathbf i,\ 4\mathbf i+4\mathbf jπ/4\pi/4; acutecosθ=12/(342)\cos\theta=12/(3\cdot4\sqrt2)
137angle, i+j, jk\mathbf i+\mathbf j,\ \mathbf j-\mathbf kπ/3\pi/3cosθ=1/2\cos\theta=1/2
143orthogonal? 3ij2k, 2i3j+k3\mathbf i-\mathbf j-2\mathbf k,\ -2\mathbf i-3\mathbf j+\mathbf k (p146)no (−5)Theorem 2.5
149α with 2i+3j9i+αj2\mathbf i+3\mathbf j\perp9\mathbf i+\alpha\mathbf jα=6\alpha=-618+3α=018+3\alpha=0
153angle A in triangle A(1,1,8),B(4,3,4),C(3,1,5)A(1,1,8),B(4,-3,-4),C(-3,1,5)68.33°ABAC=24\overrightarrow{AB}\cdot\overrightarrow{AC}=24, lengths 13 and 5
161direction cosines and angles of 2,2,1\langle 2,2,1\rangle (p147)23,23,13\tfrac23,\tfrac23,\tfrac13; 48°, 48°, 71°divide by u=3\|\mathbf u\|=3
167projuv\operatorname{proj}_{\mathbf u}\mathbf v, compuv\operatorname{comp}_{\mathbf u}\mathbf v: u=5i+2j, v=2i+3j\mathbf u=5\mathbf i+2\mathbf j,\ \mathbf v=2\mathbf i+3\mathbf j8029,3229\langle \tfrac{80}{29},\tfrac{32}{29}\rangle; 1629\tfrac{16}{\sqrt{29}}(2.6) and (2.7)
171decompose 3i+2j3\mathbf i+2\mathbf j along 4i3j4\mathbf i-3\mathbf j2425,1825+5125,6825\langle \tfrac{24}{25},-\tfrac{18}{25}\rangle+\langle \tfrac{51}{25},\tfrac{68}{25}\rangleq=vp\mathbf q=\mathbf v-\mathbf p, check pq=0\mathbf p\cdot\mathbf q=0
173methane: distance PR; bond angle between OS,OR\overrightarrow{OS},\overrightarrow{OR}222\sqrt2; 109.47°cosθ=1/3\cos\theta=-1/3
175work, 5,6,2\langle 5,6,-2\rangle N from (3,1,0)(3,-1,0) to (2,3,1)(2,3,1) m (p148)17 N·mPQ=1,4,1\overrightarrow{PQ}=\langle -1,4,1\rangle
17725 lb at 20°, 50 ft1175 ft·lb25(50)cos2025(50)\cos20^\circ

Stretch: Exercise 179, a 500-lb wind at N30°E on a boat sailing north 100 ft: 500(100)cos3043,301.27500(100)\cos30^\circ\approx43{,}301.27 ft·lb.

Level 3 · why it worksWhere the formulas come fromshort arguments

Why u · v = ‖u‖‖v‖ cos θ

The triangle with sides u\mathbf u, v\mathbf v, vu\mathbf v-\mathbf u and the law of cosines (p134):

vu2=u2+v22uvcosθ \|\mathbf v-\mathbf u\|^2=\|\mathbf u\|^2+\|\mathbf v\|^2-2\|\mathbf u\|\|\mathbf v\|\cos\theta vu2=(vu)(vu)=v22uv+u2 \|\mathbf v-\mathbf u\|^2=(\mathbf v-\mathbf u)\cdot(\mathbf v-\mathbf u)=\|\mathbf v\|^2-2\,\mathbf u\cdot\mathbf v+\|\mathbf u\|^2

Compare the right-hand sides. The dot product is the term that turns Pythagoras into the law of cosines; it vanishes exactly at a right angle.

Zero means perpendicular

uv=0    cosθ=0    θ=π2(u,v0) \mathbf u\cdot\mathbf v=0\iff\cos\theta=0\iff\theta=\frac{\pi}{2}\qquad(\mathbf u,\mathbf v\neq\mathbf 0)
Exercise 158 · the diagonals of a rhombus

(u+v)(uv)=u2v2=0(\mathbf u+\mathbf v)\cdot(\mathbf u-\mathbf v)=\|\mathbf u\|^2-\|\mathbf v\|^2=0 when u=v\|\mathbf u\|=\|\mathbf v\|. A geometry proof in one line of algebra.

Direction cosines' squares add to 1

cos2α+cos2β+cos2γ=v12+v22+v32v2=1 \cos^2\alpha+\cos^2\beta+\cos^2\gamma=\frac{v_1^2+v_2^2+v_3^2}{\|\mathbf v\|^2}=1

Example 2.25: 422+922+922=1\tfrac{4}{22}+\tfrac{9}{22}+\tfrac{9}{22}=1. A vector cannot make small angles with all three axes at once.

Where the projection comes from

Write v=tu+q\mathbf v=t\,\mathbf u+\mathbf q with qu\mathbf q\perp\mathbf u and dot with u\mathbf u:

uv=tu2t=uvu2 \mathbf u\cdot\mathbf v=t\,\|\mathbf u\|^2\quad\Longrightarrow\quad t=\frac{\mathbf u\cdot\mathbf v}{\|\mathbf u\|^2}

The same tt minimizes vtu2=u2t22(uv)t+v2\|\mathbf v-t\mathbf u\|^2=\|\mathbf u\|^2t^2-2(\mathbf u\cdot\mathbf v)\,t+\|\mathbf v\|^2; in Lab 2's start, t=1.4t=1.4. The projection is the nearest point of the line, and the drop line meets it at a right angle.

Why |cos θ| never exceeds 1

That parabola is never negative, so its discriminant is not positive:

4(uv)24u2v20uvuv 4(\mathbf u\cdot\mathbf v)^2-4\|\mathbf u\|^2\|\mathbf v\|^2\le0\quad\Longrightarrow\quad|\mathbf u\cdot\mathbf v|\le\|\mathbf u\|\,\|\mathbf v\|

Equality only for parallel vectors. Example 2.27a: 20263530.1720\le\sqrt{26}\sqrt{35}\approx30.17.

The proof never uses "3": for the price lists of Example 2.26, the dot product defines the angle.

Where it is used next

WhereThe dot product does
§2.4 Cross producta second product with length uvsinθ\|\mathbf u\|\|\mathbf v\|\sin\theta: dot measures agreement, cross measures spread
§2.5 Planesn(rr0)=0\mathbf n\cdot(\mathbf r-\mathbf r_0)=0: every direction in the plane is perpendicular to the normal
§2.5 Distancespoint to plane = the scalar projection onto the normal
§4.6 Directional derivativesfu\nabla f\cdot\mathbf u, the shadow of the gradient
§6.2 Line integralswork along a curve adds up Fdr\mathbf F\cdot d\mathbf r