Row operations on matrices can involve lots of arithmetic, so it is very natural to use a computer to help. This package represents a small add-on to standard Maple to make it easy for you to do examples which would be tedious by hand.

Once you have started Maple, load the package with a line like

where you will likely have to substitute for Pacific the name of your machine.read `Pacific:othermaple:row_ops`;

Suppose *A* is an *n* x *k* matrix, *b* a column vector in
*R*^{k}, and *X* a vector of unknowns in *R*^{n}. The package can now be used either to solve a linear system

or, if

To solve ,
one first defines the matrix *A* and the
vector *b* in Maple. For example:

A := matrix([[1,2],[3,4]]);

b := vector([1,2]);

To do Gaussian elimination ( which one might abbreviate ``ge'' ...) , the next command is

This sets up some global variables used by the package, and gets one ready to start the actual sequence of row operations.start_ge(A,b);

A typical row operation is specified by an at first cryptic, but easy to type line like

ar(1,2,-3);where

Adding -3 times row 1 to 2.

Work matrix forAandrhsare:

Generally the philosophy of the commands is that they should be short and easy to type, but that longer output should be available to check that you are getting the row operation you wanted.

Examples of other row operation commands are:

to multiply row 2 by 3 andmr(2,3);

to interchange rows 2 and 3.sr(2,3);

For Gaussian elimination, when *A* has been reduced to echelon form, you
can call for back-substitution by

This all works best when exact (e.g. rational) arithmetic has been used, but if you wish to work with decimals, the commandbs();

is available which first rounds entries torounded_bs(k);

Support for computing inverses of square matrices is similar, except one starts with the line

instead of start_ge(A,b).start_inv(A);

One consideration is that the package uses global variables and does not have an ``undo''. So if you make a mistake, it's fine to correct the line where the mistake happened. But then go back to the line ``start_ge'' or ``start_inv'' at the beginning, and (by hitting ENTER many times) execute all the lines in the row reduction that you are satisfied with.

When the package is loaded, it prints a help message with some additional information including the names of some of the global variables used. For example, at the end of inversion,, _rhs_in_prog will contain the inverse of the matrix being computed.

The attached examples should shed further light on how the package works: