Free Dot Product Calculator

a₁
a₂
a₃
b₁
b₂
b₃

Enter vector values and click Calculate to find the dot product.

A dot product calculator provides a quick and accurate way to compute the scalar product of two vectors. This free online tool, also known as a scalar product calculator or vector dot product calculator, handles both 2D and 3D vectors (and beyond) with ease. Instead of performing tedious component-wise multiplication manually, you simply enter the vector components and obtain the result instantly. In this article, we explain the underlying formula, demonstrate a step‑by‑step example, discuss the geometric interpretation, and highlight how the dot product is used in fields ranging from geometry to physics.

Vector Multiplication Types

Vector multiplication comes in two main flavors: the dot product (scalar product, denoted with “·”) and the cross product (vector product, denoted with “×”). The key distinction is that a dot product yields a single number (a scalar), whereas a cross product outputs a new vector. The present tool focuses on the dot product, but you may also encounter cross product calculators for the other operation.

Dot Product Formulas

Algebraic Definition

For vectors in an nn-dimensional space, the dot product is the sum of the products of their corresponding components. In three dimensions, let

a=[a1,a2,a3],b=[b1,b2,b3]\mathbf{a} = [a_1, a_2, a_3], \qquad \mathbf{b} = [b_1, b_2, b_3]

Then

a⋅b=a1b1+a2b2+a3b3\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3

For 2D vectors, simply omit the third term; for higher dimensions, add terms accordingly.

Geometric Definition

Geometrically, the dot product equals the product of the magnitudes of the two vectors multiplied by the cosine of the angle θ\theta between them:

a⋅b=∣a∣ ∣b∣ cos⁡θ\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| \, |\mathbf{b}| \, \cos\theta

This formulation reveals that the dot product is maximized when the vectors are parallel (θ=0∘\theta = 0^\circ), zero when they are perpendicular (θ=90∘\theta = 90^\circ), and negative when they point in opposite directions (θ>90∘\theta > 90^\circ).

Step‑by‑Step Example

Suppose a=[4,5,−3]\mathbf{a} = [4, 5, -3] and b=[1,−2,−2]\mathbf{b} = [1, -2, -2].

  1. Multiply the first components: 4×1=44 \times 1 = 4
  2. Multiply the second components: 5×(−2)=−105 \times (-2) = -10
  3. Multiply the third components: (−3)×(−2)=6(-3) \times (-2) = 6
  4. Sum the results: 4+(−10)+6=04 + (-10) + 6 = 0

Thus a⋅b=0\mathbf{a} \cdot \mathbf{b} = 0. A zero scalar product indicates that the two vectors are orthogonal (perpendicular). This matches the geometric fact that the angle between them is 90∘90^\circ.

Dot Product in Spherical Coordinates

When vectors are expressed in spherical coordinates (r,ϕ,θ)(r, \phi, \theta) where ϕ\phi is the polar angle and θ\theta the azimuthal angle, converting to Cartesian components yields a dot product formula that simplifies using the cosine difference identity:

a⋅b=r1r2[sin⁡ϕ1sin⁡ϕ2cos⁡(θ1−θ2)+cos⁡ϕ1cos⁡ϕ2]\mathbf{a} \cdot \mathbf{b} = r_1 r_2 \bigl[ \sin\phi_1 \sin\phi_2 \cos(\theta_1 - \theta_2) + \cos\phi_1 \cos\phi_2 \bigr]

This form is particularly useful in physics problems involving radial symmetry.

Matrix Dot Product (Matrix Multiplication)

The concept of a dot product can be extended to matrices. If AA is an m×nm \times n matrix and BB is a k×lk \times l matrix, the matrix product C=A⋅BC = A \cdot B is defined only when n=kn = k (the number of columns of AA equals the number of rows of BB). The resulting matrix CC has dimensions m×lm \times l. Unlike the scalar dot product of vectors, matrix multiplication is non‑commutative: A⋅BA \cdot B generally differs from B⋅AB \cdot A, and often one of the products is not even defined.

Geometric Interpretation: Projection

Graphically, the dot product a⋅b\mathbf{a} \cdot \mathbf{b} can be seen as the length of the projection of a\mathbf{a} onto the direction of b\mathbf{b} multiplied by the length of b\mathbf{b}. Equivalently, it is the projection of b\mathbf{b} onto a\mathbf{a} times the length of a\mathbf{a}. Because the projection and the vector being projected onto are parallel, the result simplifies to a product of effective lengths. This interpretation is the basis for using dot products to test orthogonality and to compute components of vectors.

Orthogonality and Vector Length

  • Orthogonality check: a⋅b=0  ⟺  a⊥b\mathbf{a} \cdot \mathbf{b} = 0 \iff \mathbf{a} \perp \mathbf{b}. This is the simplest algebraic test for perpendicularity.
  • Magnitude from dot product: The dot product of a vector with itself gives the square of its length: a⋅a=∣a∣2\mathbf{a} \cdot \mathbf{a} = |\mathbf{a}|^2. Hence ∣a∣=a⋅a|\mathbf{a}| = \sqrt{\mathbf{a} \cdot \mathbf{a}}.

Triple Product and Volume of a Parallelepiped

The scalar triple product of three vectors a,b,c\mathbf{a}, \mathbf{b}, \mathbf{c} is defined as V=a⋅(b×c)V = \mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}). Its absolute value equals the volume of the parallelepiped formed by the three edge vectors. The triple product is cyclic:

a⋅(b×c)=b⋅(c×a)=c⋅(a×b)\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}) = \mathbf{b} \cdot (\mathbf{c} \times \mathbf{a}) = \mathbf{c} \cdot (\mathbf{a} \times \mathbf{b})

Reversing the order changes the sign. When the two angles involved are right angles, the volume reduces to that of a rectangular box.

Applications of the Dot Product

Cosine Law Proof

The law of cosines can be elegantly derived using dot products. Consider a triangle with sides represented by vectors a,b,c\mathbf{a}, \mathbf{b}, \mathbf{c} such that c=b−a\mathbf{c} = \mathbf{b} - \mathbf{a}. Then

c2=c⋅c=(b−a)⋅(b−a)=a2+b2−2∣a∣∣b∣cos⁡θ,c^2 = \mathbf{c} \cdot \mathbf{c} = (\mathbf{b} - \mathbf{a}) \cdot (\mathbf{b} - \mathbf{a}) = a^2 + b^2 - 2 |\mathbf{a}| |\mathbf{b}| \cos\theta,

which is precisely the law of cosines.

Physical Quantities

Many physical definitions rely on dot products:

  • Work: W=F⋅dW = \mathbf{F} \cdot \mathbf{d} (force F\mathbf{F} acting through displacement d\mathbf{d}).
  • Power: P=F⋅vP = \mathbf{F} \cdot \mathbf{v} (force F\mathbf{F} and velocity v\mathbf{v}).
  • Flux: Electric flux ΦE=E⋅A\Phi_E = \mathbf{E} \cdot \mathbf{A} and magnetic flux ΦB=B⋅A\Phi_B = \mathbf{B} \cdot \mathbf{A}, where A\mathbf{A} is the area vector.
  • Magnetic potential energy: U=−μ⋅BU = -\boldsymbol{\mu} \cdot \mathbf{B} (magnetic moment μ\boldsymbol{\mu} in field B\mathbf{B}).

Summary

A vector dot product calculator is more than a convenience; it is a gateway to understanding fundamental vector operations. Whether you need to verify orthogonality, compute the angle between vectors, or explore advanced topics like spherical coordinates and matrix multiplication, this scalar product calculator provides reliable results instantly.

FAQ

1. How do I calculate the dot product of two vectors?

Enter the components of each vector into the calculator. The tool multiplies corresponding components and sums the products. For 3D vectors, the formula is a·b = a1b1 + a2b2 + a3b3.

2. What does a dot product of zero mean?

A zero dot product indicates that the two vectors are perpendicular (orthogonal). Geometrically, the angle between them is 90°.

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

The dot product yields a scalar (a single number), while the cross product yields a vector. The dot product is also commutative (a·b = b·a), whereas the cross product is anti‑commutative.

4. Can the dot product be used for vectors with more than three dimensions?

Yes. The algebraic definition extends to any number of dimensions: sum the products of corresponding components. The geometric definition still holds, though the concept of an angle is generalized.

5. How is the dot product used in physics?

It appears in definitions such as work (W = F·d), power (P = F·v), electric/magnetic flux (Φ = E·A or B·A), and magnetic potential energy (U = –μ·B).

How to Use

  1. Choose a calculation mode: By Coordinates or By Magnitude & Angle.
  2. Enter the vector components or magnitudes and angle.
  3. Click Calculate to compute the dot product and related results.