Question 822764
{{{system(2x + y + z= 6,
-3x - 4y + 2z= 4,
x + y - z= -2)}}}

<pre>
Write that as a matrix by dropping the letters
and putting vertical line instead of equal signs:

{{{(matrix(3, 5,
     2,    1,   1,"|",6,
red(-3),  -4,   2,"|",4,
red(1),red(1), -1,"|",-2  ))}}}

The idea is to get three zeros in the three positions
in the lower left corner of the matrix, where the elements
I've colored red are.

Things will be easier if there is an easy way to get a 1 
in the upper left corner.  We can do that by interchanging
(swapping) rows 1 and 3.

That operation is written:

R1<->R3

{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(-3),-4, 2,"|",4,
    red(2),red(1), 1,"|",6  ))}}}


To get a 0 where the red -3 on the left of the middle row is,
multiply R1 by 3 and add it to 1 times R2, and put it in place 
of the present R2.  That's written as

3R1+1R2->R2

To make it easy, write the multipliers to the left of the two
rows you're working with; that is, put a 3 by R1 and a 1 by R2

{{{matrix(3,1,3,1,"")}}}{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(-3),-4, 2,"|",4,
    red(2),red(1), 1,"|",6  ))}}}


We are going to change only R2.  Although R1 gets multiplied
by 3 we are going to just do that mentally and add it to R2, but
not really change R1.

{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(0),-1, -1,"|",-2,
    red(2),red(1), 1,"|",6  ))}}}

-----

To get a 0 where the red 2 is, multiply R1
by -2 and add it to 1 times R3.  That's written as

-2R1+1R3->R3

Write the multipliers to the left of the two rows you're 
working with; that is, put a -2 by R1 and a 1 by R3

{{{matrix(3,1,-2,"",1)}}}{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(0),-1, -1,"|",-2,
    red(2),red(1), 1,"|",6  ))}}}


We are going to change only R3. 

{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(0),-1, -1,"|",-2,
    red(0),red(-1), 3,"|",10  ))}}}


---------------
It's a good idea, when it's easy, to
get 1's on the diagonal.  So we'll
multiply R2 by -1.

That operation is written

-1R2->R2

{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(0),1, 1,"|",2,
    red(0),red(-1), 3,"|",10  ))}}}

To get a 0 where the red -1 is, multiply R2
by 1 and add it to 1 times R3.  That's written as

1R2+1R3->R3

Write the multipliers to the left of the two
rows you're working with; that is, put a 1 by R2 and a 1 by R3

{{{matrix(3,1,"","1",1)}}}{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(0),1, 1,"|",2,
    red(0),red(-1), 3,"|",10  ))}}}

We are going to change only R3. 

{{{(matrix(3, 5,
     1, 1, -1,"|",-2,
     red(0),1, 1,"|",2,
    red(0),red(0), 4,"|",12  ))}}}

Now that we have 0's in the three positions in the
lower left corner of the matrix, we change the matrix
back to equations:

{{{system(x+y-z=-2,y+z=2,4z=12)}}}

Solve the third equation for z:

{{{4z=12}}}
{{{z=(12)/(4)}}}
{{{z=3}}}

Substitute 3 for z in the middle equation:

{{{y+z=2}}}
{{{y+(3)=2}}}
{{{y=-1}}}


Substitute 5 for z and 3 for y in the top equation:

{{{x+y-z=-2}}}
{{{x+(-1)-(3)=-2}}}
{{{x-1-3=-2}}}
{{{x-4=-2}}}
{{{x=2}}}

So the solution is {{{"(x,y,z)"="(2,-1,3)"}}}

Edwin</pre>