Vector Dot Product Calculator
- Multiply matching components and add: (1 × 4) + (2 × 5) + (3 × 6) = 32.
- The magnitudes are |a| = 3.74 and |b| = 8.77 — the lengths each vector would have on a graph.
- Since a · b = |a| |b| cos θ, the angle follows: cos θ = 32 ÷ (3.74 × 8.77), giving θ = 12.93°.
- The sign carries the meaning: positive means an acute angle, the vectors pull together.
Our dot product calculator takes two vectors and returns their dot product instantly. Enter the components of each vector, and the tool applies the standard formula a . b = ax bx + ay by + az bz, multiplying corresponding components and summing the results. For example, with vectors (1, 2, 3) and (4, 5, 6), the calculator returns 32, with magnitudes of 3.74 and 8.77 and an angle of 12.93 degrees. Perpendicular vectors such as (1, 0, 0) and (0, 1, 0) yield a zero dot product at an angle of 90.00 degrees, while a negative result like -8 from (2, -1, 3) and (1, 4, -2) signals an obtuse angle of 117.81 degrees.
This component method is the accepted standard because it connects directly to the geometric form a . b = |a| |b| cos(theta), which rearranges to find the angle from the components alone. The same principle underlies physics: work equals force times displacement in the force's direction, so only the aligned component counts. This page shows the formula, step-by-step workings, verified worked examples, and sources so every result is transparent and reproducible.
Worked examples
Two vectors pulling together
Primary result: 32 — a small 12.93° angle between them. (1 · 2 · 3 · 4 · 5 · 6)
| Dot product a · b | 32 |
| Magnitude of a | 3.74 |
| Magnitude of b | 8.77 |
| Angle between the vectors | 12.93° |
| Relationship | Acute angle — the vectors point partly the same way |
Exactly perpendicular
Primary result: 0 — the signature of orthogonal vectors, at a 90.00° angle. (1 · 0 · 0 · 0 · 1 · 0)
| Dot product a · b | 0 |
| Magnitude of a | 1.00 |
| Magnitude of b | 1.00 |
| Angle between the vectors | 90.00° |
| Relationship | Perpendicular (orthogonal) |
Pulling against each other
Primary result: -8 — a negative dot product means an obtuse 117.81° angle. (2 · -1 · 3 · 1 · 4 · -2)
| Dot product a · b | -8 |
| Magnitude of a | 3.74 |
| Magnitude of b | 4.58 |
| Angle between the vectors | 117.81° |
| Relationship | Obtuse angle — the vectors point partly opposite ways |
Two definitions, one number
The dot product is defined in two ways that look different but always produce the same single number. The first is component form: you multiply the matching components of two vectors and add the results. For vectors a = (ax, ay, az) and b = (bx, by, bz), the formula is a . b = ax bx + ay by + az bz. The second is the geometric form: a . b = |a| |b| cos(theta), where |a| and |b| are the magnitudes of the vectors and theta is the angle between them. This version connects the algebra directly to the angle, and it rearranges to let you find the angle from the components.
A verified example shows the two forms agreeing. Take the vectors (1, 2, 3) and (4, 5, 6). The component form gives 1 times 4 plus 2 times 5 plus 3 times 6, which equals 32. The geometric form gives the same result: the magnitudes are 3.74 and 8.77, and the angle between the vectors is 12.93 degrees. Multiply 3.74 times 8.77 times the cosine of 12.93 degrees, and you get 32. Any reliable dot product calculator should confirm this match, because the two definitions describe the same quantity from different angles.
The sign of the result tells you what kind of angle you are dealing with. A positive dot product means the angle is acute, as in the 12.93-degree case above. A zero dot product means the vectors are perpendicular, with an angle of 90.00 degrees. The vectors (1, 0, 0) and (0, 1, 0) confirm this: their dot product is 0. A negative dot product means the angle is obtuse. For example, (2, -1, 3) . (1, 4, -2) = -8, and the angle between those vectors is 117.81 degrees.
This is not just an abstract exercise. Work in physics is a dot product: force times displacement in the direction of the force. Only the component of displacement aligned with the force contributes to the work done. If you push a crate forward but it slides sideways, the dot product tells you how much of your effort actually counted. The geometric form makes this clear: the cosine term projects one vector onto the other, so only the aligned portion survives the multiplication.
Worked examples
The dot product multiplies corresponding components and adds them: a . b = ax bx + ay by + az bz. To see how this works in practice, the table below walks through three verified pairs of vectors that cover the three possible geometric relationships: an acute angle, a right angle, and an obtuse angle. Each row shows the input vectors, the resulting dot product, and the angle between them. You can confirm every result by running the same inputs through our dot product calculator.
The geometric form a . b = |a| |b| cos(theta) connects the algebra to the angle, and rearranges to find the angle from the components. In the first example, (1, 2, 3) . (4, 5, 6) = 32, with magnitudes 3.74 and 8.77 and an angle of 12.93 degrees. Because the dot product is positive, you can tell right away that the angle is acute. The second example, (1, 0, 0) . (0, 1, 0) = 0, shows the opposite situation: perpendicular vectors always have a zero dot product, angle 90.00 degrees. The third example, (2, -1, 3) . (1, 4, -2) = -8, demonstrates that a negative dot product means an obtuse angle, here 117.81 degrees.
These three cases matter because the sign of the result tells you the geometric relationship before you ever compute the angle itself. A positive value means the vectors point in broadly similar directions, zero means they are orthogonal, and a negative value means they point away from each other. This is why the dot product appears throughout physics and engineering whenever direction matters.
Work in physics is a dot product — force times displacement in the force's direction — which is why only the aligned component counts. When you push a crate forward along the floor, the vertical part of your force does no work on the crate's horizontal motion. The dot product captures exactly that distinction, multiplying only the components that line up with each other and ignoring the rest.
| Vector a | Vector b | Dot Product | Angle (degrees) | Relationship |
|---|---|---|---|---|
| (1, 2, 3) | (4, 5, 6) | 32 | 12.93 | Acute |
| (1, 0, 0) | (0, 1, 0) | 0 | 90.00 | Right / Perpendicular |
| (2, -1, 3) | (1, 4, -2) | -8 | 117.81 | Obtuse |
Reading the sign
The sign of the result from a dot product calculator tells you immediately how two vectors relate in direction. Because the geometric form is a . b = |a| |b| cos(theta), the sign depends entirely on cos(theta), and cosine changes sign at 90 degrees. A positive dot product means the vectors pull together, forming an acute angle. A result of zero means they sit perpendicular to each other. A negative dot product means they pull apart, forming an obtuse angle.
When the dot product is positive, both vectors point broadly in the same direction. Take (1, 2, 3) . (4, 5, 6) = 32. The magnitudes are 3.74 and 8.77, and the angle between the vectors is just 12.93 degrees. Because that angle is well under 90 degrees, cosine is positive, so the product of the magnitudes multiplied by cosine gives a positive value. The closer the angle is to zero, the larger the positive dot product becomes, since the vectors align more and more closely.
When the dot product is exactly zero, the vectors are perpendicular. The pair (1, 0, 0) . (0, 1, 0) = 0 illustrates this cleanly: the vectors sit at 90.00 degrees to each other, and cos(90.00 degrees) is zero, so the entire product collapses to zero regardless of the magnitudes. This perpendicular case shows up often. In physics, work is a dot product, force times displacement in the force's direction, which is why only the aligned component counts. When force and displacement are perpendicular, the aligned component is zero, and no work is done.
When the dot product is negative, the vectors form an obtuse angle. The verified case (2, -1, 3) . (1, 4, -2) = -8 is a clear example. Here the angle is 117.81 degrees, which is past 90 degrees, so cosine is negative. The magnitudes are still positive, but multiplying them by a negative cosine flips the sign of the result. The more the vectors oppose each other, approaching 180 degrees, the more negative the dot product becomes.
So when you use a dot product calculator, glance at the sign before anything else. Positive means the vectors pull together. Zero means they stand perpendicular. Negative means they pull apart. The algebra a . b = ax bx + ay by + az bz gives you the number, and the geometric form a . b = |a| |b| cos(theta) tells you why that number has the sign it does.
Finding the angle
The dot product is not just a number you compute and move on from. The geometric form, a . b = |a| |b| cos(theta), connects the algebra straight to the angle between two vectors. Rearrange it and you get a formula that turns component math into an angle measurement: cos(theta) = (a . b) / (|a| |b|). This is the step where a dot product calculator earns its keep, because doing the three pieces by hand is where most students slip up.
Start with the numerator. The dot product multiplies corresponding components and adds them: a . b = ax bx + ay by + az bz. For the vectors (1, 2, 3) and (4, 5, 6), that gives 1(4) + 2(5) + 3(6) = 32. Next, find each vector's magnitude — the square root of the sum of squared components. Here those magnitudes are 3.77 and 8.77. Divide the dot product by the product of the magnitudes: 32 / (3.77 × 8.77) = 0.974. That value is cos(theta).
Here is the step students forget: cos(theta) gives you a ratio, not an angle. You still need the arccosine to get theta itself. Taking arccos(0.974) yields 12.93 degrees. Skip the arccos step and you are left with a unitless number that means nothing on its own. The same process confirms perpendicular vectors: (1, 0, 0) . (0, 1, 0) = 0, and since the numerator is zero, cos(theta) is zero, so arccos(0) = 90.00 degrees. Perpendicular vectors always produce a zero dot product.
The sign of the dot product tells you what kind of angle to expect before you even reach for arccos. A positive dot product means an acute angle, zero means perpendicular, and a negative dot product means an obtuse angle. Take (2, -1, 3) . (1, 4, -2) = -8. The negative result signals an angle past 90 degrees. Run the full formula and arccos gives 117.81 degrees, confirming it. This sign check is a quick way to catch errors: if your dot product is positive but your angle comes out obtuse, something went wrong in the calculation.
This angle-finding method shows up in physics too. Work is a dot product — force times displacement in the force's direction — which is why only the aligned component counts. When force and displacement are perpendicular, the dot product is zero and no work is done. When they point in opposite directions, the dot product is negative and the work is negative, meaning energy is taken out of the system. The angle is not a side note; it is the whole point of the calculation.
Projections: the dot product at work
The dot product multiplies corresponding components and adds them: a . b = ax bx + ay by + az bz. That algebraic recipe looks simple, but it carries a geometric meaning that shows up everywhere from physics to computer graphics. The connection is the geometric form a . b = |a| |b| cos(theta), which links the component calculation to the angle between the vectors. Rearranging that relationship lets you find the angle from the components alone, which is exactly what a dot product calculator does behind the scenes when you enter two vectors and ask how they relate.
Picture sunlight shining straight down on a flagpole. The shadow the pole casts on the ground is a projection — one vector's component measured along another direction. The dot product is the engine behind that idea. When you compute a . b, you are effectively asking how much of vector a lines up with vector b. If the vectors point the same way, the product is large and positive. If they are perpendicular, there is no alignment at all, and the result is zero — as verified by (1, 0, 0) . (0, 1, 0) = 0 at an angle of 90.00 degrees. If they point in opposing directions, the product turns negative, meaning the angle is obtuse. The verified example (2, -1, 3) . (1, 4, -2) = -8 corresponds to an angle of 117.81 degrees.
Work in physics is a dot product — force times displacement in the force's direction — which is why only the aligned component counts. Push a crate forward and the force helps it move. Push sideways and none of that effort contributes to forward motion. The dot product captures this distinction automatically. The same logic governs lighting in 3D graphics, where a surface's brightness depends on how directly it faces the light source, and least squares fitting in statistics, where you project data onto a model and measure the leftover error.
These applications all rely on the same verified arithmetic. The example (1, 2, 3) . (4, 5, 6) = 32, with magnitudes 3.74 and 8.77 and an angle of 12.93 degrees, shows two nearly parallel vectors producing a solid positive result. A dot product calculator handles these calculations instantly, but the underlying idea stays the same: measure how much one vector extends along another, and you have captured something both mathematically useful and physically real.
Dot product mistakes to avoid
The most common mistake when using a dot product calculator is adding magnitudes instead of multiplying components. The dot product is not |a| + |b|. It multiplies corresponding components and then adds those products: a . b = ax bx + ay by + az bz. For example, (1, 2, 3) . (4, 5, 6) = 32, which comes from (1 × 4) + (2 × 5) + (3 × 6). The magnitudes of those vectors are 3.74 and 8.77, but adding those magnitudes gives 12.51 — a number that has nothing to do with the actual dot product. Always compute from the components first.
A second frequent error is confusing the dot product with the cross product. The dot product produces a scalar — a plain number — while the cross product produces a vector. This distinction matters because the two operations answer different questions. The geometric form a . b = |a| |b| cos(theta) confirms the scalar nature of the dot product: it collapses two vectors into a single value tied to the angle between them. If your result has direction or components, you have likely computed a cross product by mistake. The dot product of perpendicular vectors illustrates the point cleanly: (1, 0, 0) . (0, 1, 0) = 0, because perpendicular vectors always produce a zero dot product at an angle of 90.00 degrees.
Degree and radian slips in the angle step cause subtle but serious errors. When you rearrange the geometric form to find the angle from the components, the arccosine function returns a value whose unit depends on your calculator's mode. If your calculator is set to radians but you read the result as degrees, every angle will be wrong. The verified examples show why this matters: (1, 2, 3) . (4, 5, 6) = 32 corresponds to an angle of 12.93 degrees, and (2, -1, 3) . (1, 4, -2) = -8 corresponds to an angle of 117.81 degrees. A negative dot product means an obtuse angle, so a result near 2.06 radians for that second case is correct — but only if you intended radians. Always check your calculator's angle mode before trusting the output.
These mistakes carry over into applied problems. Work in physics is a dot product — force times displacement in the force's direction — which is why only the aligned component counts. If you add magnitudes or mix in a cross product, you get a number that looks like work but is not. The same caution applies to any angle calculation: confirm the mode, confirm the operation, and confirm that your result is a scalar.
- Do not add magnitudes: a . b = ax bx + ay by + az bz, not |a| + |b|
- The dot product is a scalar; the cross product is a vector — check which one you need
- Confirm degree or radian mode before reading an angle from arccosine
- A negative dot product signals an obtuse angle, as with (2, -1, 3) . (1, 4, -2) = -8 at 117.81 degrees
- Perpendicular vectors always give a zero dot product at 90.00 degrees
FAQs
How do you calculate a dot product?
Multiply matching components and add: 1x4 + 2x5 + 3x6 = 32. This means for vectors a = (1, 2, 3) and b = (4, 5, 6), you multiply each pair of corresponding components, then sum those products. The result is a single number, not a vector.
What does a dot product of zero mean?
The vectors are perpendicular. For example, (1, 0, 0) and (0, 1, 0) meet at exactly 90.00 degrees. When the dot product equals zero, it tells you the two vectors form a right angle. This relationship is useful in geometry, physics, and graphics for identifying orthogonal directions.
Can a dot product be negative?
Yes, when the angle exceeds 90 degrees, as in the -8 result at 117.81 degrees. A negative dot product indicates the vectors point in broadly opposite directions. The sign tells you about the angle: positive means less than 90 degrees, zero means exactly 90, and negative means greater than 90 degrees.
How do I find the angle between two vectors?
Use the formula theta = arccos((a . b) / (|a| |b|)): arccos(32 / (3.74 x 8.77)) = 12.93 degrees. Here, a . b is the dot product, and |a| and |b| are the magnitudes. Divide the dot product by the product of magnitudes, then take the arccosine to get the angle in degrees.
Is the dot product a vector or a scalar?
A scalar, a single number with no direction, unlike the cross product. The dot product always produces one numeric value. This distinguishes it from the cross product, which yields a vector with both magnitude and direction. The scalar result makes the dot product useful for measuring how much two vectors align.
Where is the dot product used?
Work in physics, projections in graphics and statistics, and similarity measures in machine learning all rest on it. In physics, it calculates work from force and displacement. In graphics, it projects vectors onto axes. In statistics, it measures correlation. In machine learning, it gauges similarity between data points.