What the operations tell you
A vector has both a length and a direction, described here by its x, y and z components. From two such vectors the calculator derives four quantities that answer different questions about how they relate.
- Magnitude: the length of each vector on its own, the square root of the sum of its squared components.
- Dot product: a single number that measures how much the two vectors point the same way — positive when aligned, zero when perpendicular, negative when opposed.
- Cross product: a new vector that points perpendicular to both inputs.
- Angle: the opening between the two vectors in degrees, derived from the dot product and the two magnitudes.
Dot versus cross product
The dot product collapses two vectors into a scalar and is largest when they are parallel. It is the natural tool for projecting one vector onto another or for finding the angle between them.
The cross product instead returns a vector perpendicular to both, and its length equals the area of the parallelogram the two vectors span. Its direction follows the right-hand rule, which is why swapping the order of the inputs reverses its sign.
Working in two dimensions
For a flat, 2D problem set both z-components to zero. The magnitudes, dot product and angle behave exactly as expected, and the cross product points purely along the z-axis — its z-component is the signed area you would compute in 2D.
The angle calculation needs both vectors to be non-zero. A zero-length vector has no direction, so the angle is undefined and the calculator reports that rather than dividing by zero.
Formula
|A| = √(ax²+ay²+az²); A·B = ax·bx+ay·by+az·bz; A×B = (ay·bz−az·by, az·bx−ax·bz, ax·by−ay·bx); θ = acos((A·B)/(|A|·|B|))Frequently asked questions
- What does the cross product tell me?
- It is a vector perpendicular to both A and B, and its magnitude equals the area of the parallelogram they span.
- For a 2D problem what do I enter?
- Set the z-components (A z and B z) to 0. The cross product then points purely along z.

