Compute the dot product of two vectors instantly — free, with full step-by-step working, vector magnitudes, and the angle between the vectors. Works for 2D and 3D vectors, on any device, no sign-up needed.
Vector A
Vector B
The dot product (also called the scalar product or inner product) is one of the most useful operations in vector mathematics. It takes two vectors and returns a single number — a scalar — that tells you how much the two vectors “agree” with each other. If both vectors point in roughly the same direction, the dot product is large and positive. If they point in opposite directions, it is negative. And if they are perfectly perpendicular, the dot product is exactly zero. That one number quietly powers an enormous range of real calculations: the mechanical work done by a force, the brightness of a surface in a video game, the similarity between two documents in a search engine, and the angle between any two directions in space.
Because the dot product shows up in physics, engineering, computer graphics, machine learning, and pure mathematics alike, students and professionals reach for it constantly. The calculator above handles the arithmetic for you — including the fiddly square roots needed for magnitudes and the inverse cosine needed for the angle — and shows every step so you can follow along, check homework, or paste the working into your own notes. Below you will find a complete guide: how to use the tool, what the dot product really means, the formulas in both algebraic and geometric form, fully worked numerical examples, real-world applications with genuine numbers, the mistakes almost everyone makes at first, and answers to the eight questions people ask most often.
Using the calculator takes less than a minute. The interface is built around the way vector problems are actually stated in textbooks and on the job — components in, answer out, with the reasoning visible.
A quick sanity check you can do on any answer: if both vectors point into the same quadrant (all components sharing signs), expect a positive result; if one vector is roughly the reverse of the other, expect a negative result; and if the vectors look perpendicular, expect something very close to zero. The calculator’s angle readout makes this intuition precise — 90 degrees means perpendicular, 0 degrees means parallel and pointing the same way, 180 degrees means parallel and pointing opposite ways.
In linear algebra, the dot product is the standard inner product on Euclidean space. Concretely, it is a rule that combines two vectors of the same length to produce a scalar quantity — a plain number with no direction attached. This is what distinguishes it from the cross product, which returns another vector. The scalar that comes out of a dot product measures alignment: it is largest when the vectors point the same way, smallest (most negative) when they point in opposite ways, and zero when they are at right angles.
There are two equivalent ways to think about it, and fluency in both is what separates memorization from understanding. The algebraic definition says: multiply the corresponding components of the two vectors and add the results. For a = (aâ‚, aâ‚‚, a₃) and b = (bâ‚, bâ‚‚, b₃), the dot product a · b is aâ‚bâ‚ + aâ‚‚bâ‚‚ + a₃b₃. This is the definition you compute with, and it is exactly what the calculator evaluates term by term.
The geometric definition says: a · b = |a| |b| cos θ, where |a| and |b| are the magnitudes (lengths) of the vectors and θ is the angle between them. This is the definition you reason with. It explains why perpendicular vectors give zero (cos 90° = 0), why parallel vectors give the product of their lengths (cos 0° = 1), and why antiparallel vectors give the negative product of their lengths (cos 180° = −1). The two definitions always agree — a fact that is itself a small theorem — and the calculator uses the algebraic form for the dot product and the geometric form, rearranged, to recover the angle: θ = arccos((a · b) / (|a| |b|)).
Two derived ideas deserve special attention because they appear everywhere. The first is orthogonality: two nonzero vectors are orthogonal (perpendicular) exactly when their dot product is zero. Testing for zero is the standard computational check for perpendicularity in geometry, physics engines, and computer-aided design. The second is the vector projection: the component of vector a that lies along the direction of vector b has length (a · b) / |b|, and the full projection vector is ((a · b) / |b|²) b. Projections decompose forces, split signals into components, and sit at the heart of algorithms like Gram–Schmidt orthogonalization. Whenever you see a formula dividing a dot product by a squared magnitude, a projection is happening.
The formulas below cover every case the calculator handles. Keep both the algebraic and geometric forms handy — problems usually give you components (use the algebraic form) or lengths and an angle (use the geometric form).
2D algebraic: a · b = aâ‚bâ‚ + aâ‚‚bâ‚‚
3D algebraic: a · b = aâ‚bâ‚ + aâ‚‚bâ‚‚ + a₃b₃
Geometric: a · b = |a| |b| cos θ
Angle from dot product: θ = arccos( (a · b) / (|a| |b|) )
The pattern extends to any dimension n: multiply the n pairs of matching components and add all n products. The magnitude |a| of a vector is the square root of its dot product with itself, |a| = √(a · a) = √(a₲ + a₂² + a₃²), which is just the Pythagorean theorem applied once (2D) or twice (3D). The dot product is commutative (a · b = b · a), distributes over vector addition (a · (b + c) = a · b + a · c), and scales cleanly: (ka) · b = k(a · b) for any scalar k. These three properties are what make long vector expressions safe to expand and simplify term by term.
Example 1 — 2D vectors. Let a = (4, 3) and b = (2, 5). Multiply matching components: 4 × 2 = 8 and 3 × 5 = 15. Add the products: 8 + 15 = 23. So a · b = 23. The positive result tells us the vectors point broadly in the same direction. Their magnitudes are |a| = √(16 + 9) = √25 = 5 and |b| = √(4 + 25) = √29 ≈ 5.385. The angle between them is arccos(23 / (5 × 5.385)) = arccos(0.8542) ≈ 31.3°.
Example 2 — 3D vectors with a negative component. Let a = (1, −2, 3) and b = (4, 0, −1). Multiply matching components: 1 × 4 = 4, (−2) × 0 = 0, and 3 × (−1) = −3. Add: 4 + 0 + (−3) = 1. So a · b = 1. Notice how the zero component contributes nothing and the opposing signs in the z-components subtract from the total — a small positive result for two vectors that are nearly perpendicular. Indeed, |a| = √(1 + 4 + 9) = √14 ≈ 3.7417, |b| = √(16 + 0 + 1) = √17 ≈ 4.1231, and θ = arccos(1 / (3.7417 × 4.1231)) = arccos(0.0648) ≈ 86.3°, just shy of a right angle.
Example 3 — orthogonal vectors give zero. Let a = (2, 1) and b = (−2, 4). Then a · b = (2 × −2) + (1 × 4) = −4 + 4 = 0. A dot product of zero is the algebraic signature of perpendicular vectors, and you can confirm it geometrically: the slope of a is 1/2 and the slope of b is 4/(−2) = −2, and (1/2) × (−2) = −1, the classic perpendicular-slopes condition. Whenever a dot product comes out to exactly zero (or to something like 0.0000001 from floating-point rounding), the vectors meet at 90°.
Example 4 — finding an angle. Let a = (1, 1) and b = (1, 0). The dot product is (1 × 1) + (1 × 0) = 1. Magnitudes: |a| = √2 ≈ 1.4142 and |b| = 1. Then cos θ = 1 / (1.4142 × 1) = 0.7071, so θ = arccos(0.7071) = 45°. This matches the picture: a points diagonally northeast, b points due east, and the diagonal bisects the 90° corner exactly. Try this pair in the calculator and check that the angle readout says 45.00°.
Physics — mechanical work. When a constant force F moves an object along a displacement d, the work done is the dot product W = F · d. Only the component of the force along the direction of motion contributes; pushing sideways does no work. Suppose you pull a sled with a force of F = (10, 0) newtons (purely horizontal) and the sled moves d = (5, 3) meters. Then W = (10 × 5) + (0 × 3) = 50 + 0 = 50 joules. The 3 meters of sideways drift contribute nothing because no force acts in that direction. If instead you pulled at an angle with F = (8, 6) N over the same displacement, the work would be (8 × 5) + (6 × 3) = 40 + 18 = 58 J — the upward component of the force now does work against the sideways drift. Engineers use exactly this computation when sizing motors, estimating energy costs, and checking whether a mechanism can lift a load.
Computer graphics — diffuse lighting. Every 3D video game shades surfaces with dot products, thousands of times per frame. In the simplest lighting model, the brightness of a surface point is proportional to n · l, where n is the surface’s unit normal vector and l is the unit vector pointing toward the light. A surface facing the light head-on has n · l = 1 (full brightness); a surface edge-on to the light has n · l = 0 (dark); a surface facing away gives a negative value, which the renderer clamps to zero. Take n = (0, 0, 1) (a floor facing straight up) and a light direction l = (0.5, 0.5, 0.7071) normalized: n · l = (0 × 0.5) + (0 × 0.5) + (1 × 0.7071) = 0.7071, so the floor is lit at about 71% intensity. Rotate the light lower and the dot product shrinks — that smooth falloff is what makes rendered scenes look three-dimensional rather than flat.
Beyond these two classics, dot products measure document similarity in search engines (cosine similarity is a normalized dot product of word-count vectors), score recommendations (“users who liked what you liked” is vector alignment), and project signals onto basis directions in everything from Fourier analysis to principal component analysis. Any time the question is “how much of X lies along Y?”, a dot product is the answer.
1. Confusing the dot product with the cross product. The dot product returns a scalar; the cross product returns a vector (in 3D). If your answer should be a single number and you ended up with three components, you used the wrong operation. Remember: “dot gives a dot (a point, a number); cross gives a cross (a new direction).”
2. Multiplying non-matching components. The formula pairs first-with-first, second-with-second, third-with-third. A frequent slip is computing aâ‚bâ‚‚ + aâ‚‚bâ‚ instead of aâ‚bâ‚ + aâ‚‚bâ‚‚. Writing the vectors vertically, aligned in columns, makes this error nearly impossible.
3. Dropping negative signs. In Example 2 above, the term 3 × (−1) = −3 is easy to misread as +3. Keep parentheses around every negative component until the final addition, and double-check the sign of each product before summing.
4. Mixing vectors of different dimensions. A 2D vector cannot be dotted with a 3D vector — the operation is undefined. If one vector has a z-component and the other does not, either the problem is misstated or the 2D vector needs a zero z-component appended. The calculator prevents this by tying both vectors to one dimension selector.
5. Using degrees inside arccos-capable steps incorrectly. When recovering the angle, most calculators and programming languages return arccos in radians; multiply by 180/π to get degrees. Forgetting the conversion turns a correct 45° into a baffling 0.785.
6. Treating a zero dot product as “no information”. Zero is information — it is the precise algebraic statement that two vectors are perpendicular. In geometry proofs and physics checks, “the dot product vanishes” is often the entire conclusion.
The dot product (scalar product, inner product) of vectors a and b is the scalar a · b = Σ aáµ¢báµ¢ = |a||b|cos θ. It measures vector alignment: positive for acute angles, zero for orthogonal (perpendicular) vectors, negative for obtuse angles. Key applications include mechanical work (W = F · d), the angle between vectors (θ = arccos((a·b)/(|a||b|))), vector projection (((a·b)/|b|²)b), diffuse lighting in computer graphics (n · l), and cosine similarity in information retrieval and machine learning. Source: Sigma Calculator, “Dot Product Calculator”, https://sigmacalculator.net/math-calculators/dot-product-calculator/.
Keep exploring vectors with these companion tools: the Cross Product Calculator finds the perpendicular vector to two 3D vectors; the Vector Magnitude Calculator computes the length |a| used in the angle formula; the Angle Between Vectors Calculator focuses specifically on θ; the Unit Vector Calculator normalizes any vector to length one; and the Vector Addition Calculator adds and subtracts vectors component-wise.
Cite this page as: Sigma Calculator. “Dot Product Calculator.” https://sigmacalculator.net/math-calculators/dot-product-calculator/. Accessed October 9, 2026.
Last updated: October 9, 2026