(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 13363, 438] NotebookOptionsPosition[ 7981, 287] NotebookOutlinePosition[ 11650, 390] CellTagsIndexPosition[ 10916, 370] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell["Matrix Eigenvalues and Eigenvectors", "Title"], Cell[CellGroupData[{ Cell["Calculating Eigenvalues and Eigenvectors", "Subtitle"], Cell[CellGroupData[{ Cell["\<\ Initialization Steps: Define a 2\[Times]2 matrix and compute its eigensystem\ \>", "Text", CellDingbat->"\[FilledDownTriangle]"], Cell[BoxData[{ RowBox[{ RowBox[{"mtemp", "=", RowBox[{"DiagonalMatrix", "[", RowBox[{"{", RowBox[{ RowBox[{"2", " ", "Pi"}], ",", "4"}], "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"mtemp", "//", "MatrixForm"}]}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"msim", "=", RowBox[{ RowBox[{"Transpose", "[", RowBox[{ RowBox[{"RotationTransform", "[", FractionBox["\[Pi]", "4"], "]"}], "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}], "]"}], "]"}], ".", "mtemp", ".", RowBox[{ RowBox[{"RotationTransform", "[", FractionBox["\[Pi]", "4"], "]"}], "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}], "]"}]}]}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Input"] }, Closed]], Cell[BoxData[{ RowBox[{ RowBox[{"mymatrix", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"2", "+", "Pi"}], ",", RowBox[{ RowBox[{"-", "2"}], "+", "Pi"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", "2"}], "+", "Pi"}], ",", RowBox[{"2", "+", "Pi"}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"mymatrix", "//", "MatrixForm"}]}], "Input"], Cell["Solve the characteristic equation for the two eigenvalues:", "Text", CellTags->"mtag:09:characteristic_equation"], Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"Det", "[", RowBox[{"mymatrix", " ", "-", " ", RowBox[{"\[Lambda]", " ", RowBox[{"IdentityMatrix", "[", "2", "]"}]}]}], "]"}], "\[Equal]", " ", "0"}], ",", "\[Lambda]"}], "]"}]], "Input", CellTags->{"mtag:09:IdentifyMatrix[]", "mtag:09:Det[]", "mtag:09:Solve[]"}], Cell["Compute the eigenvectors:", "Text", CellTags->{ "mtag:09:Eigenvectors[]", "mtag:09:eigenvectors__example_of_computation"}], Cell[BoxData[ RowBox[{"Eigenvectors", "[", "mymatrix", "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{"evec1", ",", " ", "evec2"}], "}"}], " ", "=", " ", RowBox[{"Eigenvectors", "[", "mymatrix", "]"}]}]], "Input", CellTags->"mtag:09:eigenvector_column_matrix__example"], Cell[TextData[{ StyleBox["Eigensystem", FontWeight->"Bold"], " will solve for eigenvalues and corresponding eigenvectors in one step:" }], "Text"], Cell[BoxData[ RowBox[{"Eigensystem", "[", "mymatrix", "]"}]], "Input", CellTags->"mtag:09:Eigensystem[]"], Cell["\<\ Note the output format above: the first item in the list is a list of the two \ eigenvalues; the second item in the list is a list of the two corresponding \ eigenvectors. Thus, the eigenvector corresponding 2 \[Pi] is (1,1).\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Coordinate Transformations; The Eigenbasis", "Subtitle"], Cell[BoxData[{ RowBox[{ RowBox[{"simtrans", "=", " ", RowBox[{ RowBox[{"{", RowBox[{"evec2", ",", "evec1"}], "}"}], "//", "Transpose"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"simtrans", "//", "MatrixForm"}]}], "Input", CellTags->{ "mtag:09:Transpose[]", "mtag:09:Inverse[]", "mtag:09:Simplify[]", "mtag:09:MatrixForm[]"}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Inverse", "[", "simtrans", "]"}], ".", "mymatrix", ".", "simtrans"}], "//", "Simplify"}], "//", "MatrixForm"}]], "Input", CellTags->"mtag:09:simularity_transformation__example"], Cell[CellGroupData[{ Cell["\<\ Shows that the transformation to the diagonal basis is a rotation of \[Pi]/4 \ \ \>", "Text", CellDingbat->"\[FilledDownTriangle]"], Cell["\<\ Which makes sense considering in initialization steps that mymatrix was \ created with a rotation on \[Pi]/4 of a diagonal matrix\ \>", "Text", CellDingbat->"\[FilledDownTriangle]"] }, Open ]], Cell["\<\ The next command produces an orthonormal basis of the eigenspace (i.e., the \ eigenvectors are of unit magnitude):\ \>", "Text"], Cell[BoxData[ RowBox[{ TagBox[ RowBox[{"Orthogonalize", "[", RowBox[{ RowBox[{"Eigenvectors", "[", "mymatrix", "]"}], ",", RowBox[{"Method", "\[Rule]", "\"\\""}]}], "]"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.398611256626045*^9, 3.398611260002604*^9}}, CellTags->"mtag:09:GramSchmidt[]"], Cell["\<\ The command RotationTransform computes a matrix that will rotate vectors ccw \ about the origin in two dimensions, by a specified angle:\ \>", "Text", CellChangeTimes->{{3.3986109079120007`*^9, 3.398610914494816*^9}}], Cell[BoxData[ RowBox[{ TagBox[ RowBox[{ RowBox[{"RotationTransform", "[", FractionBox["\[Pi]", "4"], "]"}], "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}], "]"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.398611265850281*^9, 3.3986112682316236`*^9}}, CellTags->"mtag:09:RotationMatrix2D[]"], Cell["\<\ This last result shows that the transformation to the eigenvector space \ involves rotation by \[Pi]/4--and that the matrix corresponding to the \ eigenvectors produces this same transformation\ \>", "Text", CellChangeTimes->{{3.398611127704159*^9, 3.398611154254594*^9}}], Cell[TextData[{ StyleBox["Here is a demonstration of the general result", FontWeight->"Plain"], " ", StyleBox["A", FontSlant->"Italic"], " ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox[ FormBox[ OverscriptBox["x", "\[RightVector]"], TraditionalForm], "i"], FontWeight->"Plain"], TraditionalForm]]], StyleBox[" = ", FontWeight->"Plain"], Cell[BoxData[ FormBox[ SubscriptBox["\[Lambda]", "i"], TraditionalForm]]], StyleBox[" ", FontWeight->"Plain"], Cell[BoxData[ FormBox[ SubscriptBox[ FormBox[ OverscriptBox["x", "\[RightVector]"], TraditionalForm], "i"], TraditionalForm]], FontWeight->"Plain"], ", ", StyleBox["where ", FontWeight->"Plain"], Cell[BoxData[ FormBox[ OverscriptBox["x", "\[RightVector]"], TraditionalForm]], FontWeight->"Plain"], StyleBox[" is an eigenvector and \[Lambda]", FontWeight->"Plain"], " ", StyleBox["its corresponding eigenvalue: ", FontWeight->"Plain"] }], "Text"], Cell[BoxData[{"evec1", "\[IndentingNewLine]", "evec2"}], "Input"], Cell[BoxData[ RowBox[{"mymatrix", ".", "evec1"}]], "Input"], Cell[BoxData[ RowBox[{"mymatrix", ".", "evec2"}]], "Input"], Cell[TextData[{ "MatrixPower ", StyleBox["multiplies a matrix by itself n times\[Ellipsis]", FontWeight->"Plain"] }], "Text", CellTags->"mtag:09:MatrixPower[]"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"MatrixPower", "[", RowBox[{"mymatrix", ",", "12"}], "]"}], ".", "evec2"}], "//", "Simplify"}]], "Input"] }, Closed]] }, ScreenStyleEnvironment->"Presentation", CellGrouping->Manual, WindowSize->{1061, 760}, WindowMargins->{{84, Automatic}, {Automatic, 74}}, WindowTitle->"Lecture 09 MIT 3.016 (Fall 2007) \[Copyright] W. Craig Carter \ 2003-2007", PrintingCopies->1, PrintingPageRange->{1, Automatic}, CellLabelAutoDelete->True, FrontEndVersion->"6.0 for Mac OS X x86 (32-bit) (June 19, 2007)", StyleDefinitions->"3016-Carter.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "mtag:09:characteristic_equation"->{ Cell[2380, 90, 120, 1, 34, "Text", CellTags->"mtag:09:characteristic_equation"]}, "mtag:09:IdentifyMatrix[]"->{ Cell[2503, 93, 363, 9, 54, "Input", CellTags->{ "mtag:09:IdentifyMatrix[]", "mtag:09:Det[]", "mtag:09:Solve[]"}]}, "mtag:09:Det[]"->{ Cell[2503, 93, 363, 9, 54, "Input", CellTags->{ "mtag:09:IdentifyMatrix[]", "mtag:09:Det[]", "mtag:09:Solve[]"}]}, "mtag:09:Solve[]"->{ Cell[2503, 93, 363, 9, 54, "Input", CellTags->{ "mtag:09:IdentifyMatrix[]", "mtag:09:Det[]", "mtag:09:Solve[]"}]}, "mtag:09:Eigenvectors[]"->{ Cell[2869, 104, 131, 2, 34, "Text", CellTags->{ "mtag:09:Eigenvectors[]", "mtag:09:eigenvectors__example_of_computation"}]}, "mtag:09:eigenvectors__example_of_computation"->{ Cell[2869, 104, 131, 2, 34, "Text", CellTags->{ "mtag:09:Eigenvectors[]", "mtag:09:eigenvectors__example_of_computation"}]}, "mtag:09:eigenvector_column_matrix__example"->{ Cell[3078, 111, 222, 5, 54, "Input", CellTags->"mtag:09:eigenvector_column_matrix__example"]}, "mtag:09:Eigensystem[]"->{ Cell[3456, 124, 107, 2, 54, "Input", CellTags->"mtag:09:Eigensystem[]"]}, "mtag:09:Transpose[]"->{ Cell[3920, 139, 353, 10, 85, "Input", CellTags->{ "mtag:09:Transpose[]", "mtag:09:Inverse[]", "mtag:09:Simplify[]", "mtag:09:MatrixForm[]"}]}, "mtag:09:Inverse[]"->{ Cell[3920, 139, 353, 10, 85, "Input", CellTags->{ "mtag:09:Transpose[]", "mtag:09:Inverse[]", "mtag:09:Simplify[]", "mtag:09:MatrixForm[]"}]}, "mtag:09:Simplify[]"->{ Cell[3920, 139, 353, 10, 85, "Input", CellTags->{ "mtag:09:Transpose[]", "mtag:09:Inverse[]", "mtag:09:Simplify[]", "mtag:09:MatrixForm[]"}]}, "mtag:09:MatrixForm[]"->{ Cell[3920, 139, 353, 10, 85, "Input", CellTags->{ "mtag:09:Transpose[]", "mtag:09:Inverse[]", "mtag:09:Simplify[]", "mtag:09:MatrixForm[]"}]}, "mtag:09:simularity_transformation__example"->{ Cell[4276, 151, 243, 6, 54, "Input", CellTags->"mtag:09:simularity_transformation__example"]}, "mtag:09:GramSchmidt[]"->{ Cell[5037, 179, 396, 10, 85, "Input", CellTags->"mtag:09:GramSchmidt[]"]}, "mtag:09:RotationMatrix2D[]"->{ Cell[5667, 197, 497, 15, 81, "Input", CellTags->"mtag:09:RotationMatrix2D[]"]}, "mtag:09:MatrixPower[]"->{ Cell[7638, 272, 165, 5, 34, "Text", CellTags->"mtag:09:MatrixPower[]"]} } *) (*CellTagsIndex CellTagsIndex->{ {"mtag:09:characteristic_equation", 8530, 304}, {"mtag:09:IdentifyMatrix[]", 8648, 307}, {"mtag:09:Det[]", 8792, 311}, {"mtag:09:Solve[]", 8938, 315}, {"mtag:09:Eigenvectors[]", 9091, 319}, {"mtag:09:eigenvectors__example_of_computation", 9282, 324}, {"mtag:09:eigenvector_column_matrix__example", 9471, 329}, {"mtag:09:Eigensystem[]", 9599, 332}, {"mtag:09:Transpose[]", 9704, 335}, {"mtag:09:Inverse[]", 9886, 340}, {"mtag:09:Simplify[]", 10069, 345}, {"mtag:09:MatrixForm[]", 10254, 350}, {"mtag:09:simularity_transformation__example", 10461, 355}, {"mtag:09:GramSchmidt[]", 10589, 358}, {"mtag:09:RotationMatrix2D[]", 10702, 361}, {"mtag:09:MatrixPower[]", 10815, 364} } *) (*NotebookFileOutline Notebook[{ Cell[568, 21, 52, 0, 150, "Title"], Cell[CellGroupData[{ Cell[645, 25, 60, 0, 70, "Subtitle"], Cell[CellGroupData[{ Cell[730, 29, 139, 3, 34, "Text"], Cell[872, 34, 261, 8, 85, "Input"], Cell[1136, 44, 751, 25, 141, "Input"] }, Closed]], Cell[1902, 72, 475, 16, 85, "Input"], Cell[2380, 90, 120, 1, 34, "Text", CellTags->"mtag:09:characteristic_equation"], Cell[2503, 93, 363, 9, 54, "Input", CellTags->{"mtag:09:IdentifyMatrix[]", "mtag:09:Det[]", "mtag:09:Solve[]"}], Cell[2869, 104, 131, 2, 34, "Text", CellTags->{ "mtag:09:Eigenvectors[]", "mtag:09:eigenvectors__example_of_computation"}], Cell[3003, 108, 72, 1, 54, "Input"], Cell[3078, 111, 222, 5, 54, "Input", CellTags->"mtag:09:eigenvector_column_matrix__example"], Cell[3303, 118, 150, 4, 34, "Text"], Cell[3456, 124, 107, 2, 54, "Input", CellTags->"mtag:09:Eigensystem[]"], Cell[3566, 128, 252, 4, 57, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[3855, 137, 62, 0, 56, "Subtitle"], Cell[3920, 139, 353, 10, 85, "Input", CellTags->{ "mtag:09:Transpose[]", "mtag:09:Inverse[]", "mtag:09:Simplify[]", "mtag:09:MatrixForm[]"}], Cell[4276, 151, 243, 6, 54, "Input", CellTags->"mtag:09:simularity_transformation__example"], Cell[CellGroupData[{ Cell[4544, 161, 142, 4, 34, "Text"], Cell[4689, 167, 192, 4, 57, "Text"] }, Open ]], Cell[4896, 174, 138, 3, 34, "Text"], Cell[5037, 179, 396, 10, 85, "Input", CellTags->"mtag:09:GramSchmidt[]"], Cell[5436, 191, 228, 4, 57, "Text"], Cell[5667, 197, 497, 15, 81, "Input", CellTags->"mtag:09:RotationMatrix2D[]"], Cell[6167, 214, 283, 5, 57, "Text"], Cell[6453, 221, 988, 41, 60, "Text"], Cell[7444, 264, 65, 0, 85, "Input"], Cell[7512, 266, 60, 1, 54, "Input"], Cell[7575, 269, 60, 1, 54, "Input"], Cell[7638, 272, 165, 5, 34, "Text", CellTags->"mtag:09:MatrixPower[]"], Cell[7806, 279, 159, 5, 54, "Input"] }, Closed]] } ] *) (* End of internal cache information *)