You can add vectors and scale them, but so far there is no way to multiply two vectors together. The dot product is the first such product. It takes two vectors and returns a single number, and that number measures how much the vectors point in the same direction. With it you can compute angles, test for perpendicularity, split a vector into pieces, and calculate work.
Definition and algebraic properties
Definition
Dot product
The dot product of a=⟨a1,a2,a3⟩ and b=⟨b1,b2,b3⟩ is the scalar
a⋅b=a1b1+a2b2+a3b3.
Multiply matching components and add. For example, ⟨2,−1,3⟩⋅⟨4,0,−5⟩=8+0−15=−7. The result is a number, not a vector, which is why the dot product is also called the scalar product.
Directly from the definition, for all vectors a,b,c and scalars c:
a⋅a=∣a∣2
a⋅b=b⋅a
a⋅(b+c)=a⋅b+a⋅c
(ca)⋅b=c(a⋅b)=a⋅(cb)
0⋅a=0
Property 1 is especially useful: it turns lengths into dot products, which you can then expand with properties 2 and 3 just like multiplying out binomials.
The geometric meaning
The angleθ between two nonzero vectors is the angle between them when they are placed tail to tail, chosen so that 0≤θ≤π.
Dot product and angle
If θ is the angle between nonzero vectors a and b, then
a⋅b=∣a∣∣b∣cosθ,socosθ=∣a∣∣b∣a⋅b.
Why it's true. Put a and b tail to tail. The third side of the triangle they form is a−b. The law of cosines says
∣a−b∣2=∣a∣2+∣b∣2−2∣a∣∣b∣cosθ.
On the other hand, using the algebraic properties,
∣a−b∣2=(a−b)⋅(a−b)=∣a∣2−2a⋅b+∣b∣2.
Comparing the two expressions gives a⋅b=∣a∣∣b∣cosθ.
Because lengths are positive, the sign of a⋅b is the sign of cosθ:
a⋅b>0: the angle is acute (the vectors point roughly the same way).
a⋅b=0: the angle is 2π. The vectors are orthogonal (perpendicular).
a⋅b<0: the angle is obtuse.
By convention the zero vector is orthogonal to every vector, so the clean statement is: a and b are orthogonal if and only if a⋅b=0.
Worked example: Orthogonality and angles
(a) Show that ⟨2,−1,3⟩ and ⟨4,5,−1⟩ are orthogonal.
(b) Find the angle between a=⟨1,2,2⟩ and b=⟨3,0,4⟩.
Solution. (a) 8−5−3=0, so the vectors are orthogonal.
(b) a⋅b=3+0+8=11, ∣a∣=3 and ∣b∣=5. So
cosθ=1511,θ=cos−1(1511)≈42.8∘.
The angles a vector a makes with the positive x-, y- and z-axes are its direction anglesα,β,γ. Dotting with i, j, k gives the direction cosines
cosα=∣a∣a1,cosβ=∣a∣a2,cosγ=∣a∣a3.
They are exactly the components of the unit vector a/∣a∣, so cos2α+cos2β+cos2γ=1.
Projections
Often you want to know how much of a vector b lies along the direction of another vector a. Drop a perpendicular from the head of b to the line through a. The signed length of the shadow is ∣b∣cosθ, which equals ∣a∣a⋅b.
Scalar and vector projections of b onto a
compab=∣a∣a⋅b,projab=(∣a∣2a⋅b)a.
The scalar projection (component) is a number, negative when the angle is obtuse. The vector projection is that number times the unit vector a/∣a∣.
The leftover piece b−projab is orthogonal to a. So every vector splits uniquely into a part parallel to a plus a part perpendicular to a, a decomposition you'll use for forces on ramps, velocity components and, later, the distance from a point to a plane.
Worked example: Projection and decomposition
Let a=⟨2,−2,1⟩ and b=⟨4,1,−3⟩. Find compab and projab, and write b as a vector parallel to a plus one orthogonal to a.
Solution.a⋅b=8−2−3=3 and ∣a∣=3. So
compab=33=1,projab=93⟨2,−2,1⟩=⟨32,−32,31⟩.
The orthogonal part is b−projab=⟨310,35,−310⟩. Check: its dot product with a is 320−310−310=0.
Common mistake
Watch the order and the power. projab projects bontoa, so you divide by the length of a, the vector you project onto. And the vector projection divides by ∣a∣2, not ∣a∣: one factor of ∣a∣ comes from the scalar projection and the other from making a a unit vector.
Work
If a constant force F moves an object along a displacement D, only the component of the force along the motion does work. That component is ∣F∣cosθ, so the work is W=(∣F∣cosθ)∣D∣=F⋅D.
Worked example: Work done by a constant force
A constant force F=⟨10,4,−2⟩ newtons moves an object in a straight line from (1,0,2) to (5,3,2), with distances in meters. Find the work done.
Solution. The displacement is D=⟨4,3,0⟩, so W=F⋅D=40+12+0=52 joules. The z-component of the force does no work because the motion is horizontal.
Practice
Practice 1
Compute ⟨3,−2,5⟩⋅⟨1,4,2⟩.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 2
Find the value of c that makes ⟨c,3,−2⟩ orthogonal to ⟨4,−2,c⟩.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 3
Find the angle, in degrees, between i+j and i+k.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 4
Find the angle between ⟨2,−1,2⟩ and ⟨−3,6,2⟩, in degrees, rounded to the nearest tenth.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 5
Find the scalar projection of b=⟨5,−1,4⟩ onto a=⟨1,2,−2⟩.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 6
Find the vector projection of ⟨3,4,5⟩ onto ⟨1,1,1⟩.
Enter a point like (2, -3)
Practice 7
A force F=⟨3,−2,6⟩ newtons moves an object in a straight line from (0,1,−1) to (4,3,2), with distances in meters. Find the work done, in joules.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 8
Vectors a and b satisfy ∣a∣=4, ∣b∣=5 and a⋅b=10. Find ∣a−b∣.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.