• Welcome to Valhalla Legends Archive.
 

Gauss-Jordan Elimination

Started by Orillion, July 22, 2003, 11:55 PM

Previous topic - Next topic

Orillion

Currently I'm practicing Gauss-Jordan Elimination as a means to solve systems of linear equations(in search of a quick means for comps to do so apparently), and my lecturer posed this question to me which despite my numerous attempts, I havent succeeded in.

I have to reduce the following matrix to reduced row-echelon form without introducing negatives or fractions:

        2   1   1
        2   5   11
        4   6   8

Despite all attempts, I havent been able to reduce the first number to a leading 1. Any suggests on how to at least do that first step?

Adron

Quote from: Orillion on July 22, 2003, 11:55 PM
without introducing negatives or fractions

Why can't you introduce negatives or fractions? Will you be doing all the matrix calculations with only unsigned integers? Won't that severely limit the usefulness of the methodology - I'm thinking most real life matrices will actually have fractions and/or negatives from the start?

Orillion

Your totally correct in what you said but I'm not doing these calculations through a computer program yet. The current part of learning it is learning to do them by hand which seems redundant but yeah. As for not introducing negatives or fractions, yes in all normal situations matrices should include these but in this situation, the problem posed to me was to do it without them.

Adron

It's been a while since I did this kind of thing, but ... Since you aren't allowed to introduce negatives, you'll always have to remove the smallest row from bigger rows? Seems to me like you'll have to swap around the rows or columns to produce a unity matrix from this.


Orillion

Yeah im thinking thats how im gonna have to do it

Adron

Quote from: Orillion on July 24, 2003, 02:04 AM
Yeah im thinking thats how im gonna have to do it

If you're free to swap rows/columns, it's easy to solve..

Orillion

Thanks. Thats the technique I was considering trying but doing it by hand really is going to be a lengthy process. Fear the annoyance of Math/Comp Sci lecturers

Adron

#7
2 1 1
2 5 11
4 6 8

1   0   0
0   1   0
0   0   1

r3 -= 2*r1, r2 -= r1

2 1 1
0 4 10
0 4 6

1   0   0
-1   1   0
-2   0   1

r2 -= r3

2 1 1
0 0 4
0 4 6

1   0   0
1   1   -1
-2   0   1

r2 /= 4, r3 /= 2

2 1 1
0 0 1
0 2 3

1   0   0
0.25   0.25   -0.25
-1   0   0.5

r3 -= 3*r2, r1 -= r2

2 1 0
0 0 1
0 2 0

0.75   -0.25   0.25
0.25   0.25   -0.25
-1.75   -0.75   1.25


r3 /= 2

2 1 0
0 0 1
0 1 0

0.75   -0.25   0.25
0.25   0.25   -0.25
-0.875   -0.375   0.625


r1 -= r3

2 0 0
0 0 1
0 1 0

1.625   0.125   -0.375
0.25   0.25   -0.25
-0.875   -0.375   0.625


r1 /= 2

1 0 0
0 0 1
0 1 0

0.8125   0.0625   -0.1875
0.25   0.25   -0.25
-0.875   -0.375   0.625


swap r2/r3

1 0 0
0 1 0
0 0 1

0.8125   0.0625   -0.1875
-0.875   -0.375   0.625
0.25   0.25   -0.25


Not all that difficult to even find the inverse matrix



Orillion