Dr. Sarah's Linear Algebra Commands for Maple for Chapter 2 (See also PS 1 Hints for the previous Maple commands)
Comments on some of the problems:
Problem 1: 2.1 30
expand the left side by using matrix multiplication. Then, using matrix equality, you will have a system of
4 equations with 4 unknowns that you can solve using an augmented
matrix and ReducedRowEchelonForm. See for example Practice Solutions in 2.1 and 2.2 on ASULearn.
Problem 2: 2.2
34 parts a, b & c
if the statement is true, quote the statement and page number from the book that tells you so. If it is false, find one specific instance and example - it does not suffice to argue that the book says something slightly different which does not match up with the statement (as both statements could be true).
For the problem, try to find 2x2 matrices for counterexamples.
Often 2x2 matrices with some combination of 0s, 1s and -1s will suffice.
See for example 2.2 17 and 18 from the practice problems in the book.
Problem 3: Show that the following statements about matrices are false by
producing counterexamples and showing work:
Statement a) A2=0 implies that A = 0
Statement b) A2=I implies that A=I or A=-I
Statement c) A2 has entries that are all greater than or equal to 0.
these are all false. See the above comments from 2.2 number 34. Recall that 0 is the matrix of all 0s of whatever size you are working with (2x2), and I is the matrix with 1s on the main diagonal, and 0s elsewhere. -I is the matrix with -1s on the main diagonal, and 0s elsewhere. In Statement a), you want a matrix that squares to the zero matrix, but didn't start off with all 0 entries - so try different matrices with 3 of 4 entries 0 and the 4th entry a number. In Statement b) try different matrices that look like I and -I, ie try having 1 row match I and the other -I. In Statement c) you want to end up with a matrix that has at least one negative entry. Try mixing positive and negative numbers in A so that when you multiply, at least one of the results is negative.
Problem 4: 2.3 12
This is much faster on Maple - so I am sure that you are happy to see
that I assigned this to be in Maple. Be sure to incorporate text like
your name and the problem number, as well as any full sentence explanations.
Note that for the next one #14 you must use both methods.
Problem 5: 2.3
14 by hand and on Maple
Problem 6: 2.3 28 part a - look at the matrix system as Ax=b and
then apply the inverse method of solution
define the coefficient matrix A, the column matrix/vector b, and then
solve the system by computing x= MatrixInverse(A).b;
Problem 7: 2.3
40 part d
look for a 2x2 matrix (often one with some combination of 0s, 1s and -1s will suffice) as well as a specific column b (with numbers)
as a counterexample - where you have no solutions or infinitely many solutions.
Theorem 2.11 says that if a matrix is invertible then the system of linear equations has a unique solution. This does NOT imply the converse is true - ie
if A doesn't have an inverse then we don't yet know how many solutions
we can have.
Maple Commands - We begin as usual...
Inverse of a Matrix
Maple can find the inverse of a matrix
a lot quicker than we can by hand!
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:
So they really are inverses.
Other Algebraic Operations for Matrices
A+B; B-A; 3*A; A^3;
These all work just like you would expect them to once you define the matrix A as above. Note that A^3 will give us the same answer as A.A.A just like we expect:
Review of Augmented Matrix Method and Comparison with Inverse Method
We can use either method to solve a system when the inverse exists
A:=Matrix([[-1,2,1],[2,4,-7],[4,7,-3]]); b:=Matrix([[-1],[-8],]); MatrixInverse(A).b;
Hence we see that the solutions are x=195/83, y=-15/83, z=142/83. The inverse method of solving a system (x = A^(-1)b) only works if the inverse exists. The augmented matrix method always works. If there are unknown variables in the matrix, you should use GaussianElimination(P); instead.