16.3: Dot Product
The dot product (also sometimes called the scalar product) is a mathematical operation that can be performed on any two vectors with the same number of elements. The result is a scalar number equal to the magnitude of the first vector, times the magnitude of the second vector, times the cosine of the angle between the two vectors.
\[ \vec{A} \cdot \vec{B} = |A| |B| \cos (\theta) \]
In engineering mechanics, the dot product is used almost exclusively with a second vector being a unit vector . If the second vector in the dot product operation is a unit vector (thus having a magnitude of 1), the dot product will then represent the magnitude of the first vector in the direction of the unit vector. In this respect, a dot product is useful in determining the component of a given vector in any given direction, where the direction is given in terms of a unit vector.
As an alternative to the above equation for calculating the dot product, we can also calculate the dot product without knowing the angle between the vectors (\(\theta\)). For this method, we break each vector down into components and take the sum of each set of components multiplied together as shown in the equation below.
\[ \vec{A} \cdot \vec{B} = (A_x * B_x) + (A_y * B_y) + (A_z * B_z) \]
Finally, as with many vector operations, the true strength of the dot product is that computers can calculate them very quickly. Both MATLAB and the Wolfram Alpha Vector Operation Calculator are able to compute dot products for you.
Example \(\PageIndex{1}\)
Find the dot product of force vector \(\vec{A}\) with the given unit vector \(\hat{B}\).
- Solution:
Example \(\PageIndex{2}\)
Calculate the dot product of \(\vec{A}\) with \(\vec{B}\) by hand.
- Solution:
Example \(\PageIndex{3}\)
Calculate the dot product of \(\vec{A}\) with \(\vec{B}\) using MATLAB.
- Solution:
Example \(\PageIndex{4}\)
Calculate the dot product of \(\vec{A}\) with \(\vec{B}\) using the Wolfram Vector Operation Calculator.
- Solution: