What this calculator does
This tool computes two fundamental vector operations: the inner (dot) product and the cross product of two vectors a and b. The dot product returns a single scalar number, while the cross product returns a new 3-dimensional vector that is perpendicular to both inputs. The calculator also reports the magnitude of the cross product and the angle between the two vectors.
How to use it
Enter the components of vector a and vector b as comma-separated numbers (for example 1, 2, 3). For the dot product, a and b may have any matching dimension \(n\). For the cross product, both vectors must have exactly three components. Choose how many significant digits to display from the dropdown; this affects only the displayed result, not the underlying computation.
The formulas explained
The dot product multiplies matching components and sums them: $$\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^{n} a_i\,b_i$$ A result of zero means the vectors are orthogonal (perpendicular). The cross product produces the vector $$\mathbf{a} \times \mathbf{b} = \begin{pmatrix} a_2\,b_3 - a_3\,b_2 \\ a_3\,b_1 - a_1\,b_3 \\ a_1\,b_2 - a_2\,b_1 \end{pmatrix}$$ The angle is found from $$\theta = \arccos\!\left( \frac{\mathbf{a} \cdot \mathbf{b}}{\lVert \mathbf{a} \rVert \, \lVert \mathbf{b} \rVert} \right)$$ which requires both vectors to be non-zero.
Worked example
Let a = (1, 2, 3) and b = (4, 5, 6). The dot product is $$1\times 4 + 2\times 5 + 3\times 6 = 4 + 10 + 18 = 32$$ The cross product components are \(c_1 = 2\times 6 - 3\times 5 = -3\), \(c_2 = 3\times 4 - 1\times 6 = 6\), \(c_3 = 1\times 5 - 2\times 4 = -3\), giving \(\mathbf{a}\times\mathbf{b} = (-3, 6, -3)\). Its magnitude is $$\sqrt{9+36+9} = \sqrt{54} \approx 7.3485$$
FAQ
Why is my cross product undefined? The cross product is only defined for 3-dimensional vectors. Make sure both a and b have exactly three components.
Why is the dot product undefined? The dot product requires a and b to have the same number of components. If their dimensions differ, the operation is not defined.
What does a zero dot product mean? It means the two vectors are orthogonal (at a 90-degree angle to each other).