\mnb150ÿ{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fmodern\fprq1 Courier New;}{\f4\fswiss\fprq2 Arial;}} {\colortbl\red0\green0\blue0;\red0\green128\blue0;\red255\green0\blue0;\red0\green0\blue255;\red192\green192\blue192;} \deflang1031\pard\ri4\plain\f3\fs20\cf0 ________________________________________________________________________________ \par \par Inhalt....: Das Skalarprodukt (Vademekum) \par Kategorie.: Arbeitsblatt \par Mathematik: Analysis \par MuPAD.....: 3.1.1 \par Datum.....: 2005-04-04 \par Autoren...: Raymond Ami \par Funktionen: matrix, linalg::scalarProduct, assuming, Type::Real \par ________________________________________________________________________________ \par \plain\lang2055\f4\fs22\cf0 \par \plain\lang2055\f4\fs36\cf0\b Das Skalarprodukt (Vademekum) \par \plain\lang2055\f4\fs22\cf0 \par \plain\lang2055\f4\fs24\cf0 Die folgenden Aspekte des Skalarproduktes von Vektoren werden untersucht: \par - Feststellen ob zwei Vektoren rechtwinklig zueinander liegen / orthogonal sind. \par - Berechnen der L\'e4nge eines Vektors \par - Abbilden/Projezieren eines Vektors auf einen andern Vektor \par - Bestimmen Winkel zwischen zwei Vektoren \par \plain\lang2055\f4\fs22\cf0 \par \plain\lang2055\f4\fs28\cf0\b Link \par \plain\lang2055\f4\fs24\cf0 http://www.mathe-online.at/mathint/vect2/i.html\plain\lang2055\f4\fs24\cf0\b \par \plain\lang2055\f4\fs28\cf0\b \par Das Bilden des Skalarprodukts \par \plain\lang2055\f4\fs22\cf0 \par \plain\lang2055\f4\fs24\cf0 Das Skalarprodukt wird dadurch gebildet, dass man alle Vektorelemente mit gleichem Index mit- \par einander multipliziert und die Summe dieser Produkte bildet.\plain\lang2055\f4\fs24\cf1\b \plain\lang2055\f4\fs24\cf1 In MuPAD lautet die entsprechende \par Funktion \plain\lang2055\f3\fs24\cf2 linalg::scalarProduct(Vektor1, Vektor2)\plain\lang2055\f4\fs24\cf0 :\plain\lang2055\f4\fs24\cf1\b \par \plain\lang2055\f4\fs24\cf0 \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Va:= matrix([ax,ay,az]) \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Vb:= matrix([bx,by,bz]) \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs24\cf0 Wir m\'f6chten unsere folgenden Betrachtungen im Raum der reellen Zahlen machen und f\'fchren \par die Berechnungen daher "unter der Annahme" (\plain\lang2055\f3\fs24\cf2 assuming\plain\lang2055\f4\fs24\cf0 ) durch, dass alle Bezeichner reell- \par wertig (\plain\lang2055\f3\fs24\cf2 Type::Real\plain\lang2055\f4\fs24\cf0 ) sind: \par \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::scalarProduct(Va,Vb) assuming Type::Real \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs22\cf0 Und nun mit numerischen Werten und einer Kotrollrechnung: \par \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V1:= matrix([10,11,12]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V2:= matrix([20,21,22]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::scalarProduct(V1,V2) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Kontrolle = V1[1]*V2[1] + V1[2]*V2[2] + V1[3]*V2[3] // = 10*20 + 11*21 + 12*22 \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs28\cf0\b \par Grafische Interpretation des Skalarprodukts \par \par \plain\lang2055\f4\fs24\cf0 Die folgenden beiden Grafiken zeigen je zwei Vektoren (blau und rot). Die schrafierte Fl\'e4che \par repr\'e4sentiert den Schatten-Wurf des roten Vektors auf den blauen Vektor und zwar von einer \par Lichtquelle, die senkrecht auf den blauen Vektor leuchtet. \par \par [Die untenstehende Berechnungen sollen an dieser Stelle nicht interessieren.] \par \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs18\cf4 {\pntext\f1\'b7\tab}AnimationScalarProduct:= (p) -> \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs18\cf4 ( \par RVa := (x) --> matrix([cos(x),sin(x)])*sqrt(8): \par OVa := matrix([0,0]): \par RVb := matrix([5,p]): // blauer Vektor \par OVb := matrix([0,0]): \par Ani := PI/4..9/4*PI: \par ScPr := (x) --> linalg::scalarProduct(RVa(x),RVb): \par ScPr_b := (x) --> ScPr(x) / linalg::scalarProduct(RVb,RVb): \par ScPr_bL:= (x) --> ScPr(x) / norm(RVb,2): \par ScPrWi := (x) --> (180/PI)*arccos(ScPr(x)/(norm(RVa(x),2)*norm(RVb,2))): \par \par plot::Scene2d( \par plot::Arrow2d ( OVa,RVa(a), a=Ani,Color=RGB::Red, LineWidth=1) \par , plot::Curve2d ( matrix(OVa)+RVa(a)*L, L=-0.2..1.5, a=Ani, Color=RGB::Red) \par \par , plot::Arrow2d ( OVb,RVb(p), Color=RGB::Blue, LineWidth=1) \par , plot::Curve2d ( matrix(OVb)+RVb*L, L=-1.2..1.2, Color=RGB::Blue) \par \par , plot::Polygon2d ( [ OVb, OVb+RVb*ScPr_b(a), OVa+RVa(a) ], a=Ani \par , Filled, FillPattern=XCrossedLines, FillColor=RGB::Black20, LinesVisible=FALSE) \par \par , plot::Arrow2d ( OVa+matrix([0,-0.2]), OVb+RVb*ScPr_b(a)+matrix([0,-0.2]), a=Ani \par , Color=RGB::ForestGreen, LineWidth=1) \par \par , plot::Text2d ( a -> "ScalProd -> ".stringlib::formatf(float(ScPr(a)),2,6)."\\n" \par . "L\'e4ngeGr\'fcn = ------- =".stringlib::formatf(float(ScPr_bL(a)),2,6)."\\n" \par . "L\'e4ngeBlau-> ".stringlib::formatf(float(norm(RVb,2)),2,6)."\\n" \par . "Winkel = ".stringlib::formatf(float(ScPrWi(a)),2,6) \par , [-7.0, 4.8], a=Ani \par , TextFont=["Courier New",9,Left,Bold], HorizontalAlignment=Left) \par \par , Scaling = Constrained \par , ViewingBox = [-7..5, -5..5] \par , Header = "Animation f\'fcr Vektor(5,".expr2text(p).")" \par , HeaderFont = [10] \par , Frames=25 \par ) \par ): \par \par \pard\ri4\plain\lang2055\f4\fs22\cf0 In der ersten Grafik sind die Koordinaten des roten Pfeils in der (animierten) Grundstellung x=2 und y=2. \par Die Koordinaten des blauen Pfeiles sind x=5 und y=0. \par Das Skalarprodukt ist gleich: (2*5 + 2*0) = 10: \par \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}plot( AnimationScalarProduct(0), Width = 120, Height = 100): \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs22\cf0 In der zweiten Grafik sind die Koordinaten des roten Pfeils in der (animierten) Grundstellung x=2 und y=2. \par Die Koordinaten des blauen Pfeiles sind x=5 und y=-5. \par Das Skalarprodukt ist gleich: (2*5 + 2*-5) = 0: \par \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}plot( AnimationScalarProduct(-5), Width = 120, Height = 100): \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs22\cf0 Der Schatten unterteil den blauen Vektor in zwei Teile. Das Skalarprodukt sagt etwas \'fcber dieses \par Verh\'e4ltnis wie folgt aus: \par \par \plain\lang2055\f4\fs20\cf1\b Skalarprodukt \par ---------------------------------------------- = L\'e4nge (Betrag) des durch den Schatten bestimmten (g\'fcnen) Vektors \par L\'e4nge (Betrag) blauer Vektor \par \plain\lang2055\f4\fs22\cf0\b \par \plain\lang2055\f4\fs22\cf0 In beiden Grafiken kann dies in der Grundstellung optisch \'fcberpr\'fcft werden. Mit dem obigen Prinzip kann \par auch der Winkel zwischen den beiden Vektoren berechnet werden (siehe unten). \par \par Die beiden obige Grafiken sind animiert. \'d6ffnen Sie die Grafiken mit einem Doppelklick und bringen Sie \par den roten Vektor in die Stellung "senkrecht" zum blauen Vektor (nach "unten" und nach "oben"). Welche \par L\'e4nge hat jeweils der gr\'fcne Schaten, welchen Wert hat das Skalarprodukt? \par Antwort: beide sind 0 \par \par \plain\lang2055\f4\fs22\cf0\b Immer wieder wichtig: \par \plain\lang2055\f4\fs22\cf1\b\i Ist das Scalarprodukt zweier Vektoren = 0, so liegen sie rechtwinklig zueinander. Man sagt, \par sie sind orthogonal.\plain\lang2055\f4\fs22\cf1\b \par \plain\lang2055\f4\fs22\cf1 \par \plain\lang2055\f4\fs22\cf1\b Umgekehrt gilt: \par \par \plain\lang2055\f4\fs22\cf1\b\i Liegen zwei Vektoren rechtwinklig zueinander (orthogonal), so ist deren Skalarprodukt = 0.\plain\lang2055\f4\fs22\cf1\b \par \plain\lang2055\f4\fs22\cf0 \par \par \plain\lang2055\f4\fs28\cf0\b Anwendungen zum Skalarprodukt \par \plain\lang2055\f4\fs22\cf0 \par \plain\lang2055\f4\fs22\cf0\b Ganz allgemein: \par \plain\lang2055\f4\fs22\cf0 in linearen Gleichungssystemen, in denen das Lot eine Rolle spielt.\plain\lang2055\f4\fs22\cf0\b \par \par Die Elemente eines Vektors ins Quadrat setzen und summieren (aa) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V1:= matrix([2,2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::scalarProduct(V1,V1) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Va:= matrix([a1,a2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::scalarProduct(Va,Va) assuming Type::Real \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs22\cf0\b Die L\'e4nge (Betrag) eines Vectors ermitteln ( \'a6a\'a6 ) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V1:= matrix([2,2]) \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}sqrt(linalg::scalarProduct(V1,V1)) = float(sqrt(linalg::scalarProduct(V1,V1))) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Va:= matrix([a1,a2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}sqrt(linalg::scalarProduct(Va,Va)) assuming Type::Real \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs18\cf0\b oder k\'fcrzer\plain\lang2055\f4\fs22\cf0 : \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}norm(V1,2) = float(norm(V1,2)) assuming Type::Real; \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 norm(Va,2) assuming Type::Real \par \par \pard\ri4\plain\lang2055\f4\fs22\cf0\b Feststellen ob zwei Vektoren orthogonal sind \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V1:= matrix([2,2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V2:= matrix([2,-2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}testeq(linalg::scalarProduct(V1,V2) = 0) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Va:= matrix([a1,a1]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Vb:= matrix([[1,0],[0,-1]])*Va; \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::scalarProduct(Va,Vb); \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 testeq(% = 0) \par \pard\ri4\plain\lang2055\f4\fs22\cf0\b Abbilden eines Vektors auf einen andern (Projektion) \par \plain\lang2055\f4\fs22\cf0 \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V1:= matrix([2,2]); \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V2:= matrix([4,0]); \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::scalarProduct(V1,V2) / linalg::scalarProduct(V2,V2) * V2; \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 float(%) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Va:= matrix([a1,a2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Vb:= matrix([b1,b2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::scalarProduct(Va,Vb) / linalg::scalarProduct(Vb,Vb) * Vb assuming Type::Real \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 \par \pard\ri4\plain\lang2055\f4\fs22\cf0\b Berechnen Winkel (in Grad) \par \plain\lang2055\f4\fs22\cf0 zu ber\'fccksichtigen ist, dass die Berechnungen f\'fcr beide Halbkreise zum selben Ergebnis f\'fchren \par \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V1:= matrix([2,2]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}V2:= matrix([100,0]) \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Bogenmass = arccos(linalg::scalarProduct(V1,V2)/(norm(V1,2)*norm(V2,2))); \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 WinkelGrad = (180/PI)*%[2] \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Va:= matrix([a1,a2]); \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Vb:= matrix([b1,b2]); \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Bogenmass = arccos(linalg::scalarProduct(Va,Vb)/(norm(Va,2)*norm(Vb,2))) assuming Type::Real; \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 WinkelGrad = (180/PI)*%[2] \par \par \pard\ri4\plain\lang2055\f4\fs18\cf0\b oder k\'fcrzer \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}linalg::angle(V1,V2): \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 Bogenmass = Simplify(%); \par WinkelGrad = (180/PI)*%[2] \par \pard\li300\ri5\fi-300{\*\pn\pnlvlblt\pnf1\pnindent300{\pntxtb\'b7}}\plain\lang2055\f3\fs22\cf2 {\pntext\f1\'b7\tab}Bogenmass = linalg::angle(Va,Vb) assuming Type::Real; \par \pard\li600\ri1\fi-300\plain\lang2055\f3\fs22\cf2 WinkelGrad = (180/PI)*%[2] \par \par \pard\ri4\plain\f3\fs20\cf0\b ________________________________________________________________________________ \par \plain\f4\fs22\cf3\b \par \plain\f4\fs22\cf1\b Anmerkungen:\plain\f4\fs22\cf1 \par \plain\f4\fs20\cf1\b 1\plain\f4\fs20\cf1 . Weitere Anregungen zum Einsatz von MuPAD in der Lehre finden Sie auf unserem WebPortal \par \plain\f4\fs20\cf1\i MuPAD in Schule und Studium\plain\f4\fs20\cf1 unter: \plain\f4\fs20\cf3 http://schule.mupad.de\plain\f4\fs20\cf1 bzw. \plain\f4\fs20\cf3 http://studium.mupad.de\plain\f4\fs20\cf1 . \par \plain\f3\fs20\cf0\b ________________________________________________________________________________ \par \plain\lang2055\f4\fs22\cf0 \par }