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:

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.

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.

Statement a) A

Statement b) A

Statement c) A

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.

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.

define the coefficient matrix A, the column matrix/vector b, and then solve the system by computing x= MatrixInverse(A).b;

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...

`> `
**with(LinearAlgebra): with(plots):**

`> `
**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!

`> `
**B:=MatrixInverse(A);**

**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.

**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:

`> `
**A.A.A;**

**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],[3]]); MatrixInverse(A).b;**

`> `
**P:=Matrix([[-1,2,1,-1],[2,4,-7,-8],[4,7,-3,3]]); ReducedRowEchelonForm(P);**

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.

`> `
**GaussianElimination(P); **