Dot Product Calculator

THE DOT PRODUCT
Type two vectors, one after the other.
The products, the perpendicular test, and the check
Your two vectors
Put each vector in brackets, one after the other: <3, 4> . <1, 2>. The dot between them is optional — the brackets already say where one ends. Two or three components, and fractions stay exact. Holding deletes one character after another.
A dot product of exactly zero means the vectors are perpendicular. Kept as whole-number fractions, zero really is zero — a tool working in decimals shows 0.0000000001 and cannot tell you.
Tap a box, then use the keys
Multiply matching components and add: the answer is a single number, not a vector. Its sign already tells you the shape of the angle — positive means less than 90°, negative means more, and zero means exactly 90°.
How the dot product is found

This dot product calculator multiplies two vectors into a single number, keeps every step in exact fractions, and gives a definite answer to the question most people came with: are these two perpendicular?

Type <2, 3> . <3, −2> and you get 0. Not 0.0000000001. Zero, so the vectors are at right angles and the proof is finished.

The Easiest Calculation in the Subject

Multiply the matching components. Add them. Stop.

⟨3, 4⟩ · ⟨1, 2⟩ = 3×1 + 4×2 = 11. In three dimensions a third product joins the sum and nothing else changes.

What comes out is a plain number, which is why it is also called the scalar product. The directions have gone. Two arrows went in and an ordinary quantity came out, and that turns out to be far more useful than it sounds.

What That Number Is Telling You

The dot product measures how much the two vectors agree about which way to point.

Positive, and they lean the same way — the angle between them is under 90°. Negative, and they lean apart — over 90°. Zero, and they are at right angles exactly.

You can read all of that off the sign before working out any angle at all, which is worth doing. In a physics problem a negative dot product usually means a force is fighting the motion rather than helping it, and that is often the whole answer.

Zero Means Perpendicular, and Only Exact Zero Will Do

Here is why exact arithmetic matters on a page like this one.

Asked to prove ⟨2, 3⟩ and ⟨3, −2⟩ are perpendicular, you do not find the angle. You write 6 − 6 = 0 and you are done. That is the whole proof and it is one line long.

Now try it on a calculator that works in decimals. It shows you 0, or it shows you 0.0000000001, and you cannot tell which of those is a real zero and which is rounding. A page that cannot distinguish them cannot answer the question you asked. Everything here stays a whole-number fraction from the moment your input is read, so zero is zero.

If a · b isThe vectorsThe angle
positive lean the same way under 90°
zero are perpendicular exactly 90°
negative lean apart over 90°
as big as it can get are parallel 0° or 180°

The Other Formula, and Why It Matters

There are two ways to write a dot product and they are the same thing:

a · b = a₁b₁ + a₂b₂   and   a · b = |a| |b| cos θ

The first is how you calculate it. The second is what it means. Setting them equal is how the angle falls out, and it is why the dot product turns up in every question about directions rather than only in arithmetic exercises.

It also explains the sign immediately. Lengths are never negative, so the sign of the dot product is the sign of cos θ, and cos is negative exactly when the angle passes 90°.

A Guarantee Worth Having

There is a way for a dot product page to fail that most users never see and some do.

To get the angle you divide the dot product by the two lengths multiplied. Done in ordinary decimals, that division comes out as 1.0000000000000002 for two vectors that are simply parallel — and the inverse cosine of anything above 1 is not a number at all.

That is not a rare corner. Put twenty thousand pairs of parallel vectors with whole-number components through the decimal route and 3,706 of them overshoot, returning an error instead of 0°. Nearly one in five.

This one checks, in whole numbers, that (a · b)² is never larger than (a · a)(b · b) before it goes near an inverse cosine. That inequality is always true in mathematics; checking it in exact arithmetic is what makes it always true in the code as well. The two sides come out equal precisely when the vectors are parallel, which is how this page knows to tell you so.

How to Use This Dot Product Calculator

Put each vector in brackets, one after the other: <3, 4> . <1, 2>. The dot between them is optional, since the brackets already show where one vector ends. Two components or three, and fractions stay fractions — ⟨1/2, 1/3⟩ · ⟨1/3, 1/2⟩ comes back as 1/3, not 0.3333.

The band gives the dot product, what its sign means, and the angle it implies, with the cosine as an exact surd where one exists. Those two lengths are the same ones the magnitude and direction page works through, and if you need the resultant of the same pair rather than their product, that is vector addition. A direction on its own is a unit vector.

Nothing is printed until the answer has been through several checks: that a · b equals b · a, that the inequality above holds, that the cosine squared matches the exact ratio it should, and that a zero dot product really does correspond to 90°. The number of checks that passed appears with the working.

Dot Product Calculator FAQ

How do you find the dot product of two vectors?
Multiply the matching components and add the results. For (3, 4) and (1, 2) that is 3×1 + 4×2, which is 11. The answer is a single number, not a vector.
What does the dot product tell you?
How much the two vectors point the same way. Positive means the angle between them is under 90°, negative means over, and zero means exactly 90°.
How do you prove two vectors are perpendicular?
Show that their dot product is zero. You do not need the angle at all. For (2, 3) and (3, −2) the dot product is 6 − 6, which is 0, so they are at right angles.
Is the dot product a vector or a number?
A number. That is why it is also called the scalar product. The directions cancel out in the multiplication and nothing is left pointing anywhere.
Does the order matter in a dot product?
No. a · b and b · a give the same number, because multiplication of the components does not care about order. This is one place where vectors are simpler than they look.
What is the dot product formula with the angle?
a · b equals the length of a times the length of b times the cosine of the angle between them. Rearranged, it gives the angle: cos θ is the dot product divided by the two lengths multiplied.
Can the dot product be negative?
Yes, and it means the vectors lean apart rather than together. A negative dot product corresponds to an angle greater than 90°. In physics it often means a force is opposing a motion rather than helping it.
What is the dot product of a vector with itself?
The square of its length. For (3, 4) it is 9 + 16, which is 25, and the length is 5. This is the shortest route from components to a length squared.

Multiply, add, then look at the sign before you reach for anything else.