Using the Dot Product to Find the Angle between Two Vectors
When you place two nonzero vectors in standard position (starting from the origin), they form an angle between them. The dot product provides a powerful way to find this angle.
Figure 1. Let [latex]θ[/latex] be the angle between two nonzero vectors [latex]{\bf{u}}[/latex] and [latex]{\bf{v}}[/latex] such that [latex]0≤θ≤π[/latex].
The dot product has both algebraic and geometric interpretations. We’ve seen the algebraic version (multiply components and add). The geometric version connects the dot product to angles.
geometric dot product formula
The dot product of two vectors is the product of the magnitude of each vector and the cosine of the angle between them:
Place vectors [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] in standard position and consider the vector [latex]\mathbf{v} - \mathbf{u}[/latex] (Figure 2). These three vectors form a triangle with side lengths [latex]||\mathbf{u}||[/latex], [latex]||\mathbf{v}||[/latex], and [latex]||\mathbf{v} - \mathbf{u}||[/latex].
Figure 2. The lengths of the sides of the triangle are given by the magnitudes of the vectors that form the triangle.
The law of cosines describes the relationship among the side lengths of the triangle and the angle [latex]\theta[/latex]. Applying the law of cosines here gives
Since we measure the smallest angle between vectors, we have [latex]0° \leq \theta \leq 180°[/latex] (or [latex]0 \leq \theta \leq \pi[/latex] radians). The inverse cosine function is unique over this range, so we can determine [latex]\theta[/latex] precisely.
Find the measure of the angle between each pair of vectors.
If [latex]\cos{\theta} = 0[/latex], then the vectors, when placed in standard position, form a right angle.
Figure 3. (a) An acute angle has [latex]0< \cos{\theta}<1[/latex]. (b) An obtuse angle has [latex]−1<\cos\theta<0[/latex]. (c) A straight line has [latex]\cos\theta=−1[/latex]. (d) If the vectors have the same direction, [latex]\cos\theta=1[/latex]. (e) If the vectors are orthogonal (perpendicular), [latex]\cos\theta=0[/latex]
Orthogonal Vectors
The right angle case is so important that it has special terminology and a simple test. Nonzero vectors [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] are orthogonal (perpendicular) if and only if [latex]\mathbf{u} \cdot \mathbf{v} = 0[/latex].
orthogonal vectors
The nonzero vectors [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] are orthogonal vectors if and only if [latex]\mathbf{u} \cdot \mathbf{v} = 0[/latex].
Proof
Let [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] be nonzero vectors, and let [latex]\theta[/latex] denote the angle between them. First, assume [latex]\mathbf{u} \cdot \mathbf{v} = 0[/latex]. Then
However, [latex]||\mathbf{u}|| \neq 0[/latex] and [latex]||\mathbf{v}|| \neq 0[/latex], so we must have [latex]\cos{\theta} = 0[/latex]. Hence, [latex]\theta = 90^\circ[/latex], and the vectors are orthogonal.
Now assume [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] are orthogonal. Then [latex]\theta = 90^\circ[/latex] and we have
Terminology: We say vectors are orthogonal, lines are perpendicular, and surfaces have normal vectors. All three terms indicate 90° angles, but context determines which to use.Determine whether [latex]\mathbf{p} = \langle 1,0,5 \rangle[/latex] and [latex]\mathbf{q} = \langle 10,3,-2 \rangle[/latex] are orthogonal vectors.
Using the definition, we need only check the dot product of the vectors:
The angles a vector makes with the coordinate axes are called direction angles. These are crucial in applications like engineering, where precise angular measurements matter—a small error in a rocket’s launch angle can cause it to miss its target by hundreds of miles.
Direction angles are often calculated by using the dot product and the cosines of the angles, called the direction cosines. Therefore, we define both these angles and their cosines.
direction angles
The direction angles of a vector are the angles it makes with the positive [latex]x[/latex]-, [latex]y[/latex]-, and [latex]z[/latex]-axes. The direction cosines are the cosines of these angles.
Figure 5. Angle [latex]\alpha[/latex] is formed by vector [latex]{\bf{v}}[/latex] and unit vector [latex]{\bf{i}}[/latex]. Angle [latex]\beta[/latex] is formed by vector [latex]{\bf{v}}[/latex] and unit vector [latex]{\bf{j}}[/latex]. Angle [latex]\gamma[/latex] is formed by vector [latex]{\bf{v}}[/latex] and unit vector [latex]{\bf{k}}[/latex].
For vector [latex]\mathbf{v} = \langle 2,3,3 \rangle[/latex], the direction cosines are [latex]\cos \alpha = \frac{2}{\sqrt{22}}[/latex], [latex]\cos \beta = \frac{3}{\sqrt{22}}[/latex], and [latex]\cos \gamma = \frac{3}{\sqrt{22}}[/latex], giving direction angles [latex]\alpha = 1.130[/latex] rad, [latex]\beta = 0.877[/latex] rad, and [latex]\gamma = 0.877[/latex] rad.