As usual Maple from Start Menu/Program Files/ or using the icon in f:\math115 and load all the linear algebra progams. Create a matrix B and its eigenvalues and eigenvectors: > B:=Matrix([[6, -2, 1], [7, -3, 1], [-4, 2, 1]]); > (v,P):=Eigenvectors(B); Make vk a vector of the kth powers of the eigenvalues (in the same order as v) and make Dk a diagonal matrix of them, then multiply P and Dk and the inverse of P to get Bk, the kth power of B. Check that > subs(k=1,Bk); and > subs(k=0,Bk); give the expected answers, and that > subs(k=-1,Bk); does too. Check your answer for Bk with > MatrixPower(B,k); Multiply B by itself to get its square and cube and check that they match the matrices formed by the appropriate substitution of k. Find the eigenvectors and eigenvalues of the square and cube of B and note that they are linked to those of B. Create a matrix which has the eigenvalues from w: > randomise():w:=RandomVector(3,generator=rand(1..9)); > Dw:=DiagonalMatrix(w); Choose a random invertible matrix for P and use diagonalisition to make J. Check that the eigenvalues and eigenvectors of J are as you hoped. Check these compound matrices have the expected values and vectors: > Eigenvectors(k*J); > Eigenvectors(MatrixInverse(J)); > Eigenvectors(Transpose(J)); As usual Maple from Start Menu/Program Files/ or using the icon in f:\math115 and load all the linear algebra progams. The matrix underlying the recurrence c(n+1)= 3*c(n) + 28*c(n-1) is > C:=<<3,1>|<28,0>>; Diagonalise C utilising > (v,P):=Eigenvectors(B); and notice that its eigenvectors have the special "powers of eigenvalues" formula they are supposed to have. Form the nth power of B and now suppose that the first two values in the sequence are b(0)=1 and b(1)=2. Calculate b(2), b(3) and b(4) using the recurrence then use the power matrix to get b(n+1) and b(n) and check with your values with n=3. Find initial values for the sequence which would give a solution with fewer than the maximum 2 eigenvalue powers in the final solution. Create the 3 by 3 matrix A corresponding to the recurrence a(n+1)=-5*a(n)+2*a(n-1)+24*a(n-2) when a(0)=5,a(1)=-30,a(2)=120 Find the eigenvalues by solving when this matrix is singular: > A1:=A-lambda*IdentityMatrix(3); Try a few row/col operations on A1 and see how difficult it is to get nice factors which will cancel, and then just do a laplace expansion of A1 and see how the coefficients from the recurrence re-occur in the determinant. Check your answer with > f:=sort(Determinant(A1)); Factor f using the Maple "factor" command and then create the predicted eigenvectors and verify that they all satisfy Av = lambda v . Thus diagonalise A and get the nth power of A as before and multiply by the inital values to get the final answer. Check that a(4) is the same by both methods of finding it. You can plot points using this command: > plot([[-1,6],[2,3],[3,7]],style=point, symbolsize=30,colour=blue); The 3x3 matrix underlying this system of equations is > E2:=<<1,4,9>|<-1,2,3>|<1,1,1>|<6,3,7>>; Find the solutions to this system of equations to get the coefficients of a quadratic polynomial which you can then plot using: > plot(a*x^2+b*x+c,x=-2..4); Note that the curve passes through all three points. Repeat with polynomials of degree 3 and see what happens; the system of equations in this cases is: > E3:=<<-1,8,27>|<1,4,9>|<-1,2,3>|<1,1,1>|<6,3,7>>; You can plot the family of polynomials of degree 3 like this: > with(plots); > p3j:=((2*d-5)*x^3 + (35-8*d)*x^2+(2*d-32)*x + 12*d)/12; > animate( plot, [p3j,x=-2..4], d=-10..10, trace=5, frames=50 ); To animate the plot you click on the image and then press the "play" button that is now in the toolbar at the top. Note how every cubic curve passes through all 3 specified points. Show that no solution exists for a straight line through the points: > E1:=<<-1,2,3>|<1,1,1>|<6,3,7>>; But When you take > F:=<<-1,2,3>|<1,1,1>>; And > F1:=Multiply(Transpose(F),F); > Fs:=Multiply(Transpose(F),<6,3,7>); there is a solution to F1 times v = Fs, which is the best fit line.