Dr. Sarah's Linear Algebra Commands for Maple for Chapter 2 (See also PS 1 Hints)
> restart: with(LinearAlgebra):
> A:=Matrix([[1,2,2],[3,7,9],[-1,-4,-7]]);
Inverse of a Matrix
Maple can find the inverse of a matrix a lot quicker than we can by hand! We did 2.3 number 10 via the Gauss-Jordan method. Now let's do it on Maple:
> B:=A^(-1);
Check your notes to see that this is the same answer that we got in class via the Gauss-Jordan method of finding an inverse. Note that on p. 151, Lamp has 2 methods of constructing the inverse, but the Inverse(A); command requires with(Lamp): in addition to with(LinearAlgebra):
Product of Two Matrices
To find the product of two matrices, first we define the matrices, and then use Maple's command to multiply which is a period. Be sure to use Matrix and not matrix in your definition (see A above).
Let's check that A and B from above are really inverses of each other:
> A.B; B.A;
So they really are inverses. See p. 112 LAMP for another example of multiplication of two matrices defined from scratch.
LAMP Markov Chain of Planes at Three Hubs - Problem 4 p. 147
You may wish to review LAMP Chapter 3 Module 4.
PART A: We'll start by letting
and
Notice that MN = N2=
Use this information and your knowledge of matrix multiplication in order to solve for the entries of M (in decimal instead of percentage format). HINT: Note that a11 is NOT .02 because by matrix multiplication, the first entry in MN must equal the first entry in N2 and so
=
In order to make the units match correctly, we see that a11 must be the percentage of planes that start in Seattle and end up in Seattle.
Use a similar reasoning to determine M. Then define M:=Matrix([[... using the Maple Matrix command.
PART B: After you have defined M, then you can execute the command
> for k from 5 to 200 by 40 do M^k end do;
Use your understanding from LAMP module Chapter 3 Module 4 in order to answer part b.