Elementary operations
What can we do to this matrix
in order to solve the equations? We can interchange any two equations at a time. We will call the resulting operation
if it exchanges the
-th and the
-th equation. In Maple, this can be accomplished by the
swaprow
command.
We can also multiply the
-th equation by a number
and add it to the
-th equation. We shall call this operation
. In Maple, this can be accomplished by the command
addrow.
We can also multiply the
-th equation by a
nonzero
number k. We will accomplish this by a command we made up, called
multrow
. We may denote it by
.
For example, we illustrate a sequence of these operations which will be useful for solving the equations. We explain the steps later.
Operation
.
> M1:=swaprow(M,1,2);
Operation
.
> M2:=addrow(M1,1,3,-2);
Operation
.
> M3:=addrow(M2,2,3,-3);
Operation
.
> M4:=multrow(M3,3,-1);
>
These last equations are in a particularly nice form, if we think of them from bottom to top. The third, one solves for
, then the second can be solved for
, since it only involves
and the first one can then be solved for
. We could also do more operations which reflect the same work, but in a compact form!
> M5:=addrow(M4,3,2,-2);
> M6:=addrow(M5,3,1,-3);
> M7:=addrow(M6,2,1,1);
These are clearly solved, giving
,
and
.
Our aim is to understand and generalize this process. There are two simple maple commands which can readily give the stages M4 and M7 immediately. We wish to master them!
> gausselim(M),gaussjord(M);
>