Dot Product of Two Vectors - Calculator

An online calculator to calculate the dot product of two vectors also called the scalar product.

Use of Dot Product Calculator

1 - Enter the components of the two vectors as real numbers in decimal form such as 2, 1.5, ... and press "Calculate the dot Product". The answer is a scalar.
Characters other than numbers are not accepted by the calculator.

u = < , , >
v = < , , >
u ⋅ v =

Definition of the Dot Product of two Vectors

Let \(\mathbf{u}\) and \(\mathbf{v}\) be two 3D vectors given in component form by \[ \mathbf{u} = \langle a, b, c \rangle \quad \text{and} \quad \mathbf{v} = \langle d, e, f \rangle \] The dot product of the two vectors \(\mathbf{u}\) and \(\mathbf{v}\) above is given by \[ \mathbf{u} \cdot \mathbf{v} = \langle a, b, c \rangle \cdot \langle d, e, f \rangle = a d + b e + c f \] and it is a scalar quantity.

Example 1

Let \[ \mathbf{u} = \langle -2, 3, 2 \rangle \quad \text{and} \quad \mathbf{v} = \langle 0, -1, 6 \rangle \] The dot product of the vectors \(\mathbf{u}\) and \(\mathbf{v}\) is given by \[ \mathbf{u} \cdot \mathbf{v} = \langle -2, 3, 2 \rangle \cdot \langle 0, -1, 6 \rangle = (-2)(0) + (3)(-1) + (2)(6) = 9 \]

Applications of the Dot Product

The dot product has many applications in mathematics, physics, engineering, ... We will give some examples below.

Example 2

The dot product can be used to determine if two vectors are orthogonal (i.e., they are perpendicular or their directions make a 90-degree angle). The geometric definition of the dot product is \[ \mathbf{u} \cdot \mathbf{v} = \|\mathbf{u}\| \, \|\mathbf{v}\| \, \cos \theta \] where \(\theta\) is the angle between vectors \(\mathbf{u}\) and \(\mathbf{v}\). Hence, the dot product of two orthogonal vectors is equal to zero, since \(\cos(90^\circ) = 0\). As an example, let \[ \mathbf{u} = \langle 3, 3, 3 \rangle \quad \text{and} \quad \mathbf{v} = \langle -2, 2, 0 \rangle \] The dot product of the vectors \(\mathbf{u}\) and \(\mathbf{v}\) is given by \[ \mathbf{u} \cdot \mathbf{v} = \langle 3, 3, 3 \rangle \cdot \langle -2, 2, 0 \rangle = (3)(-2) + (3)(2) + (3)(0) = 0 \] Conclusion: vectors \(\mathbf{u} = \langle 3, 3, 3 \rangle\) and \(\mathbf{v} = \langle -2, 2, 0 \rangle\) are orthogonal. See the vector plot in the figure below. Orthogonal 3 Dimensional Vectors

Example 3

The dot product may be used to find the angle \(\theta\) between two vectors given by their components in 2D or 3D space. \[ \cos \theta = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \, \|\mathbf{v}\|} \] As an example, let \[ \mathbf{u} = \langle 4, 3, 0 \rangle \quad \text{and} \quad \mathbf{v} = \langle 0, 8, 6 \rangle \] Calculate the dot product using the components: \[ \mathbf{u} \cdot \mathbf{v} = (4)(0) + (3)(8) + (0)(6) = 24 \] Calculate the magnitudes of \(\mathbf{u}\) and \(\mathbf{v}\): \[ \|\mathbf{u}\| = \sqrt{4^2 + 3^2 + 0^2} = 5 \] \[ \|\mathbf{v}\| = \sqrt{0^2 + 8^2 + 6^2} = 10 \] Compute the cosine of the angle: \[ \cos \theta = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \, \|\mathbf{v}\|} = \frac{24}{5 \cdot 10} \] Finally, the angle between the vectors is \[ \theta = \arccos \left( \frac{24}{50} \right) \approx 61.3^\circ \]

Example 4

In physics, the work \(W\) done by a constant force \(\mathbf{F}\) acting on an object along a constant direction for a displacement \(\mathbf{d}\) is given by \[ W = \mathbf{F} \cdot \mathbf{d} \]

More References and Links

Dot Product of Two Vectors and Applications.
3D Vectors.
vectors.