Skip to main content
Logo image

Engineering Statics: Open and Interactive

Section 2.7 Dot Products

Unlike ordinary algebra where there is only one way to multiply numbers, there are two distinct vector multiplication operations: dot product and the cross product. Alternately, the first is referred to as the scalar product because its result is a scalar, and the second as the vector product because its result is a vector. The dot product and its applications will be discussed in this section and the cross product in the next.

Subsection 2.7.1 Calculation of the Dot product

For two vectors \(\vec{A}= \langle A_x, A_y, A_z \rangle\) and \(\vec{B} = \langle B_x, B_y, B_z \rangle,\) the dot product multiplication is computed by summing the products of the components.
\begin{equation} \vec{A} \cdot \vec{B} = A_x B_x + A_y B_y + A_z B_z\tag{2.7.1} \end{equation}
It can be shown that an alternate, equivalent method to compute the dot product is
\begin{equation} \vec{A} \cdot \vec{B} = | \vec{A} | | \vec{B} |\cos \theta = A\ B\ \cos \theta\tag{2.7.2} \end{equation}
where \(\theta\) in the equation is the angle between the two vectors and \(| \vec{A} |\) and \(| \vec{B} |\) are the magnitudes of \(\vec{A}\) and \(\vec{B}\text{.}\)
We can conclude from the second equation that the dot product of two perpendicular vectors is zero, because \(\cos \ang{90} = 0\text{,}\) and that the dot product of two parallel vectors equals the product of their magnitudes.
When dotting unit vectors that have a magnitude of one, the dot products of a unit vector with itself is one and the dot product two perpendicular unit vectors is zero, so for \(\ihat\text{,}\) \(\jhat\text{,}\) and \(\khat\) we have
\begin{align*} \ihat \cdot \ihat \amp = 1 \amp \jhat \cdot \ihat \amp = 0 \amp \khat \cdot \ihat \amp = 0\\ \ihat \cdot \jhat \amp = 0 \amp \jhat \cdot \jhat \amp = 1 \amp \khat \cdot \jhat \amp = 0\\ \ihat \cdot \khat \amp = 0 \amp \jhat \cdot \khat \amp = 0 \amp \khat \cdot \khat \amp = 1 \end{align*}
Dot products are commutative, associative and distributive:
  1. Commutative. The order does not matter.
    \begin{equation} \vec{A}\cdot\vec{B} = \vec{B}\cdot\vec{A}\tag{2.7.3} \end{equation}
  2. Associative. It does not matter whether you multiply a scalar value \(C\) by the final dot product, or either of the individual vectors, you will still get the same answer.
    \begin{equation} C\left( \vec{A}\cdot\vec{B} \right ) = \left( C\ \vec{A} \right) \cdot\vec{B}= \vec{A}\cdot \left ( C\ \vec{B} \right )\tag{2.7.4} \end{equation}
  3. Distributive. If you are dotting one vector \(\vec{A}\) with the sum of two more \((\vec{B}+\vec{C})\text{,}\) you can either add \(\vec{B}+\vec{C}\) first, or dot \(\vec{A}\) by both and add the final value.
    \begin{equation} \vec{A}\cdot\left( \vec{B} + \vec{C} \right ) = \left(\vec{A}\cdot\vec{B}\right)+ \left(\vec{A}\cdot \vec{C}\right)\tag{2.7.5} \end{equation}
Dot products can be used to compute the magnitude of a vector, determine the angle between two vectors, and find the rectangular component or projection of a vector in a specified direction. These applications will be discussed in the following sections.

Subsection 2.7.2 Magnitude of a Vector

Dot products can be used to find vector magnitudes. When a vector is dotted with itself using (2.7.1), the result is the square of the magnitude of the vector. (Recall that \(|\vec{A}|\) and \(A\) are alternate notations for the magnitude of vector \(\vec{A}.)\)
\begin{equation} \vec{A} \cdot \vec{A} = |\vec{A}|^2 = A^2\text{.}\tag{2.7.6} \end{equation}
The proof is trivial. By the definition of the dot product (2.7.1) and the Pythagorean theorem:
\begin{align*} \vec{A} \cdot \vec{A} \amp = A_x A_x + A_y A_y\\ \amp = A_x^2 + A_y^2 = A^2\\ \amp = |\vec{A}|^2 \end{align*}
Taking the square root of each side gives the magnitude of \(\vec{A}\)
\begin{equation} \sqrt{\vec{A} \cdot \vec{A}} = A = |\vec{A}|.\tag{2.7.7} \end{equation}
The result is similar for three-dimensional vectors.

Example 2.7.1. Find Vector Magnitude using the Dot Product.

Find the magnitude of vector \(\vec{F}\) with components \(F_x = \N{30}\text{,}\) \(F_y=\N{-40}\) and \(F_z = \N{50}\)
Answer.
\begin{equation*} F = |\vec{F}| = \N{70.7} \end{equation*}
Solution.
\begin{align*} \vec{F} \amp = \langle \N{30}, \N{-40}, \N{50} \rangle\\ \\ \vec{F} \cdot \vec{F} \amp = F_x^2 + F_y^2 + F_z^2\\ \amp = (\N{30})^2 +(\N{-40})^2 + (\N{50})^2\\ \amp = \N{5000}^2\\ \\ F \amp = |\vec{F}| = \sqrt{\vec{F} \cdot \vec{F}}\\ \amp = \sqrt{\N{5000}^2}\\ \amp = \N{70.7} \end{align*}

Subsection 2.7.3 Angle between Two Vectors

A second application of the dot product is to find the angle between two vectors. Equation (2.7.2) provides the procedure.
\begin{align} \vec{A} \cdot \vec{B} \amp = | \vec{A} | | \vec{B} |\cos \theta \notag\\ \cos \theta \amp = \frac{\vec{A} \cdot \vec{B}}{ | \vec{A} | | \vec{B} |}\tag{2.7.8} \end{align}

Example 2.7.2. Angle between Orthogonal Unit Vectors.

Find the angle between \(\ihat= \langle 1,0,0 \rangle\) and \(\jhat =\langle 0,1,0 \rangle\text{.}\)
Answer.
\begin{equation*} \theta= \ang{90} \end{equation*}
Solution.
\begin{align*} \cos \theta \amp = \frac{\ihat \cdot \jhat}{ | \ihat | | \jhat |}\\ \amp = \frac{(1)(0) + (0)(1) + (0)(0)}{(1)(1)}\\ \amp = 0 \\ \\ \theta \amp = \cos^{-1}(0) \\ \amp = \ang{90} \end{align*}
This shows that \(\ihat\) and \(\jhat\) are perpendicular to each other.

Example 2.7.3. Angle between Two Vectors.

Find the angle between \(\vec{F} = \langle \N{100}, \N{200}, \N{-50} \rangle\) and \(\vec{G} = \langle \N{-75}, \N{150}, \N{-40} \rangle\text{.}\)
Answer.
\begin{equation*} \theta= \ang{51.7} \end{equation*}
Solution.
\begin{align*} \cos \theta \amp = \frac{\vec{F} \cdot \vec{G}}{ | \vec{F} | | \vec{G} |}\\ \amp = \frac{ F_x G_x + F_y G_y + F_z G_z }{\sqrt{F_x^2 + F_y^2 + F_z^2}\sqrt{G_x^2 + G_y^2 + G_z^2}}\\ \amp = \frac{(100)(-75) + (200)(150) + (-50)(-40)} {\sqrt{100^2 + 200^2 + (-50)^2} \sqrt{(-75)^2 + 150^2 + (-40)^2}}\\ \amp = \frac{24500}{(229.1)(172.4)}\\ \amp = 0.620\\ \\ \theta \amp = \cos^{-1}(0.620) \\ \amp = \ang{51.7} \end{align*}

Subsection 2.7.4 Vector Projection

The dot product is used to find the projection of one vector onto another. You can think of a projection of \(\vec{B}\) on \(\vec{A}\) as a vector the length of the shadow of \(\vec{B}\) on the line of action of \(\vec{A}\) when the sun is directly above \(\vec{A}\text{.}\) More precisely, the projection of \(\vec{B}\) onto \(\vec{A}\) produces the rectangular component of \(\vec{B}\) in the direction parallel to \(\vec{A}\text{.}\) This is one side of a rectangle aligned with \(\vec{A}\text{,}\) having \(\vec{B}\) as its diagonal.
This is illustrated in Figure 2.7.4, where \(\vec{u}\) is the projection of \(\vec{B}\) onto \(\vec{A}\text{,}\) or alternately \(\vec{u}\) is the rectangular component of \(\vec{B}\) in the direction of \(\vec{A}\text{.}\)
In this text we will use the symbols
  • \(\proj_{\vec{A}}\vec{B}\) to mean the vector projection of \(\vec{B}\) on \(\vec{A}\)
  • \(|\proj_{\vec{A}}\vec{B}|\) to mean the magnitude of the vector projection, a positive or zero-valued scalar, and
  • \(\|\proj_{\vec{A}}\vec{B}\|\) to mean the scalar projection. This value represents the component of \(\vec{B}\) in the \(\vec{A}\) direction, and can have a positive, zero, or negative value.
As we have mentioned before, the magnitude of a vector is its length and is always positive or zero, while a scalar component is a signed value that can be positive or negative. When a scalar component is multiplied by a unit vector the result is a vector in that direction when the scalar component is positive, or \(\ang{180}\) opposite when the scalar component is negative.

Instructions.

This interactive demonstrates the relationship between vectors \(\vec{A}\) and \(\vec{B}\) and the projection of \(\vec{B}\) onto \(\vec{A}\text{.}\) The checkbox switches between showing \(\proj_\vec{A}\vec{B}\) and \(\proj_\vec{B}\vec{A}\text{.}\)
Figure 2.7.4. Vector projection in two dimensions.
The interactive shows that the projection is the adjacent side of a right triangle with \(\vec{B}\) as the hypotenuse. From the definition of the dot product (2.7.2) we find that
\begin{equation} \vec{A}\cdot \vec{B} = A ( B\ \cos \theta) = A\ \|\proj_{\vec{A}}\vec{B}\|\text{,}\tag{2.7.9} \end{equation}
where \(B\ \cos \theta\) is the scalar component of the projection. So, the dot product of \(\vec{A}\) and \(\vec{B}\) gives us the projection of \(\vec{B}\) onto \(\vec{A}\) times the magnitude of \(\vec{A}\text{.}\) This value will be positive when \(\theta < \ang{90}\text{,}\) negative when \(\theta > \ang{90}\text{,}\) and zero when the vectors are perpendicular because of the properties of the cosine function.
So, to find the scalar value of the projection of \(\vec{B}\) onto \(\vec{A}\) we divide by the magnitude of \(\vec{A}\text{.}\)
\begin{equation} \|\proj_{\vec{A}}\vec{B} \| =\frac{\vec{A}\cdot \vec{B}}{A}=\frac{\vec{A}}{A} \cdot \vec{B}=\hat{\vec{A}}\cdot \vec{B}\tag{2.7.10} \end{equation}
where \(\hat{\vec{A}}=\dfrac{\vec{A}}{A}\) is the unit vector in the dirction of \(\vec{A}\text{.}\)
If you want the vector projection of \(\vec{B}\) onto \(\vec{A}\text{,}\) as opposed to the scalar projection we just found, multiply the scalar projection by the unit vector \(\hat{\vec{A}}\text{.}\)
\begin{equation} \proj_{\vec{A}}\vec{B} = \|\proj_{\vec{A}}\vec{B} \| \hat{\vec{A}} = \left (\hat{\vec{A}} \cdot \vec{B} \right )\hat{\vec{A}}\tag{2.7.11} \end{equation}
Similarly, the vector projection of \(\vec{A}\) onto \(\vec{B}\) is
\begin{equation} \proj_{\vec{B}}\vec{A} = \|\proj_{\vec{B}}\vec{A} \| \hat{\vec{B}} ={\left (\vec{A} \cdot \hat{\vec{B}} \right )\hat{\vec{B}}}\tag{2.7.12} \end{equation}
The spatial interpretation of the results the scalar projection \(\|\proj_{\vec{A}}\vec{B} \|\) is
  • Positive values mean that \(\vec{A}\) and \(\vec{B}\) are generally in the same direction.
  • Negative values mean that \(\vec{A}\) and \(\vec{B}\) are generally in opposite directions.
  • Zero means that \(\vec{A}\) and \(\vec{B}\) are perpendicular.
  • Magnitude smaller than \(\vec{B}\) This is the most common answer. This means that the vectors are neither parallel nor perpendicular.
  • Magnitude equal to \(\vec{B}\) means that the vectors point in the same direction, and all of \(\vec{B}\) acts in the direction of \(\vec{A}\text{.}\)
  • Magnitude larger than \(\vec{B}\) This answer is impossible. Check your algebra; you might have forgotten to divide by the magnitude of \(\vec{A}\text{.}\)

Instructions.

This interactive shows the vector projection of \(\vec{A}\) on \(\vec{B}\) or of \(\vec{B}\) on \(\vec{A}\text{.}\)
You may change \(\vec{A}\) and \(\vec{B}\) by moving the red dots or entering values into the table cells. Click dot to switch between \(x\)-\(y\) mode and \(z\) mode. The components of \(\vec{A}\) and \(\vec{B}\) can also be entered into the table.
Figure 2.7.5. Vector projections in three dimensions.

Subsection 2.7.5 Perpendicular Components

The final application of dot products is to find the component of one vector perpendicular to another.
To find the component of \(\vec{B}\) perpendicular to \(\vec{A}\text{,}\) first find the vector projection of \(\vec{B}\) on \(\vec{A}\text{,}\) then subtract that from \(\vec{B}\text{.}\) What remains is the perpendicular component.
\begin{equation} \vec{B}_\perp = \vec{B} - \proj_{\vec{A}}\vec{B}\tag{2.7.13} \end{equation}
To find the component of vector B perpendicular to vector A, first find the vector projection of B on A, then subtract that from B. What remains is the perpendicular component.
Figure 2.7.6. Perpendicular and parallel components of \(\vec{B}\text{.}\)

Example 2.7.7. Dot Products.

A cable pulls with tension \(\vec{T}=\N{\langle -50, 80, 40 \rangle}\) on a \(\m{0.4}\) long anchor \(AB\) embedded in a concrete wall. The anchor lies in the \(xy\) plane at an angle \(\alpha = \ang{30}\) from the \(x\) axis.
A cable force pulls on an anchor ring centered on xyz axis origin.
For the system above, compute the following:
(a)
Find the dot product of the cable tension \(\vec{T}\) and the anchor \(\vec{AB}\)
Answer.
\begin{equation*} \vec{T} \cdot \vec{AB} =\Nm{-33.32} \end{equation*}
Solution.
When you know the magnitudes and angle between two vectors, it is easiest to use the second dot product equation (2.7.2), but in this case it will be easier to find the components of \(\vec{AB}\) and use (2.7.1).
\begin{align*} \vec{T} \amp =\N{\langle -50, 80, 40 \rangle} \\ \vec{AB} \amp = \m{\langle 0.4 \cos \ang{30}, -0.4 \sin \ang{30}, 0 \rangle}\\ \amp = \m{\langle 0.3464, -0.2, 0 \rangle} \\ \\ \vec{T} \cdot \vec{AB} \amp = T_x \left(AB_x \right) + T_y \left( AB_y \right) + T_z \left( AB_z \right)\\ \amp = \left( \N{-50} \right) \left( \m{0.3464} \right) + \left( \N{80} \right) \left( \m{-0.2} \right) + \left( \N{40} \right) \left( \m{0} \right)\\ \amp = \Nm{-33.32} \end{align*}
The units of a dot product are the product of the units of the two vectors.
(b)
Find the angle \(\theta\) between the cable tension \(\vec{T}\) and the anchor \(\vec{AB}\text{.}\)
Answer.
\begin{equation*} \theta = \ang{144.38} \end{equation*}
Solution.
With the dot product \(\vec{T} \cdot \vec{AB}\) known from the previous step, we can use the (2.7.2) to find the angle between force \(\vec{T}\) and anchor.
\begin{equation*} \vec{T} \cdot \vec{AB} = |\vec{T}| |\vec{AB}| \cos \theta = \Nm{-33.32} \end{equation*}
The magnitude of \(|\vec{AB}| = \m{0.4}\) was given but we need to calculate the magnitude of \(|\vec{T}|\text{,}\)
\begin{equation*} |\vec{T}| =\sqrt{\left( -50 \right)^2 + 80^2 + 40^2} = \N{102.47} \end{equation*}
\begin{align*} \theta \amp = \cos^{-1} \frac{\vec{T} \cdot \vec{AB}}{|\vec{T} | |\vec{AB} |}\\ \amp = \cos^{-1}\ \frac{\Nm{-33.32}}{\left( \N{102.47} \right ) \left(\m{0.4} \right)}\\ \amp = \ang{144.38} \end{align*}
Note that \(\theta \gt \ang{90}\) correctly corresponds to the negative dot product and indicates that the two vectors generally oppose each other.
(c)
Find the scalar projection of the the cable tension \(\vec{T}\) onto the anchor \(\vec{AB}\text{.}\)
Answer.
\begin{equation*} ||\proj_{\vec{AB}}\vec{T}|| = \N{-83.30} \end{equation*}
Solution 1.
Recall from Subsection 2.7.4 that the scalar projection is the scalar component of one vector in the direction of another, in other words, how much of one vector is parallel to another. This is one of the most direct and practical applications of the dot product.
The dot product of \(\vec{T}\) with \(\vec{AB}\) gives the product of the length of the anchor \(AB\) and the scalar projection of the tension in the direction of the anchor.
\begin{equation*} \vec{T}\cdot \vec{AB} = AB \left( T \cos \theta \right ) = AB \|\proj_{\vec{AB}}\vec{T}\| \end{equation*}
and has units of N-m.
To find the projection, divide the dot product by the magnitude of \(\vec{AB}\)
\begin{align*} \|\proj_{\vec{AB}}\vec{T}\| \amp = \frac {\vec{T} \cdot \vec{AB}}{AB} = \frac{-33.32\ \textrm{N} \cancel{\textrm{m}}}{0.4\ \cancel{\textrm{m}}}\\ \amp = \N{-83.30} \end{align*}
Solution 2.
Alternately, you can apply (2.7.10) and calculate the calculate the dot product of force vector \(\vec{T}\) with the unit vector \(\widehat{\vec{AB}}\text{.}\)
First, find the unit vector
\begin{equation*} \widehat{\vec{AB}} = \frac{\vec{AB}}{AB}= \frac{\m{\langle 0.3464, -0.2, 0 \rangle}}{\m{0.4}} = \langle 0.866, -0.5, 0 \rangle \end{equation*}
Or, since \(\vec{AB}\) is in the \(xy\) plane with its direction defined by the \(\alpha = \ang{30}\text{,}\) the unit vector \(\widehat{\vec{AB}}\) is found
\begin{equation*} \widehat{\vec{AB}} = \langle \cos \ang{30}, - \sin \ang{30}, 0 \rangle = \langle 0.866, -0.5, 0 \rangle\text{.} \end{equation*}
Then find the projection
\begin{align*} \|\proj_{\vec{AB}}\vec{T}\| \amp = \vec{T} \cdot \widehat{\vec{AB}} \\ \amp = \left( \N{-50} \right) \left( 0.866 \right) + \left( \N{80} \right) \left( -0.5 \right) + \left( \N{40} \right) \left( 0 \right)\\ \amp = \N{-83.30} \end{align*}
(d)
Find the vector projection of the cable tension \(\vec{T}\) onto the anchor \(\vec{AB}\text{.}\)
Answer.
\begin{equation*} \proj_{\vec{AB}}\vec{T} = \N{\langle -72.14, 41.65, 0 \rangle} \end{equation*}
Solution.
The vector projection is the scalar projection value multiplied by a unit direction vector to turn it a vector. So we multiply the scalar projection with the unit vector of \(\widehat{\vec{AB}}\) to compute the vector projection of \(T\) onto \(AB\text{.}\)
\begin{align*} \proj_{\vec{AB}}\vec{T} \amp = \|\proj_{\vec{AB}}\vec{T}\| \cdot \widehat{\vec{AB}} \\ \amp= \N{83.301}\left( \langle 0.866, -0.5, 0 \rangle\right)\\ \amp = \N{\langle -72.14, 41.65, 0 \rangle} \end{align*}
(e)
Find the vector portion of cable tension \(\vec{T}\) perpendicular to the anchor \(\vec{AB}\text{.}\)
Answer.
\begin{equation*} \vec{T}_\perp \vec{AB} = \N{\langle 22.14, 38.35, 40 \rangle} \end{equation*}
Solution.
Recall that a two-dimensional vector can be represented by the sum of two perpendicular components. In the same way, a right triangle can be represented by a vector along the hypotenuse equal to the sum of the two right-triangle sides.
Thus, any vector can be divided into two vectors parallel and perpendicular to another line. The vector projection \(\proj_{\vec{AB}}\vec{T}\text{,}\) from Part (d), is the portion of \(\vec{T}\) parallel to \(\vec{AB}\text{.}\) So the sum of \(\vec{T}\) can be expressed as the parallel and perpendicular terms:
\begin{equation*} \vec{T} = \proj_{\vec{AB}}\vec{T} + \left( \vec{T} \perp \vec{AB} \right) \end{equation*}
We want to find the part of \(\vec{T}\) perpendicular to \(\vec{AB}\text{,}\) so we can rearrange the equation to find:
\begin{align*} \vec{T} \perp \vec{AB} \amp = \vec{T}-\proj_{\vec{AB}}\vec{T}\\ \amp = \langle -50, 80, 40 \rangle - \langle -72.14, 41.65, 0 \rangle\\ \amp = \N{\langle 22.14, 38.35, 40 \rangle} \end{align*}
Nice effort if you worked through all the parts of this example. Graphically the results for parts (b), (d), and (e) are shown in this diagram.
The portion of vector F which is parallel and perpendicular to anchor AB is shown, in addition to the angle θ between the vectors F and AB.