{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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 } {PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 3" 4 5 1 {CSTYLE "" -1 -1 "" 1 12 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 258 "" 0 "" {TEXT -1 0 "" }{TEXT 261 24 "Linear A lgebra Powertool" }}{PARA 256 "" 0 "" {TEXT 256 28 "Eigenvectors and E igenvalues" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 10 "Online 6.1" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 26 "Worksheet by Russell Bl yth" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "Goals of this worksheet:" }}{PARA 0 "" 0 "" {TEXT -1 67 "1) Com pute eigenvalues and eigenvectors for several 3 x 3 matrices." }} {PARA 0 "" 0 "" {TEXT -1 69 "2) Use eigenvectors and eigenvalues to si mplify a matrix computation." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "restart:with(plots):with(lin alg):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 257 0 "" }} {PARA 0 "" 0 "" {TEXT 258 38 "Computing Eigenvalues and Eigenvectors" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "First define a matrix and the i dentity of the same size." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "A := matrix(3,3,[[-1,0,5],[0,4,0],[5,0,-1]]);\nI3 := evalm(array(i dentity,1..3,1..3));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "Compute t he characteristic polynomial, which is det(A - x*I3)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "chpol := det(A - x*I3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "Set equal to zero and solve." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "AEvals := solve(chpol = 0,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "Compute the first eigenspace." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "AEspace1 := linsolve(A-AEvals[1]*I3 ,[0,0,0]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "Extract the basis v ector(s)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "AEbasis1 := [su bs(_t[1]=1, op(AEspace1))];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "Re peat for the second eigenvalue" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "AEspace2 := linsolve(A-AEvals[2]*I3,[0,0,0]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "We have two parameters this time." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 "AEbasis2 := [subs(_t[1]=1,_t [2]=0, op(AEspace2)),\nsubs(_t[1]=0,_t[2]=1, op(AEspace2))];" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "Check that these eigenspace basis \+ vectors are in fact eigenvectors of A" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "evalm(A &* AEbasis1[1]);\nevalm(A &* AEbasis2[1]);\ne valm(A &* AEbasis2[2]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "Note t hat these vectors are the correct multiples of the eigenvectors." }}} {EXCHG {PARA 5 "" 0 "" {TEXT -1 10 "Exercises:" }}{PARA 0 "" 0 "" {TEXT -1 84 "1) Follow the recipe above to find the eigenvalues and ei genvectors of the matrix B." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "B := matrix(3,3,[[0,1,1],[0,2,0],[-2,1,3]]);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "2) Repeat \+ for the matrix C." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "C := m atrix(3,3,[[4,-3,1],[4,-1,0],[1,7,-4]]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "When you are done: what can you say about the matrix C?" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 74 "Maple has a command for \+ carrying out all of the above operations at once." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 16 "eigenvectors(A);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 323 "We get a set of triples, where the first entry of each t riple is an eigenvalue, the second entry is its multiplicity as a root of the characteristic polynomial, and the third entry is a basis for \+ the eigenspace corresponding to that eigenvector. We can extract this \+ data if we first place these two triples into a sequence." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "evA := [eigenvectors(A)];" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 16 "The eigenvalues:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "evA[1][1]; evA[2][1];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 17 "The eigenvectors:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "evA[1][3][1]; evA[2][3][1]; evA[1][3][2];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 182 "If you ge an error here, it's because Ma ple decided to list the eigenvalues in a different order than it did w hen I wrote the worksheet - fix the problem by editing the command lin e." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 259 0 "" } {TEXT 260 54 "Using eigenvalues and eigenvectors to ease computation" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 21 "We'll easily compute " }{XPPEDIT 18 0 "A^25" "6#*$%\"AG\"#D" }{TEXT -1 15 " * X where X = " }{XPPEDIT 18 0 "[2,3,-1]^t" "6#)7%\"\"#\"\"$,$ \"\"\"!\"\"%\"tG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "First note th at the three eigenvectors which we computed earlier form a basis for \+ " }{XPPEDIT 18 0 "R^3" "6#*$%\"RG\"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "AEMat := augment(AEbasis1[1],AEbasis2[1],AEbasis2[2]) ;\nrank(AEMat);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "Now find the c oefficients of X with respect to the basis above." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 52 "X := vector(3,[2,3,-1]);\nXcvec := linsolve( AEMat,X);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "Now " }{XPPEDIT 18 0 "A^25" "6#*$%\"AG\"#D" }{TEXT -1 28 " * X is computed as follows:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 114 "evalm(Xcvec[1]*AEvals[1]^25 *AEbasis1[1] \n+ Xcvec[2]*AEvals[2]^25*AEbasis2[1]\n+ Xcvec[3]*AEvals[ 2]^25*AEbasis2[2]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 94 "Note that \+ this calculation involved no matrix multiplications. What advantage mi ght this have?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 53 "Maple will actually compute directly, so let's check." }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "evalm(A^25 &* X);" }}} {EXCHG {PARA 5 "" 0 "" {TEXT -1 9 "Exercise:" }}{PARA 0 "" 0 "" {TEXT -1 12 "3) Compute " }{XPPEDIT 18 0 "B^13" "6#*$%\"BG\"#8" }{TEXT -1 185 " * X (X as above) using eigenvalues and eigenvectors. Check by di rect computation. (Note we cannot use this technique for powers of C, \+ since we can't find a basis of eigenvectors of C.)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }