Dot Product Calculator

For two nonzero vectors, the dot product measures how much they point in the same direction: positive means an angle under 90 degrees, zero means perpendicular and negative means more than 90. A zero vector has no defined direction or angle. Vectors 1, 2, 3 and 4, 5, 6 have a dot product of 32, an angle of about 12.9 degrees and a cross product magnitude near 7.35.

Use it for work in physics, projections, lighting in graphics and checking perpendicularity.

Dot Product Calculator: inputs

Calculated result
Dot product32
Angle between vectors (degrees)12.9
Cross product magnitude7.3

Dot Product Calculator: Vector A: x sensitivity

Dot Product Calculator: Vector A: x and Dot product5 calculations vary the “Vector A: x” input while holding the other entered inputs constant.-124028132236340

Dot Product: worked example

Vector A: x1
Vector A: y2
Vector A: z3
Vector B: x4
Vector B: y5
Vector B: z6
Dot product32
Angle between vectors (degrees)12.9
Cross product magnitude7.3

Dot Product: formula

A·B = x₁x₂ + y₁y₂ + z₁z₂; angle = arccos(A·B ÷ (|A| |B|)); |A × B| = |A| |B| sin θ

Dot Product: Wolfram MathWorld

Enter the x, y and z components of each vector. For 2D vectors set z to zero. The dot product multiplies matching components and adds them, giving a single number.

The calculator also finds the angle between the vectors from the dot product and their lengths, and the magnitude of the cross product. Use consistent units for all components.

Dot Product: changing Vector A: x

Vector A: xDot productAngle between vectors (degrees)Cross product magnitude
-1244322.4
02827.714.7
1 (example)3212.97.3
2365.73.6
34013.69.7

Dot Product: compare input ranges

InputTested fromToDot product: low inputDot product: high inputSwing
Vector A: z24263812 (38%)
Vector B: z48263812 (38%)
Vector A: y13273710 (31%)
Vector A: x0228368 (25%)
Vector B: y4630344 (13%)
Vector B: x3531332 (6.3%)

Dot Product: individual input comparisons

InputValueDot productAngle between vectors (degrees)Cross product magnitude
Vector A: x-1244322.4
02827.714.7
13212.97.3
2365.73.6
34013.69.7
Vector A: y02237.516.9
12721.910.9
23212.97.3
33714.79.7
44220.215.4
Vector A: z12021.57.9
22694.1
33212.97.3
43819.113.2
54423.719.3
Vector B: x23063.2
33184.4
43212.97.3
5331810.7
63422.714.2
Vector B: y32816.68.4
43013.57.2
53212.97.3
63414.48.7
73616.810.9
Vector B: z22037.215.2
4262311
63212.97.3
8387.65.1
104486.2

Dot Product: combined input changes

Vector A: x / Vector A: y024
-1142434
0182838
1223242
2263646
3304050

Dot Product: which assumptions move the result?

Dot Product: Dot product as Vector A: z changesDot product starts at 20. Moving Vector A: z from 1 to 5 changes it to 44, with Vector A: x 1; Vector A: y 2; Vector B: x 4; Vector B: y 5; Vector B: z 6 kept fixed.120226332438544
Chart quantityDisplayed settings
Vector A: z1 → 5
Dot product20 → 44
Vector A: x1
Vector A: y2
Vector B: x4
Vector B: y5
Vector B: z6
Dot Product: Dot product as Vector B: z changesDot product starts at 20. Moving Vector B: z from 2 to 10 changes it to 44, with Vector A: x 1; Vector A: y 2; Vector A: z 3; Vector B: x 4; Vector B: y 5 kept fixed.2204266328381044
Chart quantityDisplayed settings
Vector B: z2 → 10
Dot product20 → 44
Vector A: x1
Vector A: y2
Vector A: z3
Vector B: x4
Vector B: y5

Dot Product: values and definitions

Quantity and definitionValue used
Vector A: x1
Vector A: y2
Vector A: z3
Vector B: x4
Vector B: y5
Vector B: z6
Dot product32
Angle between vectors (degrees)12.9
Cross product magnitude7.3

Dot Product: half and double Vector A: z

Vector A: zDot product
1.523
332
650

Common error: Reading a large dot product as a large angle. It is the other way around: for vectors of the same length, the more they line up, the larger the value and the smaller the angle between them.

The dot product is a number, while the cross product is a vector defined only in three dimensions and depends on the order of the vectors. The angle result is unreliable when either vector is very small. Rounding affects nearly parallel vectors.

Vectors must have the same dimension.

Algebra & Arithmetic calculators: Mixed Number to Improper Fraction Calculator, Exponential Growth Calculator, Quadratic Formula Calculator, Fraction and Ratio Simplifier Calculator, Exponent Calculator, Root Calculator.

The dot product multiplies matching parts of two vectors and adds them up, and the result says how much they point the same way. The cross product magnitude, 7.35 here, measures the area of the parallelogram they span.

Enter the vectors in matching order: x, y and z from the same coordinate system for both. A mismatch changes the angle and the dot product.

See lengths and distances on the distance and slope calculator, angles on the trigonometry page, and matrix determinants on the 3x3 determinant calculator, which relates to the cross product. The physics calculators use vectors for force and work. The midpoint page handles coordinates.

What does the cross-product magnitude represent?

The area of the parallelogram spanned by the two 3D vectors. For (1,2,3) and (4,5,6), it is √54, or about 7.34847.

What does a dot product of zero mean?

For two nonzero vectors, a zero dot product means a right angle between them in this Euclidean model. The zero vector also has zero dot product with every vector, but has no defined direction. Check both lengths before using the result as an angle or perpendicular-direction test.

How do I find the angle between two vectors?

Divide their dot product by the product of their lengths and take the inverse cosine of the result.

How is the cross product different?

It produces a vector perpendicular to both inputs, with a length equal to the area of the parallelogram they form.