As usual start Maple and load all the linear algebra programs using "with(LinearAlgebra); " Check the solution from today by plotting as follows: > b:=k->3*(-4)^k+73*3^k - 29*2^k; > with(plots); > l:=[seq(k,k=0..7)]; pointplot(l,[seq(b(k),k=l)]); Increase the range of l from 7, one by one, up to 13 to see how the value of b(k) changes. We can write simple programs in Maple too, such as this one liner that creates a matrix with determinant +1 or -1: > randdet1:=proc(n) local P; P:=RandomMatrix(n,n,generator=rand(-5..6)); while abs(Determinant(P))<>1 do P:=RandomMatrix(n,n,generator=rand(-5..6)); od: RETURN(P); end proc; (note that this is one long line of code, remember to copy it all) Let us use this to create a matrix with integer entries with chosen eigenvalues a, b and c; choose two of them to be different positive integers and one to be negative. > Q:=randdet1(3); > Determinant(Q); > De:=DiagonalMatrix(); > M:=Multiply(Multiply(Q,De),MatrixInverse(Q)); Verify using > Eigenvectors(M); that M has the properties that you want. Maple can create the kth power of a matrix automatically: > Mk:=MatrixPower(M,k); > Dk:=MatrixPower(De,k); Note that the second matrix is simple and diagonal unlike the first. Check that when you use k=2 you get the same as multiplying each matrix > Multiply(M,M); > subs(k=2,Mk); > Multiply(De,De); > subs(k=2,Dk); Multiply Q and a diagonal matrix of the powers of the eigenvalues, and the inverse of Q to get Bk, the kth power of B as follows: > Bk:=Multiply(Multiply(Q,Dk),MatrixInverse(Q)); This should be something like Mk, but might be a bit different in some ways. You can see they are the same using > simplify(Mk-Bk); Check that Bk gives the expected matrices for small values of k such as k=-1, 0 and 1. Define J to be the two by two matrix underlying the twin recurrences: a(n+1)= 7*a(n) + 12*b(n) and b(n+1)= 8*a(n) + 3*b(n) If a(0)=5 and b(0)=7, determine a(1), a(2) and a(3) and b(1), b(2) and b(3) by using (for k=1, 2, and 3) > abk:=Multiply(MatrixPower(J,k),<5,7>); and then altering this line as appropriate > subs(k=0,abk); What ratio is a(n)/b(n) approaching? Pick another random pair of positive values for a(0) and b(0) in abk and verify that the solutions approach the same ratio. Now pick b(0) = - a(0) for some value and see what the solutions are for a(n) and b(n) Notice the appearance of these different ratios are in the eigenvectors of J: > Eigenvectors(J); Create a matrix A which has one eigenvalue of absolute value less than 1 and one equal to 1 and find the initial values p and q such that the values get smaller and smaller and to which values all other p and q head towards: > Multiply(MatrixPower(J,k),); The matrix underlying the recurrence c(n+1)= 2*c(n) + 115*c(n-1) + 364*c(n-2) is > C:=<<2,1,0>|<115,0,1>|<364,0,0>>; Diagonalise C utilising > (v,P):=Eigenvectors(C); and notice that its eigenvectors have the special "powers of eigenvalues" formula they are supposed to have. Form Ck as the kth power of C by diagonalisation and now suppose that the first three values in the sequence are c(0)=10, c(1)=7 and c(2)=-17. Multiply Ck by the initial values vector, remembering to use the correct order. Calculate c(3) and c(4) using the recurrence then use the power matrix to get c(k) and check with your values with k=3 and 4. Note that Maple can find the solution in one step: > rsolve({c(n+1)= 2*c(n) + 115*c(n-1) + 364*c(n-2),c(0)=10, c(1)=7, c(2)=-17},c(k)); Find initial values for the sequence which would give a solution with one or two different eigenvalue powers in the final solution for c(k). Determine a link between these initial values and the eigenvectors of C. Let E be the following upper triangular (all zeros below the diagonal) matrix: > E:=<<4,0,0>|<0,-1,0>|<0,3,-1>>; Show that its eigenvalues are just the entries on the diagonal, and see how many eigenvectors it has. Experiment to find which entry of E can be changed to increase the number of eigenvectors. Now create a random invertible 4x4 matrix Q and verify that this matrix B has the same eigenvalues and multiplicities, but more complicated eigenvectors than E: > B:=Multiply(Multiply(Q,E),MatrixInverse(Q)); Now use the above idea to create a 4x4 matrix G with two eigenvalues of multiplicity 2 and only two eigenvectors and ensure that G has no zeros in its entries. If you finish early, try to create a 4x4 integer entry matrix with no real eigenvalues.