{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 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 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Outpu t" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 18 "MAPLE ASIIGNMENT 5" }} {PARA 0 "" 0 "" {TEXT -1 65 "The first command loads the matrix algebr a operations into Maple." }}{PARA 0 "" 0 "" {TEXT -1 70 "Change the : \+ to ; if you wish to see all the commands in this package." }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "Next define a few matrices. You can change the numbers to any numbers" }}{PARA 0 "" 0 "" {TEXT -1 9 "you like." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "M1:=matrix(3,3,[1,0,-1,1,5,7,3,3,9]);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "M2:=matrix(3,3,[1,0,-1,3,6,2 1,3,3,9]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "The next commands c reate some other matrices from M1 and M2." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "M3:=submatrix(M2,2..3,1..2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "M4:=submatrix(M1,2..3,1..3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "M5:=stack(M2,M4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "M6:=concat(M3,M4);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 " The next command illustrates multiplication by a scalar. Evalm is" }}{PARA 0 "" 0 "" {TEXT -1 32 "needed for the answer to ap pear " }}{PARA 0 "" 0 "" {TEXT -1 56 "on the screen. Refer back to M6 \+ to see what has happened" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalm(3 *M6);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 69 "The aritmetic operations for matrices are + , - , &* , ^ \+ . For easier" }}{PARA 0 "" 0 "" {TEXT -1 27 "reference the next comman d " }}{PARA 0 "" 0 "" {TEXT -1 68 "brings M1 and M2 back on to the scr een side by side in a 3X6 matrix." }}{PARA 0 "" 0 "" {TEXT -1 17 "Exec ute the next " }}{PARA 0 "" 0 "" {TEXT -1 63 "command and after you ar e sure you understand what has happened" }}{PARA 0 "" 0 "" {TEXT -1 27 "execute the command agaiin " }}{PARA 0 "" 0 "" {TEXT -1 42 "with + changed first to - and then to &* ." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "concat(M1,M2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "eva lm(M1+M2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "If you wish to chec k your understanding of matrix multiplication the" }}{PARA 0 "" 0 "" {TEXT -1 33 "following command calculates the " }}{PARA 0 "" 0 "" {TEXT -1 69 "[2,2] entry of the product matrix. Change the numbers in \+ this command" }}{PARA 0 "" 0 "" {TEXT -1 24 "to calculate some other \+ " }}{PARA 0 "" 0 "" {TEXT -1 68 "entries in the product matrix. If one of the numbers is negative put" }}{PARA 0 "" 0 "" {TEXT -1 15 "it in \+ brackets." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "(1*0)+(5*6)+(7*3);" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "The next comand does a power of a matrix. You can check the answers" }}{PARA 0 "" 0 "" {TEXT -1 24 "out in the same way the " }}{PARA 0 "" 0 "" {TEXT -1 20 "product was chec ked." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalm(M1^2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "The following illustrate some of the prop erties of matrix algebra. A" }}{PARA 0 "" 0 "" {TEXT -1 30 "matrix is \+ transposed when its " }}{PARA 0 "" 0 "" {TEXT -1 69 "rows and columns \+ are switched.. The properties are the associative ," }}{PARA 0 "" 0 " " {TEXT -1 29 "commutative and distributive " }}{PARA 0 "" 0 "" {TEXT -1 11 "properties." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "M7:=transpose (M4)&*M4;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "evalm(M4);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "evalm(M7);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalm((M1+M2)+M7);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalm(M1+(M2+M7));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "evalm((M1&*M2)&*M7);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "evalm(M1&*(M2&*M7));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "evalm((M1+M2)-(M2+M1));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "The commutative law does not however work with multiplication." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "evalm((M1& *M2)-(M2&*M1));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "The final prop erty illustrated here is one of the distributive laws." }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 19 "evalm((M1+M2)&*M7);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "evalm((M1&*M7)+(M2&*M7));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "Diagonal matrices are created with the diag command. \+ This can be used" }}{PARA 0 "" 0 "" {TEXT -1 29 "to create an identity matrix." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "diag(-3,2,Pi); " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "iden:=diag(1,1,1);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "Inverse matrices are either A^(-1) or inverse(A). The following" }}{PARA 0 "" 0 "" {TEXT -1 37 "calcul ate the inverse, check that it " }}{PARA 0 "" 0 "" {TEXT -1 69 "works \+ and illustrate the properties of inverses. You should also try" }} {PARA 0 "" 0 "" {TEXT -1 32 "to calculate the inverse of M2 ." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "M8:=M1^(-1);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 9 "evalm(\");" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "evalm(M1&*M8-iden);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "evalm(M8&*M1-iden);" }}{PARA 11 "" 1 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "evalm(M8^(-1));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "M9:=evalm(M1+M7);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "The next commands illustrate the c orrect and the incorrect way to get" }}{PARA 0 "" 0 "" {TEXT -1 43 "th e inverse of the product of twp matrices." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "evalm((M1&*M9)^(-1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "evalm((M9^(-1))&*(M1^(-1)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "evalm((M1^(-1))*(M9^(-1)));" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 27 "evalm((M1^(-1))+(M9^(-1)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "evalm((M1+M9)^(-1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "The last two commands have illustrated a dumb artihmetical mist ake you" }}{PARA 0 "" 0 "" {TEXT -1 34 "should not make even with numb ers." }}}}{MARK "0 0 0" 16 }{VIEWOPTS 1 1 0 1 1 1803 }