# Gaussian elimination

1. May 7, 2012

### robertjford80

1. The problem statement, all variables and given/known data

Apply Gaussian elimination to the following matrix

2 -3 0 3
4 -5 1 7
2 -1 -3 5

I understand how to get the answer.

3. The attempt at a solution

My question is why doesn't the following method work: Switch Z over into the first column, move row 1 to row 3, then exchange rows 1 and 2 so that the new matrix is
1 -5 4 7
-3 -1 2 5
0 -3 2 3

Multiply the first row by 3 and add that to equation 2 to get:

1 -5 4 7
0 5 8 35
0 -3 2 3

Multiply row 2 by 3/5 and add that to equation 3 to get

1 -5 4 7
0 5 8 35
0 0 (34/5) 24

By this time I realized I was on the wrong track but I don't why what I did was illegal.

Last edited by a moderator: May 7, 2012
2. May 7, 2012

### Staff: Mentor

The 3rd row has a sign error.
And you have some more error in the matrix above.
No, it's not illegal, but that's not to say it's a good idea.

The solution to the system that your augmented matrix represents is x = 3, y = 1, z = 0. If you switch columns you are in essence swapping variables.

When I did what you described, I quit at this matrix:
1 -5 4 | 7
0 8 -7 | -13
0 3 -2 | -3

I didn't bother to continue reducing it. Instead I checked that x = 0, y = 1, z = 3 was the solution, which it was.

BTW, you did an awful lot of extra work swapping columns and rows that you didn't really need to do. It's much easier to use the original row-1, col-1 number to eliminate the two entries under it, then use the row-2, col-2 entry to eliminate the entries above and below it. You quickly get to the solution this way.

3. May 7, 2012

### robertjford80

Good, thanks.