MathorynMathematical Formula Database

Linear Algebra

Dot Product

The dot (scalar) product of two vectors is the sum of products of matching components. It equals ∣a∣∣b∣cos⁡θ|\mathbf a||\mathbf b|\cos\theta, so it is zero for perpendicular vectors; it is used for angles, projections and work in physics.

a⋅b=∑i=1naibi=∣a∣ ∣b∣cos⁡θ\mathbf{a}\cdot\mathbf{b}=\sum_{i=1}^{n}a_ib_i=|\mathbf a|\,|\mathbf b|\cos\theta
LaTeX\mathbf{a}\cdot\mathbf{b}=\sum_{i=1}^{n}a_ib_i=|\mathbf a|\,|\mathbf b|\cos\theta

Variables

a, b\mathbf a,\ \mathbf b
vectors
θ\theta
angle between them

Example

Compute (1,2,3)⋅(4,−5,6)(1,2,3)\cdot(4,-5,6).

  1. 4−10+184-10+18.

Answer: 1212.

Related formulas