Home

Dot Product Calculator

Online dot product calculator: enter the coordinates of two vectors to get their scalar product, magnitudes, included angle and an automatic perpendicularity check. The dot product is the key tool for testing perpendicularity, finding angles and computing projections.

展开更多 ▾
a·b = |a||b|cosθ = aₓbₓ + aᵧbᵧ
θabO
Coordinates of vector a
x
y
Coordinates of vector b
x
y

📖 Tutorial | Dot Product

1. Definition
The dot product (scalar / inner product) of two non-zero vectors a, b is a·b = |a||b|cosθ, where θ is the included angle (0°≤θ≤180°). Its result is a scalar (a number), not a vector.
2. Coordinate Formula & Notation
SymbolMeaning
a=(aₓ,aᵧ), b=(bₓ,bᵧ)Coordinates of the vectors
a·b = aₓbₓ + aᵧbᵧDot product in coordinates
|a|, |b|Magnitudes
θAngle, cosθ = (a·b)/(|a||b|)
3. Properties & Laws
  • Commutative: a·b = b·a;
  • Scalar multiple: (λa)·b = λ(a·b) = a·(λb);
  • Distributive: (a+b)·c = a·c + b·c;
  • a·a = |a|² (written a² = |a|²);
  • a⊥b ⇔ a·b = 0, the perpendicularity test;
  • No associative law: (a·b)c ≠ a(b·c).
4. Steps
  1. Enter the x and y components of vectors a and b in the two groups;
  2. Click "Calculate" to get the dot product and angle;
  3. Or click "Load Example" first, then edit the values.
5. Worked Example
Example: Given a=(3,4), b=(4,−3), find a·b and their relation.
Solution: a·b = 3×4 + 4×(−3) = 12 − 12 = 0, so a⊥b.
(|a|=|b|=5, cosθ=0, θ=90°.)
6. Common Pitfalls
① The dot product is a number, not a vector — use "·", never "×"; ② the angle ranges from 0° to 180°; ③ a·b=0 implies perpendicularity only when both vectors are non-zero; you cannot cancel the dot product like an ordinary number.

❓ FAQ | Dot Product

Why is the dot product a number?
Because a·b=|a||b|cosθ multiplies three scalars, the result is always a scalar. Only the cross product gives a vector; high-school planar vectors focus on the dot product.
How do I compute it from coordinates?
Multiply corresponding components and add them: a·b=aₓbₓ+aᵧbᵧ. For example (1,2)·(3,4)=1×3+2×4=11.
What does a dot product of 0 mean?
If both vectors are non-zero, they are perpendicular (a⊥b). This is the most common way to prove perpendicularity; if one is the zero vector, treat it separately.
How do I find the angle from coordinates?
Compute the dot product and the two magnitudes, then take arccos of cosθ=(a·b)/(|a||b|); the result lies between 0° and 180°.
Is there an associative law?
No. (a·b)c is a vector parallel to c, while a(b·c) is parallel to a, and they generally differ. The commutative and distributive laws do hold.
What does a² mean?
a²=a·a=|a|², the square of the magnitude. So |a|=√(a·a), which is useful for finding distances.
How is it related to projection?
The scalar projection of a onto b is (a·b)/|b|; multiply it by the unit vector in direction b to get the vector projection.