Dot & Cross Product Calculator
Compute the dot product and 3D cross product of two vectors, plus the angle between them, from their components.
How it works
a · b = aₓbₓ + a_yb_y + a_zb_z · a × b = (a_yb_z − a_zb_y, a_zbₓ − aₓb_z, aₓb_y − a_ybₓ) · θ = arccos((a · b) ÷ (|a||b|))
The dot product multiplies matching components and sums them, giving a single number that is largest when the vectors point the same way and zero when they are perpendicular. The cross product produces a new vector perpendicular to both inputs, whose length equals the area of the parallelogram they span. Together they capture how aligned two vectors are and how much they enclose.
Worked example
For a = (1, 2, 3) and b = (4, −5, 6): the dot product is 1·4 + 2·(−5) + 3·6 = 4 − 10 + 18 = 12. The cross product is (2·6 − 3·(−5), 3·4 − 1·6, 1·(−5) − 2·4) = (12 + 15, 12 − 6, −5 − 8) = (27, 6, −13).
Sources: Dot product — Wikipedia · Cross product — Wikipedia
Frequently asked questions
What is the difference between dot and cross product?
The dot product returns a scalar (a plain number) and measures how parallel two vectors are. The cross product returns a vector perpendicular to both inputs and measures the area they span. Dot product works in any dimension; the standard cross product is specific to three dimensions.
What does a zero dot product mean?
A dot product of zero means the two vectors are perpendicular (at 90°), assuming neither is the zero vector. This is the quickest test for orthogonality and is widely used in graphics, physics and machine learning.
What direction does the cross product point?
It is perpendicular to the plane containing both vectors, with the direction given by the right-hand rule: point your right-hand fingers from a toward b, and your thumb points along a × b. Swapping the order (b × a) reverses the direction.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.