CalcSeed

Dot Product Calculator

Enter the x, y, z components of two vectors to find their dot product.

=
Quick answer: with the default inputs (1, 2, 3, 4), the dot product is 32. Change any input to update the result.
Dot product
—

What this calculator does

The dot product (also called the scalar product) multiplies two vectors component by component and adds the results, returning a single number rather than a vector. With the defaults a = (1, 2, 3) and b = (4, 5, 6) it returns 32. That one number encodes the angle between the vectors: it equals |a| × |b| × cos(θ), so a dot product of 32 against lengths of about 3.74 and 8.77 means the two vectors sit only about 12.9° apart — nearly parallel.

The component formula

a·b=axbx+ayby+azbza \cdot b = a_x b_x + a_y b_y + a_z b_z

The component formula is three multiplications and two additions, while the geometric form a · b = |a| × |b| × cos(θ) explains what the number means. The two agree for any pair of vectors, which makes the dot product the standard tool for measuring alignment: it is large and positive when the vectors point the same way, zero when they are perpendicular, and negative when they oppose. Note the pairing — x multiplies x, y multiplies y, z multiplies z, and nothing crosses.

Worked example at the defaults

Vectors a = (1, 2, 3) and b = (4, 5, 6). Step 1: ax × bx = 1 × 4 = 4. Step 2: ay × by = 2 × 5 = 10. Step 3: az × bz = 3 × 6 = 18. Step 4: sum 4 + 10 + 18 = 32, matching the calculator. To convert this into an angle, compute the lengths |a| = √(1 + 4 + 9) = √14 ≈ 3.74 and |b| = √(16 + 25 + 36) = √77 ≈ 8.77, then cos(θ) = 32 ÷ (3.74 × 8.77) ≈ 32 ÷ 32.83 ≈ 0.975, so θ ≈ 12.9°.

Self-dot and lengths

A second check uses the self-dot identity: a · a = 1 + 4 + 9 = 14 = |a|², and b · b = 77 = |b|². This works backwards too — any time you need a vector’s length, dot it with itself and take the square root, which is exactly how the related magnitude calculator operates.

What the sign of the result means

Dot productAngle θGeometric meaning
Positiveθ < 90°Same general direction; defaults give 32 at ≈12.9°
Zeroθ = 90°Perpendicular; (1, 2, 3) · (3, 0, −1) = 0
Negativeθ > 90°Opposing directions, such as force against motion
a · a0°Equals |a|², the length squared

The zero row is worth verifying by hand: (1, 2, 3) · (3, 0, −1) = 3 + 0 − 3 = 0, so those vectors are perpendicular despite sharing no zero components. Orthogonality tests are the single most common homework use of the dot product, and the component formula decides them in one line.

Projection and work

Dividing the dot product by |b|² gives the scalar that stretches b into the shadow of a: for the defaults, 32 ÷ 77 ≈ 0.416, so the projection of a onto b is 0.416 × (4, 5, 6) ≈ (1.66, 2.08, 2.49). The scalar projection alone is 32 ÷ 8.77 ≈ 3.65 units of a lying along b’s direction. Physics borrows the same number for work: a force of (2, 1, 0) newtons moving an object along displacement (3, 0, 4) metres does W = 6 + 0 + 0 = 6 joules, because only the force component along the motion counts.

Common mistakes

The dot product is the simpler of the two vector products, which leaves few but reliable ways to lose points.

  • Crossing components: 1 × 5 + 2 × 6 + 3 × 4 = 29 is the crossed-pairing answer; the correct pairing gives 32.
  • Returning a vector: the dot product is a scalar, unlike the cross product, which returns a perpendicular vector.
  • Forgetting the cosine when switching forms: 3.74 × 8.77 ≈ 32.83 is the maximum possible dot product, reached only at θ = 0°.
  • Sign slips with negative components: (1, 2, 3) · (3, 0, −1) = 3 + 0 − 3, and dropping the minus on the last term turns a perpendicular pair into a near-parallel one.
  • Using degrees inside cosine without converting: cos(12.9) in radians is not cos(12.9°); keep the angle consistent with your tool.

Dot product versus cross product

The two products answer different questions about the same pair of vectors. The dot product measures alignment through cos(θ) and collapses to a scalar; the cross product measures rotation through sin(θ) and produces a perpendicular vector. For the defaults the dot product is 32 while the cross product is (−3, 6, −3), and together they determine everything about the pair — the dot product gives the angle, the cross product gives the plane they define. Remembering which is which prevents the classic exam error of returning a vector where a number is asked for.

Where dot products appear

Work in physics, cosine similarity in data science, and lighting in graphics all run this one formula. Recommender systems in 2026 coursework compare user-preference vectors with the dot product: two profiles (1, 2, 3) and (4, 5, 6) score 32, while a mismatched pair scores near zero, and dividing by the lengths normalizes the score into cosine similarity. Machine learning layers multiply activation vectors by weight vectors the same way, so the three-multiply-two-add pattern here is the most-executed arithmetic in applied linear algebra.

Frequently asked questions

What is the dot product of (1, 2, 3) and (4, 5, 6)?

1 × 4 + 2 × 5 + 3 × 6 = 4 + 10 + 18 = 32. It corresponds to an angle of about 12.9° between the two vectors.

What does a negative dot product mean?

The angle between the vectors exceeds 90°, so they point in generally opposite directions. A force dotted with a displacement is negative exactly when the force opposes the motion.

Is the dot product commutative?

Yes, a · b equals b · a because addition and multiplication both commute. For the defaults, computing from b first still gives 32.

How is the dot product related to vector length?

A vector dotted with itself gives its length squared: a · a = 1 + 4 + 9 = 14 = |a|² for the defaults. This is the standard way to compute magnitudes.

How do I find the angle between two vectors?

Divide the dot product by the product of the lengths and take the arccosine. Here cos(θ) = 32 ÷ (3.74 × 8.77) ≈ 0.975, giving θ ≈ 12.9°.

How do I test whether two vectors are perpendicular?

Compute the dot product and check for zero. (1, 2, 3) · (3, 0, −1) = 3 + 0 − 3 = 0, so they are perpendicular even though all six components are non-zero.

What is the projection of a onto b?

Multiply b by (a · b) ÷ |b|². For the defaults that factor is 32 ÷ 77 ≈ 0.416, giving a projection of about (1.66, 2.08, 2.49).

Why is my dot product different from my cross product?

They are different operations: the dot product returns the scalar 32 for the defaults, while the cross product returns the vector (−3, 6, −3). One measures alignment with cos(θ), the other measures rotation with sin(θ).

Method and sources

Calculation basis

Results follow exact mathematical definitions; the arithmetic is deterministic and can be verified by hand from the steps shown.

Last updated: November 18, 2026
Formula & data sources
  • Standard dot product formula a&middot;b = &Sigma; a_i b_i.

Cite this page

Reference formats
APA 7CalcSeed. (2026, November 18). Dot Product Calculator. https://calcseed.com/c/math/dot-product-calculator/
MLA 9"Dot Product Calculator." CalcSeed, 18 Nov. 2026, calcseed.com/c/math/dot-product-calculator/.
ChicagoCalcSeed. "Dot Product Calculator." Last modified November 18, 2026. https://calcseed.com/c/math/dot-product-calculator/

Related calculators

More Math calculators