Elementary operations and matrices

Recall that solving equations means manipulating augmented matrices ( [Maple Math] | [Maple Math] ) where each row of [Maple Math] represents a single equation and the corresponding entry in [Maple Math] is the right hand side. Denote the combined matrix as [Maple Math] .

Valid operations on equations which don't affect the set of solutions are of two types . Our aim is to build matrices which can produce the desired effect on [Maple Math] by left multiplication. We will denote the matrices by the same names as the operations.

First is a shuffle (or permutation) of equations and this can be accomplished by the simplest shuffle (called a transposition) [Maple Math] which interchanges the [Maple Math] -th and the [Maple Math] -th equation. We define a corresponding matrix [Maple Math] as obtained from the identity matrix by interchanging the corresponding row of a suitably sized identity matrix.

Note that strictly speaking the notation should mention the size of the identity matrix as well , but we omit it for convenience of reading.

Example (same old equations):

> M:=matrix(3,4,[0,1,2,1,1,-1,3,3,2,1,11,1]);

[Maple Math]

> P[1,2]:=swaprow(eye(3),1,2);

[Maple Math]

> M1:=evalm(P[1,2]&*M);

[Maple Math]

Next is the operation of adding a multiple by [Maple Math] of one ( [Maple Math] -th) equation to the other ( [Maple Math] -th). We make the operation on a suitably sized identity matrix again and denote the resulting matrix by [Maple Math] .
Note that the book omits the multiple [Maple Math] from its notation. Also, as above, the size of the identity matrix is omitted from the notation.

We use our own procedure emat to build these matrices. Learn it when you get to the lab.

Example (continued):

Create [Maple Math] .

> `E[3,1](-2)`:=emat(3,1,-2,3);

[Maple Math]

Check its use. This is the voodoo principle in action.

> M2:=evalm(`E[3,1](-2)`&*M1);

[Maple Math]

Maple operation which corresponds to [Maple Math] is denoted by swaprow(M,i,j) and the operation which corresponds to [Maple Math] is denoted by addrow(M,i,j,k) .