Mechanism of solutions

The main technique of solving equations systematically is to convert the given equations in the form of a matrix - or an array of coefficients suitably arranged. Then figure out what corresponds to the solution process. The usual tools are as follows:

The first tool is shuffling the order of equations, this corresponds to shuffling the rows of our matrix.

The second tool is to add multiples of one equation to another. This corresponds to a related manipulation of the rows of the matrix.

The third tool is to multiply an equation by a nonzero constant. This corresponds to multiplying the row of the matrix by the same nonzero constant.

Finally, we have some strategy to do the right sequence of these to reach the desired solved state!

We illustrate with a simple example of two equations in two variables which you must have seen many times anyway.

> equations:=[x+y=7,x-y=3];

[Maple Math]

We build a matrix with the coefficients:

> A:=matrix(2,2,[1,1,1,-1]);B:=matrix(2,1,[7,3]);M:=augment(A,B);

[Maple Math]

[Maple Math]

[Maple Math]

We can easily guess the solution: [Maple Math] . This corresponds to the following final form of matrices:

> FinA:=matrix(2,2,[1,0,0,1]);FinB:=matrix(2,1,[5,2]);FinM:=augment(FinA,FinB);

[Maple Math]

[Maple Math]

[Maple Math]

So, we wish to drive the matrix M to the matrix FinM using the tools described above. Here is the Maple work:

Cleaning out the [2,1] entry.

> M1:=addrow(M,1,2,-1);

[Maple Math]

Changing the [2,2] entry.

> M2:=multrow(M1,2,-1/2);

[Maple Math]

Cleaning out the [1,2] entry.

> M3:=addrow(M2,2,1,-1);

[Maple Math]

Of course, Maple can do the whole algorithm by itself and give the final answer in one step. But that would teach us nothing!

> gaussjord(M);

[Maple Math]

There are problems that we do run into and we will be discussing them over the next few lectures.