Dot product

From Robotics
Revision as of 17:18, 24 November 2017 by Markus01 (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
← Back: Simple arithmetic operations Overview: Vector algebra Next: Cross product


There are exercises as selftest for this article.


You can use MATLAB for the content of this article.

Vectoralgebra dotproduct.jpg

The dot product of two vectors results in a scalar value and is defined as

\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = a \vec{\mathbf{e}}_{a} \cdot b\vec{\mathbf{e}}_{b} = a b \cos \alpha

where \alpha describes the angle between the two vectors which ranges from 0 to \pi (see figure). The dot product is denoted with a simple point between the vectors or without any sign.

Regarding the right side of the above equation, the following correlation can be noted: If you project the vector \vec{\mathbf{b}} on the vector \vec{\mathbf{a}}, you get the distance b\cos\alpha. As a consequence the result of the dot product can be seen as the area of a rectangle with the side legths a and b\cos\alpha. The projection can also be done contrariwise (projection of vector \vec{\mathbf{a}} on vector \vec{\mathbf{b}}). So that you get the distance a\cos\alpha. The multiplication of this term with b leads to a rectangle with equivalent area but different aspect ratio (see figure).

Another possibility to compute the dot product is to multiply the corresponding components and sum them up:

\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = a b\cos\alpha = a_x b_x + a_y b_y + a_z b_z

In general the dot product of n-dimensional vectors is computed as follows:

\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = a b \cos\alpha = \sum_{i=1}^{n} a_i b_i

which is nothing else than the matrix product of the transpose of the first vector with the second vector denoted in matrix algebra:

\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = \vec{\mathbf{a}}^T \vec{\mathbf{b}} =
a_1 & \dots & a_n
b_1 \\ 
\vdots \\ 
\end{array}\right] =
\sum_{i=1}^{n} a_i b_i

On the basis of the described relations it appears, that the commutative law holds:

\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = \vec{\mathbf{b}} \cdot \vec{\mathbf{a}}

Furthermore the following special cases can be considered, that often lead to simplifications in technical context:

\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} &= ab&
\vec{\mathbf{a}} & \upuparrows \vec{\mathbf{b}}& &(\text{because} \cos(0) = 1)\\
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} &= 0&
\vec{\mathbf{a}} &\perp \vec{\mathbf{b}}& &(\text{because} \cos(\frac{\pi}{2}) = 0)\\
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} &= -ab&
\vec{\mathbf{a}} &\downarrow\uparrow \vec{\mathbf{b}}& &(\text{because} \cos(\pi) = -1)

Multimedial educational material

Multimedia.png Applet: Dot product of two vectors (free CDF-Player required)


  • Kurt Meyberg und Peter Vachenauer, Höhere Mathematik 1: Differential- und Integralrechnung. Vektor- und Matrizenrechnung, 6. Edition (Springer Berlin Heidelberg, 2001)
  • Manfred Albach, Grundlagen der Elektrotechnik 1: Erfahrungssätze, Bauelemente, Gleichstromschaltungen, 3. Edition (Pearson Studium, 2011)