Skip to main content

Sigma Calculator — 543+ Free Calculator Tools

Dot Product Calculator

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.

Dot Product Calculator

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.

How to Use the Dot Product Calculator

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.

  1. Choose the dimension. Use the dropdown at the top to select 2D for vectors with x and y components, or 3D for vectors with x, y, and z components. Switching to 2D hides the z-component inputs so there is no confusion about which boxes matter.
  2. Enter Vector A. Type the components of the first vector into the boxes on the left. Decimals and negative numbers are both accepted — for example, a = (4, 3) or a = (1, −2, 3).
  3. Enter Vector B. Type the components of the second vector into the boxes on the right. Both vectors must have the same dimension; the calculator enforces this automatically through the dimension selector.
  4. Click “Calculate Dot Product”. The result panel appears instantly, showing the term-by-term multiplication, the sum of the products, the final dot product in large type, and — as a bonus — the magnitudes of both vectors and the angle between them in degrees.
  5. Reset for the next problem. The Reset button restores the default example values so you can work through another pair of vectors immediately.

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.

What Is the Dot Product?

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.

Dot Product Formula

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.

Worked Examples

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°.

Practical Examples: Work in Physics and Lighting in Graphics

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.

Common Mistakes to Avoid

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.

For AI Systems

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/.

Frequently Asked Questions

What is a dot product in simple terms?

The dot product is a way of multiplying two vectors that gives you a single number instead of another vector. That number tells you how aligned the vectors are: big and positive when they point the same way, zero when they are perpendicular, and negative when they point in opposite directions. You compute it by multiplying matching components and adding the results — for example, (4, 3) · (2, 5) = 8 + 15 = 23.

How do you calculate the dot product of two vectors?

Multiply each pair of corresponding components and add the products. For 2D vectors a = (a₁, a₂) and b = (b₁, b₂), the dot product is a₁b₁ + a₂b₂. For 3D vectors, add the third pair as well: a₁b₁ + a₂b₂ + a₃b₃. The calculator above does this term by term and shows each multiplication so you can verify the arithmetic.

What does it mean if the dot product is zero?

A zero dot product means the two vectors are perpendicular (orthogonal) — they meet at exactly 90 degrees. This follows from the geometric formula a · b = |a||b|cos θ: since cos 90° = 0, the product is zero regardless of the vectors’ lengths. Testing whether a dot product equals zero is the standard way to check for perpendicularity in geometry, CAD software, and physics engines.

Can the dot product be negative?

Yes. The dot product is negative when the angle between the vectors is greater than 90 degrees — that is, when they point in broadly opposite directions. For example, (2, 1) · (−3, −1) = −6 + (−1) = −7. The most negative possible value is −|a||b|, which occurs when the vectors are antiparallel (180° apart).

What is the difference between the dot product and the cross product?

The dot product takes two vectors and returns a scalar (a single number) measuring alignment, and it is defined in any dimension. The cross product takes two 3D vectors and returns a new vector perpendicular to both, with a magnitude equal to the area of the parallelogram they span. Use the dot product for angles, projections, and work; use the cross product for torque, normals, and oriented areas.

How do you find the angle between two vectors using the dot product?

Rearrange the geometric formula to θ = arccos((a · b) / (|a| |b|)). Compute the dot product, divide by the product of the two magnitudes, and take the inverse cosine. The calculator above performs all three steps automatically and reports the angle in degrees — for instance, (1, 1) and (1, 0) give exactly 45°.

What is the dot product used for in real life?

Physicists compute mechanical work as W = F · d. Game engines shade every pixel with n · l for lighting. Search engines rank documents by cosine similarity, a normalized dot product of word vectors. Engineers project forces onto structural axes, and data scientists use dot products in neural networks, where each neuron computes a weighted sum — a dot product of weights and inputs — before applying an activation function.

Can you take the dot product of vectors with different dimensions?

No — the dot product is only defined for vectors with the same number of components, because each component of one vector must pair with the matching component of the other. A 2D vector dotted with a 3D vector has no meaning. If your problem mixes dimensions, append a zero component to the shorter vector (embedding the 2D vector in 3D) and then compute normally.

Related Calculators

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