gizmobench
BrowseDaily

Vector Products Calculator

Enter two vectors to compute a three-dimensional cross product or a dot product of equal-length vectors. Integers, decimals and fractions remain exact in the component arithmetic and checks. Cross mode also gives a normalized unit vector. Magnitudes, angles and unit normals are approximate decimal readouts, with each multiplication shown in the working.

3Da = (2, -1, 3)b = (1, 4, -2)Right-handed
a = (2, -1, 3)        b = (1, 4, -2)

a x b = ( (-1)(-2) - (3)(4),
          (3)(1)   - (2)(-2),
          (2)(4)   - (-1)(1) )
      = (-10, 7, 9)

a . b   = 2 - 4 - 6 = -8
|a x b| = 15.165751
angle   = 117.8118 deg

check   (a x b) . a = 0 and (a x b) . b = 0, exactly
        |a x b|^2 = 230, from |a|^2|b|^2 - (a . b)^2

unit normal = (a x b) / |a x b|
            = (-0.65938, 0.461566, 0.593442) (approximate)
Vector a
Vector b
Product
Angle in

Separate the components with commas or spaces. Whole numbers, decimals and fractions such as 1/3 are all read exactly, and cross or dot products come back written the way the question was. Unit normals use approximate decimals.

a × b
(-10, 7, 9)vector
a · b
-8scalar
|a × b|
15.165751decimal
Angle
117.8118°decimal
Unit normal
(-0.65938, 0.461566, 0.593442)approximate vector

a cross b is the vector (-10, 7, 9), perpendicular to both. a dot b is the number -8. The length of a cross b is 15.165751 and the angle between a and b is 117.8118°. The approximate unit normal is (-0.65938, 0.461566, 0.593442).

Three cases worth knowing

Each one is computed by the calculator above. Select a heading to load it.

  • right-handed order
    (0, 0, 1)
  • b × a
    (0, 0, -1), the sign flipped
  • dot in any dimension
    11
A cross product is a vector; a dot product is a number. a × b is a third vector, at right angles to both, and its length is the area of the parallelogram that a and b span. a · b is a single number: positive when the two point the same way, zero when they are square to each other, negative when they oppose. Only the cross product needs three dimensions. The dot product works at any equal length, which is why the angle above is available for two-dimensional vectors and for twelve-dimensional ones.

Common questions

How do you calculate a cross product?
For a = (a1, a2, a3) and b = (b1, b2, b3), a x b is (a2b3 - a3b2, a3b1 - a1b3, a1b2 - a2b1). This calculator writes those six products out rather than jumping to the answer: for a = (2, -1, 3) and b = (1, 4, -2) it shows (-1)(-2) - (3)(4), then (3)(1) - (2)(-2), then (2)(4) - (-1)(1), which gives (-10, 7, 9).
What is the difference between the dot product and the cross product?
The dot product is a single number and the cross product is a vector, and the results are labelled scalar and vector for exactly that reason. a . b measures how much the two point the same way and is zero when they are square to each other. a x b is a third vector at right angles to both, pointing by the right-hand rule, whose length is the area of the parallelogram that a and b span.
Can you take the cross product of two 2D vectors?
This tool’s vector cross product takes three components per vector. A planar pair can be represented in 3D with z = 0: (1, 2, 0) crossed with (3, 4, 0) is (0, 0, -2). It does not accept a two-component cross-product input or print a separate 2D signed determinant. Dot product and angle mode do accept two components, and the refusal offers a button to switch.
Why does swapping the two vectors flip the sign?
Because the cross product is anticommutative: b x a is the negative of a x b, component for component. (1, 0, 0) crossed with (0, 1, 0) is (0, 0, 1), and the same pair in the other order is (0, 0, -1). The right-hand rule is applied in the order you typed, so the Swap a and b button is the quickest way to see it happen.
How do you find the angle between two vectors?
The usual route is acos of a . b divided by the two lengths, which loses precision near parallel vectors because the cosine of a small angle is close to 1. This calculator uses atan2 with an approximate area magnitude derived from exact squared-component arithmetic, scaled against the exact dot product before decimal conversion. In three dimensions, that area is the cross-product magnitude. For (1, 0, 0) and (1, 0.000001, 0), the readout and copied result are 0.0000572958 degrees; acos alone gives about 0.0000572983 degrees. Angles remain approximate. Choose degrees or radians.
Does it keep fractions, or turn everything into decimals?
The cross or dot product comes back written the way the question was. Type 1/2, 1/3, 1/6 and cross it with 2, 3, 6 and you get (3/2, -8/3, 5/6). Decimal inputs remain exact: results use terminating decimals when they need at most 80 decimal places, or exact fractions otherwise. Lengths, angles and normalized unit vectors cannot always be written exactly, so their readouts use approximate decimals. Unit normals are labelled approximate vectors.
What is the check line under the working?
It is the calculator checking itself in exact arithmetic before it shows you anything. It confirms that a x b dotted with a is 0 and dotted with b is 0, so the result really is perpendicular to both, and that the squared length of a x b equals |a| squared times |b| squared minus (a . b) squared, which is Lagrange's identity. For (2, -1, 3) and (1, 4, -2) that squared length is 230, and its square root, 15.165751, is the magnitude shown. The angle for that pair is 117.8118 degrees.
Can I use i, j, k notation or matrix inputs?
Enter the numeric coefficients of i, j and k as three components, separated by commas or spaces. The output gives the three coefficients and writes out all six determinant products. Symbolic expressions, complex components, matrices, triple products and derivatives are not input types here. Dot products accept equal-length numeric vectors with up to twelve components, and both products preserve numeric fractions.
How do I get a unit vector from a cross product?
Enter two three-component vectors and choose Cross a × b. The Unit normal readout divides a × b by its length, giving a vector of length 1 in the same right-handed direction. For (1, 0, 0) and (3/5, 4/5, 0), the cross product is (0, 0, 4/5), and the unit normal is (0, 0, 1). For (1, 0, 0) and (0, 1, 1), the unit normal is approximately (0, -0.707107, 0.707107). The readout and Copy include this approximate result. A zero cross product has no direction, so its unit normal is Undefined.

Exact arithmetic on the components you enter, kept as integers or fractions wherever the inputs are, with every determinant term written out. The cross product is three-dimensional only and follows the right-hand rule in the order you typed, which is why swapping the operands flips every sign. The dot product takes any two vectors of equal length; the magnitude and the angle are decimals and are labelled as such. Unit normals are approximate decimal vectors and are undefined when the cross product is zero.