{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Warning" -1 7 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Error" -1 8 1 {CSTYLE "" -1 -1 "Courie r" 1 10 255 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Outpu t" -1 12 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 } 1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "with(LinearAlgebra); " }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7[r%$AddG%(AdjointG%3BackwardSubst ituteG%+BandMatrixG%&BasisG%-BezoutMatrixG%/BidiagonalFormG%-BilinearF ormG%5CharacteristicMatrixG%9CharacteristicPolynomialG%'ColumnG%0Colum nDimensionG%0ColumnOperationG%,ColumnSpaceG%0CompanionMatrixG%0Conditi onNumberG%/ConstantMatrixG%/ConstantVectorG%2CreatePermutationG%-Cross ProductG%-DeleteColumnG%*DeleteRowG%,DeterminantG%/DiagonalMatrixG%*Di mensionG%+DimensionsG%+DotProductG%6EigenConditionNumbersG%,Eigenvalue sG%-EigenvectorsG%&EqualG%2ForwardSubstituteG%.FrobeniusFormG%4Gaussia nEliminationG%2GenerateEquationsG%/GenerateMatrixG%2GetResultDataTypeG %/GetResultShapeG%5GivensRotationMatrixG%,GramSchmidtG%-HankelMatrixG% ,HermiteFormG%3HermitianTransposeG%/HessenbergFormG%.HilbertMatrixG%2H ouseholderMatrixG%/IdentityMatrixG%2IntersectionBasisG%+IsDefiniteG%-I sOrthogonalG%*IsSimilarG%*IsUnitaryG%2JordanBlockMatrixG%+JordanFormG% (LA_MainG%0LUDecompositionG%-LeastSquaresG%,LinearSolveG%$MapG%%Map2G% *MatrixAddG%.MatrixInverseG%5MatrixMatrixMultiplyG%+MatrixNormG%5Matri xScalarMultiplyG%5MatrixVectorMultiplyG%2MinimalPolynomialG%&MinorG%(M odularG%)MultiplyG%,NoUserValueG%%NormG%*NormalizeG%*NullSpaceG%3Outer ProductMatrixG%*PermanentG%&PivotG%*PopovFormG%0QRDecompositionG%-Rand omMatrixG%-RandomVectorG%%RankG%6ReducedRowEchelonFormG%$RowG%-RowDime nsionG%-RowOperationG%)RowSpaceG%-ScalarMatrixG%/ScalarMultiplyG%-Scal arVectorG%*SchurFormG%/SingularValuesG%*SmithFormG%*SubMatrixG%*SubVec torG%)SumBasisG%0SylvesterMatrixG%/ToeplitzMatrixG%&TraceG%*TransposeG %0TridiagonalFormG%+UnitVectorG%2VandermondeMatrixG%*VectorAddG%,Vecto rAngleG%5VectorMatrixMultiplyG%+VectorNormG%5VectorScalarMultiplyG%+Ze roMatrixG%+ZeroVectorG%$ZipG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "A := Matrix([[2,4,3],[-4,-6,-3],[3,3,1]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG-%'RTABLEG6%\")#>!*G\"-%'MATRIXG6#7%7%\"\"#\"\"% \"\"$7%!\"%!\"'!\"$7%F0F0\"\"\"%'MatrixG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "CharacteristicPolynomial(A, x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*$)%\"xG\"\"$\"\"\"F(*&F'F()F&\"\"#F(F(\"\"%!\"\"" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "p:=CharacteristicPolynomial (A, x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG,(*$)%\"xG\"\"$\"\"\" F**&F)F*)F(\"\"#F*F*\"\"%!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "solve(p(x)=0,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6%f*6#%\"xG6 \"F&F&\"\"\"F&F&F&f*F$F&F&F&!\"#F&F&F&f*F$F&F&F&F)F&F&F&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 112 "The eigevalues are 1 and -2. Next load t he \"linalg\" package. This is different from the \"LinearAlgebra\" pa ckage." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }} {PARA 7 "" 1 "" {TEXT -1 104 "Warning, the previous binding of the nam e GramSchmidt has been removed and it now has an assigned value\n" }} {PARA 7 "" 1 "" {TEXT -1 80 "Warning, the protected names norm and tra ce have been redefined and unprotected\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 144 "Next define the 3 by 3 identity matrix Id (in Maple, \"I \" is reserved for the imaginary number i). Also define the three dime nsional zero vector." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "Id: =Matrix(3,3,shape=identity);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#IdG -%'RTABLEG6%\")g++9-%'MATRIXG6#7%7%\"\"\"\"\"!F/7%F/F.F/7%F/F/F.%'Matr ixG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "zero := Vector[colum n]([0,0,0]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%zeroG-%'RTABLEG6%\" )#>7^\"-%'MATRIXG6#7%7#\"\"!F-F-&%'VectorG6#%'columnG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 157 "It seems that 1 and -2 are the eigenvalu es, since 1 is a root and -2 is a double root of the characteristic po lynomial. What are the associated eigenvectors?" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 54 "First find the eigen vector for the eigenvalue 1. Solve" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 257 "" 0 "" {TEXT -1 7 "Av = 1v" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 24 "by using linalg to solve" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 12 "(A-1I)v = 0." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 63 "The zero \+ on the right of the above equationis the zero vector!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "linsolve(A-Id, zero);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#-%'vectorG6#7%&%#_tG6#\"\"\",$F'!\"\"F'" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 235 "Next get the eigenvector for the \+ eigenvalue -2. It turns out there is only one eigenvector even though \+ -2 is a double root of the characteristic polynomial. What would you d o if there were multiple eigenvectors for the same eigenvalue?" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "linsolve(A+2.Id, zero);" }} {PARA 8 "" 1 "" {TEXT -1 31 "Error, missing operator or `;`\n" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "Does the above attempt work? If no t, try again a different way:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "linsolve(A+ScalarMultiply(Id,2), zero);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'vectorG6#7%,$&%#_tG6#\"\"\"!\"\"F(\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "What is a faster way to find the eigenvaluesand their associate d eigenvectors?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "Eigenvec tors(A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$-%'RTABLEG6%\")#>aS\"-%'MA TRIXG6#7%7#\"\"\"7#!\"#F-&%'VectorG6#%'columnG-F$6%\")gJ=9-F(6#7%7%!\" \"F:\"\"!7%F,F,F;7%F:F;F;%'MatrixG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 168 "The entries of the outputted vector are the eigenvalues. The c olumns of the outputted matrix are the eigenvectors (caution- the zero vector can not be an eigenvector!)." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 112 "Sometimes an eigenvalue is a complex number with nonzero imagi nary part (similarly for entries of eigenvectors)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "B := Matrix([[0,-1],[1,0]]);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%\"BG-%'RTABLEG6%\")wP=9-%'MATRIXG6#7$7$\"\"!! \"\"7$\"\"\"F.%'MatrixG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 " Eigenvectors(B);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$-%'RTABLEG6%\")7V0 9-%'MATRIXG6#7$7#^#\"\"\"7#^#!\"\"&%'VectorG6#%'columnG-F$6%\")/.>9-F( 6#7$7$F-F-7$F/F,%'MatrixG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "Next we enter the eigenvectors and name them e1 and e2." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "e1 := Vector[column]([1,-I]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#e1G-%'RTABLEG6%\")G63;-%'MATRIXG6#7$7#\" \"\"7#^#!\"\"&%'VectorG6#%'columnG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "e2 := Vector[column]([1,I]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#e2G-%'RTABLEG6%\")o63;-%'MATRIXG6#7$7#\"\"\"7#^#F.&% 'VectorG6#%'columnG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "Next we ve rify that B*e1=I*e1 (since I is the eigenvalue corresponding to e1)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "B.e1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%\".G6$%\"BG-%'RTABLEG6%\")G63;-%'MATRIXG6#7$7#\"\"\"7 #^#!\"\"&%'VectorG6#%'columnG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "I.e1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'RTABLEG6%\")#*4;;-%'M ATRIXG6#7$7#^#\"\"\"7#F-&%'VectorG6#%'columnG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "Verify that B*e2=-I*e2 (since -I is the eigenvalue cor responding to e2)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "18 0 0" 53 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }{RTABLE_HANDLES 12890192 14000060 15112192 14054192 14183160 14183776 14054312 14190304 16081128 16081168 16160992 }{RTABLE M7R0 I5RTABLE_SAVE/12890192X,%)anythingG6"6"[gl!"%!!!#*"$"$""#!"%""$""%!"'F)F)!"$""" F& } {RTABLE M7R0 I5RTABLE_SAVE/14000060X,%)anythingG6#%)identityG6"[gl!""!!!#!"$"$F' } {RTABLE M7R0 I5RTABLE_SAVE/15112192X*%)anythingG6"6"[gl!#%!!!"$"$""!F'F'F& } {RTABLE M7R0 I5RTABLE_SAVE/14054192X*%*algebraicG6"6"[gl!#%!!!"$"$"""!"#F(6" } {RTABLE M7R0 I5RTABLE_SAVE/14183160X,%*algebraicG6"6"[gl!"%!!!#*"$"$!"""""F'F'F(""!F)F)F)6" } {RTABLE M7R0 I5RTABLE_SAVE/14183776X,%)anythingG6"6"[gl!"%!!!#%"#"#""!"""!""F'6" } {RTABLE M7R0 I5RTABLE_SAVE/14054312X*%*algebraicG6"6"[gl!#%!!!"#"#^#"""^#!""6" } {RTABLE M7R0 I5RTABLE_SAVE/14190304X,%*algebraicG6"6"[gl!"%!!!#%"#"#"""^#!""F'^#F'6" } {RTABLE M7R0 I5RTABLE_SAVE/16081128X*%)anythingG6"6"[gl!#%!!!"#"#"""^#!""F& } {RTABLE M7R0 I5RTABLE_SAVE/16081168X*%)anythingG6"6"[gl!#%!!!"#"#"""^#F'F& } {RTABLE M7R0 I5RTABLE_SAVE/16160992X*%)anythingG6"6"[gl!#%!!!"#"#^#"""F(F& }