Example:

-4*w + 3*x - 4*y - z = -37

-2*w - 5*y + 3*z = -20

-w - x - 3*y - 4*z = -27

-3*w + 2*x + 4*y - z = 7

Let w be the first pivot variable, and the first equation the first

pivot equation. w appears in the second equation, so we subtract

(-2)/(-4) = 1/2 times the first equation from the second, getting

-2*w - 5*y + 3*z = -20,

-2*w + (3/2)*x - 2*y - (1/2)*z = -37/2

--------------------------------------

-(3/2)*x - 3*y + (7/2)*z = -3/2

w appears in the third equation so we subtract (-1)/(-4) times the

first equation from the third. w appears in the fourth equation, so we

subtract (-3)/(-4) times the first equation from the fourth. This

leaves

-4*w + 3*x - 4*y - z = -37

-(3/2)*x - 3*y + (7/2)*z = -3/2

-(7/4)*x - 2*y - (15/4)*z = -71/4

-(1/4)*x + 7*y - (1/4)*z = 139/4

Now the last three equations are a system of three equations in three

unknowns, and we treat that similarly. Let x be the next pivot

variable, and the second equation the pivot equation. Since x appears

in the third equation, we subtract (-7/4)/(-3/2) = 7/6 times the

second equation from the third. Since x appears in the fourth equation

we subtract (-1/4)/(-3/2) = 1/6 times the second equation from the

fourth. This leaves

-4*w + 3*x - 4*y - z = -37

-(3/2)*x - 3*y + (7/2)*z = -3/2

(3/2)*y - (47/6)*z = -16

(15/2)*y - 16*z = 35

Now the last two equations are a system of two equations in two

unknowns, and we treat that similarly. Let y be the next pivot

variable, and the third equation the next pivot equation. Since y

appears in the fourth equation, we subtract (15/2)/(3/2) = 5 times the

third equation from the fourth. This leaves

-4*w + 3*x - 4*y - z = -37

-(3/2)*x - 3*y + (7/2)*z = -3/2

(3/2)*y - (47/6)*z = -16

(115/3)*z = 115

This completes the first phase.

Now we start with the last equation, and solve for z. This gives

z = 3, and we substitute that into the preceding equations:

-4*w + 3*x - 4*y = -34

-(3/2)*x - 3*y = -12

(3/2)*y = 15/2

The last remaining equation tells us that y = 5, and we substitute

that into the preceding equations:

-4*w + 3*x = -14

-(3/2)*x = 3

The last remaining equation tells us that x = -2, and we substitute

that into the preceding equation:

-4*w = -8

That gives us the value w = 2, and so the solution is

(w,x,y,z) = (2,-2,5,3)

Understood?