12.3 The Dot Product: Class Notes
12.3a
Recall
Scalar multiplication:
There are two types of vector multiplication: the dot product and the cross product.
Definitions of the dot product: Let and .
Exercise
Find the dot product of and .
Solution
Multiply matching components and add: , , and .
Or, written with the standard basis vectors:
Answer:
Note: the result of the dot product is a scalar (or a real-valued variable expression), NOT A VECTOR.
, where is the angle between and .
Exercise
Find the angle between and from the previous exercise.
Solution
Find both magnitudes: and . With :
So is the angle between and .
Answer:
To connect the two definitions, let and share an initial point in , and let and be their terminal points, respectively.

Left: (length ) and (length ) start at the same point with angle between them; ends at and ends at . The third side of the triangle is , with length . Right (the Law of Cosines, in orange): a triangle with vertices , , and opposite sides , , satisfies .
The third side of the triangle is , with length . The Law of Cosines says that a triangle with sides , , and angle opposite satisfies . Here the angle is opposite the side .
By the Law of Cosines,
Write each squared length in components:
Expand each square on the left, for example . The squares appear on both sides and cancel, leaving
Divide both sides by :
In the sum stops at ; in it is .
Orthogonal vectors
If the angle between and is , then .
Two vectors that meet at a right angle are said to be orthogonal.
Properties of the Dot Product
If , , and are vectors in and is a scalar, then
12.3b
Direction cosines: let , , and be angles made between a vector and the -, -, and -axes, respectively.

The vector drawn from the origin, with the unit vectors , , and along the axes. The angle from to the -axis is , to the -axis is , and to the -axis is .
Recall
The angle between two vectors satisfies .
If we replace with (whose length is 1), we get
Likewise,
, ,
These are called the direction cosines. Note that .
We can also represent as
so is a unit vector in the direction of .
12.3c
Scalar projection of onto

Left: a vector at angle to the positive -axis has horizontal part along the -axis and vertical part along the -axis. Right: and share a tail with angle between them. A dashed segment drops from the head of perpendicular to ; the arrow along from the common tail to the foot of that segment is the projection of onto , with length .
In the plane, , where is the angle from the -axis. In the same way, when is the angle between and , the projection of onto has length .
The length of the projection vector is the scalar projection of onto and is denoted (the component of in the direction of ).
Recall
, so .
Vector projection of onto
The projection vector has the same direction as and length . This is written
The first factor, the length, is ; the second, the unit vector (direction), is . Together they give the vector projection of onto .
12.3d
Exercise
Find the scalar and vector projections of onto .
,
Solution
Scalar projection: Vector projection:
Both are taken onto , so both use the length of :
a)
Answer:
b)
Answer: