{VERSION 5 0 "SUN SPARC SOLARIS" "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 "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 271 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 272 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 1 0 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 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "MATH 2270-2" }}{PARA 0 "" 0 "" {TEXT -1 41 "PROJECT 5. Eigenvalues and eigenvectors. " }}{PARA 0 "" 0 "" {TEXT -1 17 "November 27, 2002" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 " A Maple text version of this proj ect may be found at the web site" }}{PARA 0 "" 0 "" {TEXT -1 52 "http: //www.math.utah.edu/~kapovich/teaching11.html/ " }}{PARA 0 "" 0 "" {TEXT -1 59 "Go to that page and click on the \"3-rd maple assignment \". " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 59 " In this project we will find eigenvalues and eigenvectors" }}{PARA 0 "" 0 "" {TEXT -1 34 "algebraically and illustrate them " }}{PARA 0 " " 0 "" {TEXT -1 70 "geometrically. Recall that (real) eigenvalues of a square matrix A are" }}{PARA 0 "" 0 "" {TEXT -1 34 "real roots of the characteristic " }}{PARA 0 "" 0 "" {TEXT -1 61 "polynomial det(A- la mbda; I), where I is the unit matrix. The" }}{PARA 0 "" 0 "" {TEXT -1 52 "eigenvectors corresponding to eigenvalue lambda; " }}{PARA 0 " " 0 "" {TEXT -1 68 "are nonzero vectors x such that Ax= lambda x. F or each eigenvalue" }}{PARA 0 "" 0 "" {TEXT -1 70 "we will find a basi s of the corresponding eigenvectors. Here is how to" }}{PARA 0 "" 0 " " {TEXT -1 29 "find eigenvalues using Maple:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "with(linalg):with(plots): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "A:= matrix([[2,-1], [-1,2]]);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 65 "p:=charpoly(A,t);#find characteristic polyno mial as function of t" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "r: = solve(p); # find roots of characteristic polynomial" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Thus the matrix A has two distinct eige nvalues, 1 and 3. The" }}{PARA 0 "" 0 "" {TEXT -1 32 "individual roots are obtained as" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "r[1]; r[2];" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "To find basis of eigenvectors cor responding to r[1] do:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "N:= nulls pace(evalm(A -r[1]* diag(1,1)));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "We see that the basis in N consists of single vector [1,1]. If the re" }}{PARA 0 "" 0 "" {TEXT -1 70 "are several vectors in the basis yo u can produce them via the command:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "v1:= N[1];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "Here we got only one vector, but if there are severa l of them use" }}{PARA 0 "" 0 "" {TEXT -1 14 "N[2], N[3],..." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "M:= nullspace(evalm(A -r[2]* diag(1,1))); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "v2:=M[1];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "Thus we got two eigenvectors for the matr ix A. They form a basis in" }}{PARA 0 "" 0 "" {TEXT -1 68 "R^2. Note \+ that the matrix A is symmetric, thus the eigenvectors v1," }}{PARA 0 " " 0 "" {TEXT -1 69 "v2 are mutually orthogonal. To find orthonormal ba sis of eigenvectors" }}{PARA 0 "" 0 "" {TEXT -1 66 "we divide each vec tor v1, v2 by its magnitude (do this only in the" }}{PARA 0 "" 0 "" {TEXT -1 15 "1-st problem). " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 260 10 "Problem 1." }{TEXT -1 1 " " }{TEXT 259 11 "Ass ignment:" }{TEXT -1 53 " Find two eigenvalues and an orthonormal basis of two" }}{PARA 0 "" 0 "" {TEXT -1 36 "eigenvectors w1 , w2 of the m atrix:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "A:=matrix([[3,-1],[-1,2]] );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 261 10 "Problem 2." }{TEXT -1 2 " \+ " }{TEXT 271 9 "Ellipses." }{TEXT -1 58 " It is the general fact that invertible 2-by-2 matrix maps" }}{PARA 0 "" 0 "" {TEXT -1 65 "circles to ellipses. Below we illistrate this using the following" }}{PARA 0 "" 0 "" {TEXT -1 7 "matrix:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "A:=m atrix([[1,-1],[-1,2]]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "But fi rst we have to learn how to draw circles. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "ngon:=n-> [[ cos(2*Pi *'i'/n), sin(2*Pi *'i'/n)]$ 'i' =1..n];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "This command makes reg ular n-gon centered at the origin whose vertices" }}{PARA 0 "" 0 "" {TEXT -1 70 "are on the unit circle. If n is large, then the polygon ` `looks like''" }}{PARA 0 "" 0 "" {TEXT -1 70 "the unit circle. In the \+ picture below we get the polygon which has 60" }}{PARA 0 "" 0 "" {TEXT -1 10 "vertices. " }}{PARA 0 "" 0 "" {TEXT -1 67 "(If your Maple runs out of memory you can use 15-gon instead of the" }}{PARA 0 "" 0 "" {TEXT -1 9 "60-gon.) " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "disk:= \+ ngon(60): #make sure to use colon!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "polygonplot(disk);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "f:= v-> evalm(A&* v);" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "Now let's draw the picture of the image of this circle under the" }}{PARA 0 "" 0 "" {TEXT -1 17 "transf ormation f:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "F1:= map(f, disk):P1 := polygonplot(F1,color=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "display(P1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 262 14 "Assignment a):" }{TEXT -1 54 " Display on the \+ same plot (similarly to the 2-nd Maple" }}{PARA 0 "" 0 "" {TEXT -1 87 "assignment) the \"disk\" and the images of \"disk\" under the mappin g f and its iterations" }}{PARA 0 "" 0 "" {TEXT -1 13 "f^2 and f^3. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 67 "From th is picture you will see that iterations of f keep stretching" }}{PARA 0 "" 0 "" {TEXT -1 70 "the ellipse in a certain direction. Let's see w hat happens after 10-th" }}{PARA 0 "" 0 "" {TEXT -1 69 "iteration. The following sequence of commands describes the images of" }}{PARA 0 "" 0 "" {TEXT -1 47 "the \"disk\" under the iterations from 1 to 10. " } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "iter:= proc(f,s,n)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "local d,i;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "d:= array(0..n);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "d[0]:=s;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "for i from 1 to \+ n do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "d[i]:= map(f, d[i-1]);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "od;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "convert(d,list);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "film:=proc( d )" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 17 "local i, j, n, F;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "n:= nops(d);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "F: = array(1..n);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "for i from 1 to n do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "F[i] := polygonplot(d[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "od;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "convert(F, list);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "sequence:=iter(f, disk,10):" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 20 "FF:= film(sequence):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "display(FF,insequence=true);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "Click on this pic ture to put it in a \"box\". Then the \"player\" bar will" }}{PARA 0 " " 0 "" {TEXT -1 69 "appear instead of the \"Normal\" ,... commands on \+ the 3-rd row from the" }}{PARA 0 "" 0 "" {TEXT -1 69 "top of the maple screen. The arrows -> and <- indicate the direction" }}{PARA 0 "" 0 "" {TEXT -1 61 "in which you can play this movie (back or forward). Pu t it in" }}{PARA 0 "" 0 "" {TEXT -1 69 "\"forward\" and then click sev eral times on the button ->| to advance" }}{PARA 0 "" 0 "" {TEXT -1 66 "the film one frame at a time or forwards. You see that after 10-th " }}{PARA 0 "" 0 "" {TEXT -1 61 "iteration the ellipse becomes indisti nguishable from a line. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT 263 15 "Assignment b): " }{TEXT -1 1 " " }}{PARA 0 "" 0 " " {TEXT -1 67 "Find eigenvectors of the matrix A and compare their slo pes with the" }}{PARA 0 "" 0 "" {TEXT -1 75 "slope of the \"line\" whi ch you see on the picture. What is your conclusion? " }}{PARA 0 "" 0 " " {TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 203 "Remark. The slope of \+ a vector is the ratio of y and x coordinates, for instance, the vector [1,2] has slope 2. You can make MAPLE use decimals for computations b y replacing 1 with 1.0 (and so on) in the " }}{PARA 0 "" 0 "" {TEXT -1 54 "matrix A. This will make comparison of slopes easier. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 264 10 " Problem 3." }{TEXT -1 1 " " }{TEXT 265 11 "Assignment:" }{TEXT -1 59 " Find all eigenvalues and basis of the space of eigenvectors" }}{PARA 0 "" 0 "" {TEXT -1 15 "for the matrix:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "A:=matrix([[2,0, 2],[-1,2,1],[0,0,3]]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "Hint: Try using the command " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "eigenvectors(A);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "to solve this problem. Did you get a basis for the 3-dimensional s pace?" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 266 16 "Diagonalization." }{TEXT -1 52 " Recall that a matrix A \+ is said to be diagonalizable" }}{PARA 0 "" 0 "" {TEXT -1 68 "if there \+ is a matrix P and a diagonal matrix D so that A= SDS^\{-1\}." }} {PARA 0 "" 0 "" {TEXT -1 69 "To diagonalize the matrix A means find t he matrices D, S, S^\{-1\}. If" }}{PARA 0 "" 0 "" {TEXT -1 70 "n-by-n \+ matrix A is such that that R^n has a basis of eigenvectors of A" }} {PARA 0 "" 0 "" {TEXT -1 59 "then A is diagonalizable, the diagonal en tries of D are the" }}{PARA 0 "" 0 "" {TEXT -1 70 "eigenvalues and col umns of S are the corresponding eigenvectors. It is" }}{PARA 0 "" 0 " " {TEXT -1 68 "pretty simple if all eigenvalues of A are distinct. How ever it might" }}{PARA 0 "" 0 "" {TEXT -1 67 "happen that some roots o f the characteristic polynomal are multiple" }}{PARA 0 "" 0 "" {TEXT -1 66 "roots. For instance, the polynomial p(t)=(1-t)(3-t)(3-t), has \+ the" }}{PARA 0 "" 0 "" {TEXT -1 65 "root t=1 of multiplicity 1 and the root 3 of the multiplicity 2. " }}{PARA 0 "" 0 "" {TEXT -1 68 "The Ma ple command eigenvectors(A) will tell you what eigenvalues are" }} {PARA 0 "" 0 "" {TEXT -1 63 "and what are their multiplicities. If a r oot (say 3) has double" }}{PARA 0 "" 0 "" {TEXT -1 67 "multiplicty, an d it has two linearly independent eigenvectors, then" }}{PARA 0 "" 0 " " {TEXT -1 44 "you put the root t=3 on the diagonal twice ." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 1 " " }{TEXT 267 10 "Example 1:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "B:=matrix([[3,0, \+ 0],[0,3,1],[0,0,1]]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "eigenvectors(B);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "Thus the eigenvalue 3 has double m ultiplicty and the pair of" }}{PARA 0 "" 0 "" {TEXT -1 34 "eigenvector s corresonding to 3 is:" }}{PARA 0 "" 0 "" {TEXT -1 66 "(1,0,0), (0,1, 0). We will put them both as columns of the matrix P" }}{PARA 0 "" 0 " " {TEXT -1 37 "(the third eigenvector (0,1,-2) will " }}{PARA 0 "" 0 " " {TEXT -1 61 "be the last column). The diagonalization of B is given \+ by the" }}{PARA 0 "" 0 "" {TEXT -1 15 "following data:" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 62 "Diag:= matrix([[3,0, 0],[0,3,0],[0,0,1]]);#the diagonal matrix" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "S:= tra nspose([[1, 0, 0],[0, 1, 0],[0,1,-2]]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "inverseS:=inverse(S);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 269 10 "Problem 4." }{TEXT -1 1 " " }{TEXT 268 11 "Assignment:" }{TEXT -1 58 " Find eigenvalues, bases of the corresponding eigenvectors" }}{PARA 0 "" 0 "" {TEXT -1 66 "and dimensions of the spaces of eigenvectors corresponding to each" }} {PARA 0 "" 0 "" {TEXT -1 86 "eigenvalue for the matrix U below. Finall y, determine the matrices (if possible!) that" }}{PARA 0 "" 0 "" {TEXT -1 64 "diagonalize U. In the case when this is impossible explai n why: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "U:=matrix([[1,1,-1,2],[0 ,1,-1,1],[0,0,1,1],[0,0,0,1]]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 270 38 "Finctions of diagonalizable matrice s. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 76 "Su ppose that A is diagonalizable, A= SDS^\{-1\}. Recall that A^n= S D^n \+ S^\{-1\}" }}{PARA 0 "" 0 "" {TEXT -1 37 " as we saw in the class. Simi larly, " }}{PARA 0 "" 0 "" {TEXT -1 43 "A+ A^2 +2A^3= S (D + D^2 + 2 D^3) S^(-1);." }}{PARA 0 "" 0 "" {TEXT -1 43 "In general, if q(t) is \+ any polynomial, say " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "q(t)= c_0 + c_1 *t + c_2 *t^2 + c_3 *t^3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 12 "then define " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "q(A)= c_0 *I + c_1 * A + c_2 *A^2 + c_3 * A^3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 77 "where I is the unit matrix (of the same \+ shape as A). Then q(A)= S q(D)S^\{-1\}." }}{PARA 0 "" 0 "" {TEXT -1 158 " The polynomial q(D) is easy to compute. If D=diag(d_1, d_2, d_3, ...,d_n) then q(D) is the diagonal matrix q(D)=diag(q(d_1), q(d_2), \+ q(d_3),..., q(d_n) ) . " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 272 10 "Problem 5." }{TEXT -1 1 " " }{TEXT 258 11 "Assignment:" }{TEXT -1 55 " Take the polynomial q(t)= -1 + 2*t -3 *t^2 + 0.5*t^3. " }}{PARA 0 "" 0 "" {TEXT -1 69 "Using diagonalization compute the polynomial q(B) for the matrix from" }}{PARA 0 "" 0 "" {TEXT -1 5 "the " }{TEXT 273 9 "Example 1" }{TEXT -1 50 ". Verify (u sing Maple!) that q(B)=S q(D)S^\{-1\} by" }}{PARA 0 "" 0 "" {TEXT -1 35 "making direct computation of q(B). " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "Similarly to the computat ion of polynomials of matrices we can compute" }}{PARA 0 "" 0 "" {TEXT -1 45 "other functions of diagonalizatble matrices: " }}{PARA 0 "" 0 "" {TEXT -1 70 "if f(t) is a function and A= SDS^\{-1\} then f(A ):= S f(D) S^\{-1\} where" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 65 "f(D)=diag(f(d_1), f(d_2), f(d_3),..., f(d_n) ) . F or instance, we" }}{PARA 0 "" 0 "" {TEXT -1 70 "could compute the expo nential function exp(A), trigonometric functions" }}{PARA 0 "" 0 "" {TEXT -1 66 "like sin(A), cos(A), square root: sqrt\{A\}, which comput es matrix B" }}{PARA 0 "" 0 "" {TEXT -1 70 "such that B^2=A. Here we u se the positive branch of the square root. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 274 10 "Example 2." }{TEXT -1 24 " Con sider the matrix A " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "A:=matrix([ [2,0, 0],[0,2,1],[0,0,1]]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "Diag:= matrix([[2,0, 0],[0,2,0],[0,0,1]]);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 46 "S:= transpose([[0, 1, 0],[1, 0, 0],[0,-1,1]]); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "inverseS:=inverse(S);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "Let's compute sqrt(A), the squa re root of A:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "sqrtD:=matrix([[sq rt(2),0, 0],[0,sqrt(2),0],[0,0,1]]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "B:= evalm(S&* sqrtD &* inverseS);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "By computing B^2 let's check that B is indeed a \+ square root of A: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalf(evalm(B ^2));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "Which is, up to a small \+ numerical error, is close enough to the" }}{PARA 0 "" 0 "" {TEXT -1 10 "matrix A. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 256 10 "Problem 6." }{TEXT -1 1 " " }{TEXT 257 11 "Assignme nt:" }{TEXT -1 55 " Compute the exponential function exp(A) of the mat rix " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "A:=matrix([[3.0,4.0],[1.0,2 .0]]);" }}}}{MARK "17 2 0" 32 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }