What if a vector is zero?
Its dot product and cross product with any vector are zero. It has no direction, so the angle between the vectors is undefined.
Enter two vectors with matching dimensions. The calculator gives their dot product, cross product and the unsigned angle between them.
Multiply corresponding coordinates and add the products. For A = (1, 2, 3) and B = (2, 0, 1), their dot product is 1 × 2 + 2 × 0 + 3 × 1 = 5. Two nonzero vectors with dot product zero meet at a right angle.
In three dimensions, A × B points perpendicular to both vectors according to the right-hand rule. Its magnitude equals the area of their parallelogram. For the example, the cross product is (2, 5, −4). For two-dimensional inputs, the calculator treats both z coordinates as zero and reports the signed z result.
The unsigned angle ranges from 0° to 180°. The ratio of the dot product to the product of the vector lengths is the cosine of the angle. The calculator uses the cross magnitude and dot product together to retain precision when two directions are nearly parallel.
Its dot product and cross product with any vector are zero. It has no direction, so the angle between the vectors is undefined.
The dot product and unsigned angle stay the same. The cross product changes sign because its direction depends on the order.
Enter matching dimensions. To treat a two-dimensional vector as lying in the xy plane, add an explicit zero for its third coordinate.