Gauss Elimination -- "gausselim" Command

>

As you know, Gauss elimination is a main tool for solving systems of linear equations, establishing the rank of a given matrix etc. Maple has a simple command gausselim that performs Gauss elimination of any matrix, with or without parameric entries.

Example 5 . Let's apply the command gausslim to the augmented matrix Baup of the system Bx=p considered above. Recall that Baup is:

> evalm(Baup);

>

Let's apply Gauss elimination to the matrix.

> gausselim(Baup);

>

As we see, it is an augmented matrix of a system with a unique solution. We have already found the solution by linsolve(B,p). The same solution can be found after having performed Gauss elimination by back substitution evoked by the command backsub :

> backsub(%);

>

Example 6. Maple can perform Gauss elimination of matrices with parametric entries. Again, Maple assumes that parametric expressions are not zero. Consider matrix S defined below and perform its Gauss elimination.

> S:=matrix([[0,a,1,0,a],[1,0,0,a,0],[0,1,a,0,1],[a,0,0,1,0],[0,a,1,0,a]]);

> gausselim(S);

>

Note: For any matrix there is more than one row equivalent row echelon matrix. Gauss elimination evoked by the gausselim command uses an algorithm slightly different from the one presented in our text. Hence, on occasions, gausselim command may give you a different answer from the answer you obtain by hand following the algorithm from our textbook. The program stepgauss presented in the next section uses exactly the same algorithm as the one in our book and, moreover, displays the elimination process step-by-step.

>

Note: When you work with linear algebra, you quickly run out of letters to denote matrices and vectors. Hence, after you are through using a particular label you should reinstate the label to a variable status by the command used below. We shall free letters r, w, h, p from any prior assignments. The labels for our matrices we shall keep as we may use them below.

>

> r:='r'; w:='w'; h:='h'; p:='p';

>