Calculatorism

Vector Dot Product Calculator

Enter two 3-D vectors to compute the dot product a·b = ax·bx+ay·by+az·bz, their magnitudes |a|, |b| and the angle θ between them. a=(1,2,3), b=(4,5,6) → a·b=32, θ≈12.93°.

Input Data

x-component of vector a.
y-component of vector a.
z-component of vector a.
x-component of vector b.
y-component of vector b.
z-component of vector b.

Results

Scalar product a·b (dimensionless in component units).
32
Magnitude (length) of vector a.
3.741657
Magnitude (length) of vector b.
8.774964
Angle between a and b (degrees).
12.933154°

At a glance:The dot product (scalar product) of two 3-D vectors a and b is defined algebraically as a·b = a_x·b_x + a_y·b_y + a_z·b_z, and geometrically as a·b = |a|·|b|·cosθ, where |a|, |b| are the vector magnitudes and θ is the angle between them. It is a scalar (single number), not a vector — hence 'scalar product'. Key properties: (1) a·b = 0 means the vectors are perpendicular (orthogonal); (2) a·b > 0 means the angle is acute (< 90°), a·b < 0 means obtuse (> 90°); (3) the magnitude of the dot product is maximal when the vectors are parallel (θ=0, a·b=|a||b|); (4) a·a = |a|². Example (default): a=(1,2,3), b=(4,5,6) → a·b=1·4+2·5+3·6=4+10+18=32; |a|=√(1+4+9)=√14≈3.742, |b|=√(16+25+36)=√77≈8.775; cosθ=32/(3.742×8.775)=0.974, θ≈12.93°. Applications: (1) work done by a force W=F·d (force dotted with displacement); (2) vector projection proj_b(a)=(a·b/|b|²)b; (3) diffuse lighting in computer graphics (normal·light); (4) testing orthogonality; (5) the law of cosines. Notes: (1) the dot product is commutative a·b=b·a; (2) units combine from both vectors; (3) if magnitudes are zero the angle is undefined.

Formula

Algebraic: a·b = a_x·b_x + a_y·b_y + a_z·b_z

Geometric: a·b = |a|·|b|·cosθ

Magnitude: |a| = √(a_x²+a_y²+a_z²)

Angle: θ = arccos(a·b / (|a|·|b|))

Perpendicular ⇒ a·b = 0

$$\mathbf{a}\cdot\mathbf{b} = a_x b_x + a_y b_y + a_z b_z = |\mathbf{a}||\mathbf{b}|\cos\theta$$

How to Use

  1. Enter the x, y, z components of vector a and vector b.
  2. The tool shows a·b, |a|, |b| and the angle θ between them.
  3. a·b=0 means the vectors are perpendicular.

Case Studies

Work done by a force

Force F=(10,0,0) N, displacement d=(3,4,0) m.

W = F·d = 10×3 + 0×4 + 0×0 = 30 J.

Only the component of force along displacement does work; the perpendicular part contributes nothing.

Content review: Calculatorism Science Team. Results are for reference only; please refer to the relevant authorities for the official figures.

Found a problem with the results?

If this calculator's result is wrong, or you have any question about the calculation logic, please let us know. You are viewing:Vector Dot Product Calculator(/physics/vector-dot-product)。