Sei sulla pagina 1di 2

Gauss-Jordan Elimination

for Solving a System of n Linear Equations with n Variables


To solve a system of n linear equations with n For the 3× 3 the system
variables using Gauss-Jordan Elimination, first ⎧2x − 2 y + 4z = 10
write the augmented coefficient matrix. ⎪
⎨3x − 6 y + 6z = 18
⎪−2x + 5y − 3z = −11
The general idea is a follows: Work across the ⎩
columns from left to right using Elementary Row
the augmented coefficient matrix is
Operations to first get a 1 in the diagonal position
and then to get 0’s in the rest of the column. ⎡ 2 −2 4 10 ⎤
When the left-most 3× 3 sub-matrix has 1’s on ⎢ ⎥
⎢ 3 −6 6 18 ⎥ .
its diagonal and 0’s elsewhere, the solutions are
⎢ −2 5 −3 −11 ⎥
in the fourth column of the main matrix. ⎣ ⎦
Starting with the first column, if the diagonal
position is 0, swap the first row with a lower row ⎡ 1 −1 2 5 ⎤
that doesn’t have a 0 in the first column. When 1 ⎢ ⎥
R1 → R1 ⎢ 3 −6 6 18 ⎥
the diagonal is not 0, multiply the first row by the 2
⎢ −2 5 −3 −11 ⎥
reciprocal of the first row, first column entry to ⎣ ⎦
get a 1 in the diagonal position.

⎡ 1 −1 2 5 ⎤
−3R1 + R2 → R2 ⎢ ⎥
Use multiples of the first row to zero out the ⎢ 0 −3 0 3 ⎥
other entries in the first column. 2R1 + R3 → R3 ⎢ ⎥
0 3 1 −1
⎣ ⎦

Next we work on the second column. We want ⎡ 1 −1 2 5 ⎤
to have a 1 in the diagonal position so multiply 1 ⎢ ⎥
− R2 → R2 ⎢ 0 1 0 −1 ⎥
1 3
the second row by − . ⎢ 0 3 1 −1 ⎥
3 ⎣ ⎦

⎡ 1 0 2 4 ⎤
R2 + R1 → R1 ⎢ ⎥
Then we use multiples of the second row to zero ⎢ 0 1 0 −1 ⎥
out the other entries in the second column. −3R2 + R3 → R3 ⎢ ⎥
0 0 1 2
⎣ ⎦

Finally we work on the third column. We want

a 1 on the diagonal and, as fate would have it,
there’s already a 1 in that position. So all we ⎡ 1 0 0 0 ⎤
⎢ ⎥
have left to do is use multiples of row 3 to zero −2R3 + R1 → R1 ⎢ 0 1 0 −1 ⎥
out the rest of the third column. Then the matrix ⎢ 0 0 1 2 ⎥
is in Reduced Row Echelon Form and we see that ⎣ ⎦
the solution is (0,−1,2) .

What can possibly “go wrong”?

What, if when you get to the last column, it is impossible to get a 1 on the diagonal because there
is a 0 in that position. Therefore it is impossible to zero-out the rest of the last column using
multiples of the last row.

There are two possibilities we’ll consider.

Situation 1 – All of the entries in the bottom row are 0’s.


⎡ 1 0 −2 5 ⎤
⎢ ⎥
Example: ⎢ 0 1 3 −4 ⎥
⎢ 0 0 0 0 ⎥
⎣ ⎦
The bottom row indicates that 0x + 0 y + 0z = 0 , which is true for any values of the variables. In
other words, there are an infinite number of solutions. (The system is dependent.) Because the
bottom row doesn’t place any restriction on the variables, their values are only restricted by what
the top two rows indicate.

The top row in the example indicates


x − 2z = 5
from which it follows that
x = 5 + 2z .
The second row in the example indicates
y + 3z = −4
from which it follows that
y = −4 − 3z .
There are no further restrictions on the variables so z can have any value. This means we can
express the solutions as x = 5 + 2z , y = −4 − 3z , and z = z , or as the ordered triplet
(5 + 2z,−4 − 3z, z) ,
where z can be any real number.
For example, substituting 0 for z we get the solution
(5,−4,0).
Substituting 1 for z we get the solution
(7,−7,1) .
Thus we could generate as many solutions as desired for the system of equations.

Situation 2 – All of entries in the bottom row are 0’s except for the last entry.
⎡ 1 0 −2 5 ⎤
⎢ ⎥
Example: ⎢ 0 1 3 −4 ⎥
⎢ 0 0 0 9 ⎥
⎣ ⎦
The bottom row indicates that 0x + 0 y + 0z = 9 , which is not true for any values of the variables.
In other words, there are no solutions. (The system is inconsistent.)

Potrebbero piacerti anche