Difference between revisions of "Dot product"

From Robotics
Jump to: navigation, search
 
(21 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{Navigation|before=[[Simple arithmetic operations]]|overview=[[Vector algebra]]|next=[[Cross product]]}}
 
{{Navigation|before=[[Simple arithmetic operations]]|overview=[[Vector algebra]]|next=[[Cross product]]}}
 +
<table style="width:100%"><td style="width:50%">{{Exercise|Selftest: Dot product}}</td><td style="width:50%">{{Matlab|MATLAB: Dot product}}</td></table>
  
[[File:vectoralgebra_dotproduct.jpg|right|400px]]
+
[[File:vectoralgebra_dotproduct.jpg|right|500px]]
  
Bei der Multiplikation zweier Vektoren handelt es sich entweder um das [[Vektorprodukt]] (auch Kreuzprodukt genannt) oder aber um das [[Skalarprodukt]]. Das Skalarprodukt liefert als Ergebnis ein Skalar, das Vektorprodukt hingegen liefert als Ergebnis wieder einen Vektor. Betrachtet man zwei Vektoren <math>\vec{\textbf{a}}</math> und <math>\vec{\textbf{b}}</math>, so ist das zugehörige Skalarprodukt wie folgt definiert:
+
The dot product of two vectors results in a scalar value and is defined as
 
:<math>
 
:<math>
\vec{\textbf{a}} \cdot \vec{\textbf{b}} = a \vec{\textbf{e}}_{a} \cdot b\vec{\textbf{e}}_{b} = a b \cos \alpha
+
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = a \vec{\mathbf{e}}_{a} \cdot b\vec{\mathbf{e}}_{b} = a b \cos \alpha
 
</math>
 
</math>
Dabei bezeichnet <math>\alpha</math> den Winkel, der von den beiden Vektoren eingeschlossen wird und Werte zwischen <math>0</math> und <math>\pi</math> annehmen kann (siehe Abbildung). Der Einfachheit halber lässt man den Punkt zur Kennzeichnung des Skalarprodukts häufig weg, da bei der Multiplikation zweier Vektoren nur das Skalarprodukt und das Vektorprodukt in Frage kommen und letzteres ohnehin durch ein Kreuz (also zum Beispiel <math>\vec{\textbf{a}} \times \vec{\textbf{b}}</math>) gekennzeichnet wird.
+
where <math>\alpha</math> describes the angle between the two vectors which ranges from <math>0</math> to <math>\pi</math> (see figure). The dot product is denoted with a simple point between the vectors or without any sign.
  
Betrachtet man nun die rechte Seite der oben angegebenen Beziehung zur Bestimmung des Skalarprodukts und die zugehörige Abbildung, so lässt sich der folgende Zusammenhang feststellen: Projiziert man den Vektor <math>\vec{\textbf{b}}</math> auf die Richtung des Vektors <math>\vec{\textbf{a}}</math>, so erhält man hierbei gerade die Strecke <math>b\cos\alpha</math>. Daraus folgt, dass das Ergebnis des Skalarprodukts als Flächeninhalt eines Rechtecks mit den Seitenlängen <math>a</math> und <math>b\cos\alpha</math> aufgefasst werden kann. Die Projektion kann auch in umgekehrter Reihenfolge (Projektion des Vektors <math>\vec{\textbf{a}}</math> auf die Richtung des Vektors <math>\vec{\textbf{b}}</math>) ausgeführt werden, so dass man die Strecke <math>a\cos\alpha</math> erhält. Die Multiplikation dieses Terms mit <math>b</math> führt zu einem Rechteck mit identischem Flächeninhalt aber einem anderen Seitenverhältnis (siehe Abbildung).
+
Regarding the right side of the above equation, the following correlation can be noted: If you project the vector <math>\vec{\mathbf{b}}</math> on the vector <math>\vec{\mathbf{a}}</math>, you get the distance <math>b\cos\alpha</math>. As a consequence the result of the dot product can be seen as the area of a rectangle with the side legths <math>a</math> and <math>b\cos\alpha</math>. The projection can also be done contrariwise (projection of vector <math>\vec{\mathbf{a}}</math> on vector <math>\vec{\mathbf{b}}</math>). So that you get the distance <math>a\cos\alpha</math>. The multiplication of this term with <math>b</math> leads to a rectangle with equivalent area but different aspect ratio (see figure).
  
Eine weitere Möglichkeit zur Bestimmung des Skalarprodukts ist dadurch gegeben, dass man zunächst die korrespondierenden Komponenten multipliziert und anschließend aufsummiert:
+
Another possibility to compute the dot product is to multiply the corresponding components and sum them up:
 
:<math>
 
:<math>
\vec{\textbf{a}} \cdot \vec{\textbf{b}} = a b\cos\alpha = a_x b_x + a_y b_y + a_z b_z
+
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = a b\cos\alpha = a_x b_x + a_y b_y + a_z b_z
 
</math>
 
</math>
Ganz allgemein - zum Beispiel wenn man es nicht mit Vektoren aus dem kartesischen Koordinatensystem zu tun hat - lässt sich das Skalarprodukt wie folgt bestimmen:
+
In general the dot product of n-dimensional vectors is computed as follows:
 
:<math>
 
:<math>
\vec{\textbf{a}} \cdot \vec{\textbf{b}} = a b \cos\alpha = \sum_{i=1}^{n} a_i b_i  
+
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = a b \cos\alpha = \sum_{i=1}^{n} a_i b_i  
 
</math>
 
</math>
Anhand der beschriebenen Zusammenhänge zeigt sich, dass das Skalarprodukt dem Kommutativgesetz genügt. Somit gilt:
+
which is nothing else than the [[Multiplication of matrices|matrix product]] of the transpose of the first vector with the second vector denoted in [[Matrices|matrix algebra]]:<br/><br/>
 
:<math>
 
:<math>
\vec{\textbf{a}} \cdot \vec{\textbf{b}} = \vec{\textbf{b}} \cdot \vec{\textbf{a}}
+
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = \vec{\mathbf{a}}^T \vec{\mathbf{b}} =
 +
\left[\begin{array}{ccc}
 +
a_1 & \dots & a_n
 +
\end{array}\right]
 +
\left[\begin{array}{c}
 +
b_1 \\  
 +
\vdots \\
 +
b_n
 +
\end{array}\right] =
 +
\sum_{i=1}^{n} a_i b_i
 
</math>
 
</math>
Weiterhin ergeben sich einige Sonderfälle, die im technischen Kontext häufig zu Vereinfachungen führen:
+
On the basis of the described relations it appears, that the commutative law holds:
 +
:<math>
 +
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} = \vec{\mathbf{b}} \cdot \vec{\mathbf{a}}
 +
</math>
 +
Furthermore the following special cases can be considered, that often lead to simplifications in technical context:
 
:<math>
 
:<math>
 
\begin{align}
 
\begin{align}
\vec{\textbf{a}} \cdot \vec{\textbf{b}} &= ab&
+
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} &= ab&
&\text{wenn}&
+
&\text{if}&
\vec{\textbf{a}} & \upuparrows \vec{\textbf{b}}& &(\text{da} \cos(0) = 1)\\
+
\vec{\mathbf{a}} & \upuparrows \vec{\mathbf{b}}& &(\text{because} \cos(0) = 1)\\
\vec{\textbf{a}} \cdot \vec{\textbf{b}} &= 0&
+
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} &= 0&
&\text{wenn}&
+
&\text{if}&
\vec{\textbf{a}} &\perp \vec{\textbf{b}}& &(\text{da} \cos(\frac{\pi}{2}) = 0)\\
+
\vec{\mathbf{a}} &\perp \vec{\mathbf{b}}& &(\text{because} \cos(\frac{\pi}{2}) = 0)\\
\vec{\textbf{a}} \cdot \vec{\textbf{b}} &= -ab&
+
\vec{\mathbf{a}} \cdot \vec{\mathbf{b}} &= -ab&
&\text{wenn}&
+
&\text{if}&
\vec{\textbf{a}} &\downarrow\uparrow \vec{\textbf{b}}& &(\text{da} \cos(\pi) = -1)
+
\vec{\mathbf{a}} &\downarrow\uparrow \vec{\mathbf{b}}& &(\text{because} \cos(\pi) = -1)
 
\end{align}
 
\end{align}
</math>
+
</math><br/><br/>
 
 
{{Example
 
|Title=Arbeit im elektrischen Feld
 
|Contents=
 
Ein häufiger Anwendungsfall des Skalarprodukts ergibt sich bei dem Begriff der Arbeit. Bewegt man beispielsweise eine Punktladung <math>Q</math> in einem homogenen elektrischen Feld <math>\vec{\textbf{E}}</math> entlang einer geraden Strecke <math>\vec{\textbf{s}}</math> von einem Punkt <math>A</math> zu einem Punkt <math>B</math>, so lässt sich die dabei aufgewendete Arbeit mit Hilfe des Skalarprodukts wie folgt bestimmen:
 
:<math>
 
W_{AB} = \vec{\textbf{F}} \cdot \vec{\textbf{s}}
 
</math>
 
Bei der Verschiebung der Ladung muss die Coulomb-Kraft <math>\vec{\textbf{F}} = Q\vec{\textbf{E}}</math> aufgebracht werden, das heißt in diesem Fall ergibt sich der folgende Zusammenhang:
 
:<math>
 
W_{AB} = Q\vec{\textbf{E}} \cdot \vec{\textbf{s}} = Q E \cos{\alpha}
 
</math>
 
Allgemein, also wenn die elektrische Feldstärke nicht homogen und der Weg der Verschiebung von <math>A</math> nach <math>B</math> keine gerade Strecke ist, gilt:
 
:<math>
 
W_{AB} = \int_{A}^{B} \vec{\textbf{F}} \cdot \mathrm{d}\vec{\textbf{s}} = Q \int_{A}^{B} \vec{\textbf{E}} \cdot \mathrm{d}\vec{\textbf{s}}
 
</math>
 
}}
 
 
 
  
 
{{Multimedia|Links=
 
{{Multimedia|Links=
http://www.mathresource.iitb.ac.in/linear%20algebra/example7.1/index.html '''Applet''': Skalarprodukt zweier Vektoren (engl.)
+
http://demonstrations.wolfram.com/DotProduct/ '''Applet''': Dot product of two vectors (free CDF-Player required)
 
 
http://www.cs.brown.edu/exploratories/freeSoftware/repository/edu/brown/cs/exploratories/applets/dotProduct/dot_product_java_browser.html '''Applet''': Skalarprodukt zweier Vektoren
 
 
 
http://www.mathresource.iitb.ac.in/linear%20algebra/example7.2/index.html '''Applet''': Skalarprodukt zweier Vektoren mit der eingeschlossenen Fläche
 
 
 
http://demonstrations.wolfram.com/DotProduct/ '''Applet''': Skalarprodukt zweier Vektoren (engl./ free CDF-Player erforderlich)
 
 
 
http://www.math.ethz.ch/~lemuren/public/exercise/linalg/LinearCombinationInR2ETHZ.html '''Applet''': Linearkombination im zweidimensionalem Raum
 
 
}}
 
}}
  
<noinclude>==Literatur==
+
<noinclude>==Literature==
 
* Kurt Meyberg und Peter Vachenauer, ''Höhere Mathematik 1: Differential- und Integralrechnung. Vektor- und Matrizenrechnung'', 6. Edition (Springer Berlin Heidelberg, 2001)
 
* 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)
 
* Manfred Albach, ''Grundlagen der Elektrotechnik 1: Erfahrungssätze, Bauelemente, Gleichstromschaltungen'', 3. Edition (Pearson Studium, 2011)
 
</noinclude>
 
</noinclude>
  
[[Category:Vector algebra]]
 
[[Category:Feedback]]
 
 
[[Category:Article]]
 
[[Category:Article]]
 +
[[Category:Vectors]]

Latest revision as of 17:18, 24 November 2017

← Back: Simple arithmetic operations Overview: Vector algebra Next: Cross product

Review.png

There are exercises as selftest for this article.

Matlab.png

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}} =
\left[\begin{array}{ccc}
a_1 & \dots & a_n
\end{array}\right] 
\left[\begin{array}{c}
b_1 \\ 
\vdots \\ 
b_n
\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:


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

Multimedial educational material

Multimedia.png

http://demonstrations.wolfram.com/DotProduct/ Applet: Dot product of two vectors (free CDF-Player required)

Literature

  • 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)