Programmers and Teachers:
Dot Product Calculator
Dot Product Lesson
What is a Dot Product?
The calculator above computes the dot product of the two inputted vectors. The result of calculating a dot product is a scalar, which is a numerical value without direction (a vector has a numerical value AND a direction). Common notation of a dot product is A∙B where A and B are the vectors, and the dot operator ∙ represents that a dot product being calculated.
Calculating the dot product of two vectors is a very simple and useful mathematical operation that only requires simple multiplication and addition operations. Below we will show the two methods for calculating a dot product.
Dot Product Calculation Method #1
Method #1 is given as:
Where A and B are the original vectors, × is multiplication, the absolute value bars represent vector magnitude, and θ is the angle between the two vectors.
This method is great for use in 2-dimensional vector systems where the angle between the vectors is a known value since the Pythagorean theorem can be implemented to find the magnitude of each vector. Then, only two multiplication operations need to be performed.
Additionally, this method can be used in a 3-dimensional vector system if we can determine the angle between the two vectors (if not given in the problem). If we are unable to determine the angle between two vectors in a 3-dimensional system, we consider using method #2 which is explained in the next section.
Method #1 Example Problem:
Find the dot product of vectors A and B, where A = 3i + 5j and B = 2i – 6j. The angle between A and B is measured to be 131°.
1.) First, let’s find the magnitude of each vector since that is our only unknown still needed to employ method #1.
2.) Using the Pythagorean theorem on the two components of vector A (imagine each component is a leg in a right triangle) we find the magnitude to be 5.83.
3.) Using the Pythagorean theorem on the two components of vector B we find the magnitude to be 6.32.
4.) Now we plug our known values into the equation.
A∙B = 5.83×6.32×cos(131°) = -24
Dot Product Calculation Method #2
Method #2 is given as:
Method #2 is very easy to use because we simply perform three multiplication operations using the components from each vector, which are often provided in the problem.
This method is not very simple to use if we are only given vector directions and magnitudes without the i, j, and k components. Method #1 is simpler to use for those kinds of problems.
Method #2 Example Problem:
Find the dot product of vectors A and B, where A = 2i + 8j – 3k and B = -3i + j + 2k.
1.) We already have every one of the values required for plugging into the method #2 equation.
2.) Let’s plug in the vector components into A∙B = (a1)(b1) + (a2)(b2) + (a3)(b3).
A∙B = (2)(-3) + (8)(1) + (-3)(2) = – 6 + 8 – 6 = -4
How the Calculator Works
The calculator on this pages uses a computerized version of method #2. Each component of your input vectors is sent to a computer program that multiplies like vector components by each other. Then, the products are summed into the final scalar value. This value is then sent back to this page and displayed.