Dot Product

Table of Contents

For two vectors a⃗\small \vec{a} and b⃗\small \vec{b} in Rn\small \mathbb{R}^n (real coordinate spaces, the dot product is defined as

a⃗⋅b⃗=∑i=1naibi\vec{a} \cdot \vec{b} = \sum_{i=1}^n a_i b_i

Where

  • ai\small a_i and bi\small b_i are the i\small i-th components of a⃗\small \vec{a} and b⃗\small \vec{b}, respectively, and
  • n\small n is the dimension of a⃗\small \vec{a} and b⃗\small \vec{b}.

Alternative definition

Given that a⃗\small \vec{a} and b⃗\small \vec{b} are vectors with lengths ∣a∣\small |a| and ∣b∣\small |b|, respectively, the dot product is also equal to

a⃗⋅b⃗=∣a∣∣b∣cos⁡θ\vec{a} \cdot \vec{b} = |a| |b| \cos \theta

Where θ\small \theta is the angle between a⃗\small \vec{a} and b⃗\small \vec{b}.

Note that the dot product is a less general version of the inner product.

Properties

  • a⃗⋅b⃗=b⃗⋅a⃗\small \vec{a} \cdot \vec{b} = \vec{b} \cdot \vec{a}
  • (a⃗+b⃗)⋅c⃗=a⃗⋅c⃗+b⃗⋅c⃗\small (\vec{a} + \vec{b}) \cdot \vec{c} = \vec{a} \cdot \vec{c} + \vec{b} \cdot \vec{c}
  • a⃗⋅a⃗=∣a∣2\small \vec{a} \cdot \vec{a} = |a|^2
  • a⃗⋅b⃗=0\small \vec{a} \cdot \vec{b} = 0 if and only if a⃗\small \vec{a} and b⃗\small \vec{b} are orthogonal
  • For a scalar s, (sa⃗)⋅b⃗=s⋅(a⃗⋅b⃗)(\small s \vec{a}) \cdot \vec{b} = s \cdot (\vec{a} \cdot \vec{b})

Sources