Supplement: Gauss-Jordan Reduction

advertisement
1
Supplement: Gauss-Jordan Reduction
1. Coefficient matrix and augmented matrix:
The coefficient matrix derived from a system of linear equations
a11x1  a12 x2    a1n xn  b1
a21x1  a22 x2    a2 n xn  b2

am1 x1  am 2 x2    amn xn  bm
is
 a11
a
A   21
 

am1
a12
a22



am 2


a1n 
a2 n 
 

amn 
and the augmented matrix derived from the above system of linear equations is
 a11
a
Ab   21
 

am1
where
a12
a22



am 2


a1n b1 
a2 n b2 
  ,

amn bm 
 b1 
b 
b 2
  .
 
bm 
Example:
For a system of linear equations,
x1  x 2  2 x3  5 x 4  3
2 x1  5 x 2  x3  9 x 4  3
2 x1  x 2  x3  3 x 4  11
x1  3 x 2  2 x3  7 x 4  5
1
2
the coefficient matrix is
1
2

2

1
1
5
1
2
1
1
3
2
 5
 9
3 

7 
and the augmented matrix is
1
2

2

1
1
5
1
2
1
1
3
2
5 3 
 9  3 
3  11 .

7 5
2. Motivation of Gauss-Jordan reduction:
Motivating Example:
Suppose we have the following system of linear equations and the associated
augmented matrix,
2 x1  5 x2  5 x3  17
 x1  3x2
 2  5 5 17 
(2)   1 3 0  4


 1  2 3 9 
(3)
(1)
 -4
x1  2 x2  3x3  9
x1  2 x2  3x3  9
(1) ( 3)


  x1  3x2
 -4
2 x1  5 x2  5 x3  17
x1  2 x2  3x3  9
2 )  ( 2 )  (1)
(

x2  3x3  5
2 x1  5 x2  5 x3  17
x1  2 x2  3x3  9
( 3)( 3)2*(1)


 1 2 3 9 
(2)   1 3 0  4



( 3 )  2  5 5 17 
(1)
x2  3x3  5
 x2  x3  1
2
1  2 3 9 
(2)  0 1 3 5 


( 3 ) 2  5 5 17
(1)
1  2 3 9 

(2)  0 1
3
5



( 3 ) 0  1  1  1
(1)
3
 9 x3  19
x1
x 2  3 x3  5
(1)(1) 2*( 2 )


 x2  x3  1
 9 x3  19
x1
x 2  3 x3  5
( 3 ) ( 3 )  ( 2 )


( 3)
( 3) 
2
2 x3  4
 9 x3  19
x1
x 2  3 x3  5

x3  2
 9 x3  19
x1
( 2 )( 2 )3*( 3)


x2
x3  2
1
x1
(1)(1)9*( 3)



 -1
x2
 -1
x3  2
1 0 9 19 
( 2 )  0 1 3 5 



( 3 ) 0  1  1  1
(1)
1 0 9 19
(2)  0 1 3 5 


( 3 ) 0 0 2 4 
(1)
1 0 9 19
( 2 ) 0 1 3 5 



( 3 ) 0 0 1 2 
(1)
1 0 9 19 
(2)  0 1 0  1


( 3 ) 0 0 1 2 
(1)
1 0 0 1 
(2)  0 1 0  1



( 3 ) 0 0 1 2 
(1)
In the above motivating example, there are 3 elementary operations on the linear
equations that can be used to obtain the solution. They are
1. Interchange two equations.
2. Multiply an equation by a nonzero constant.
3. Add a multiple of an equation to another equation.
It is simpler to use the augmented matrix to represent the operations on these
equations since we don’t need to keep writing the variable. In addition, the procedure
based on the augmented matrix can be implemented with computer software. There
are 3 elementary row operations of the augmented matrix corresponding to 3
elementary operations on the linear equations. They are
1.
2.
3.
Interchange two rows.
Multiply a row by a nonzero constant.
Add a multiple of a row to another row.
3
4
Note that the last augmented matrix has the following properties:



For each row, the first nonzero entry is 1 (called a leading 1).
For two successive rows, the leading 1 in the higher row appears farther
to the left than the leading 1 in the lower row.
If a column contains a leading 1, then all other entries in that column
are 0.

Conclusion: it might be more efficient to solve the system of linear
equations based on the augmented matrix via a few elementary row
operations. Also, if the final augmented matrix is similar to the one in
the motivating example, the solution might be easy to obtain.
Note: the procedure in the motivating example is in fact
Gauss-Jordan reduction.
3. Reduced row echelon form and elementary row
operations:
In above motivating example, the key to solve a system of linear equations is to
transform the original augmented matrix to some matrix with some properties via a
few elementary row operations. As a matter of fact, we can solve any system of linear
equations by transforming the associate augmented matrix to a matrix in some
form. The form is referred to as the reduced row echelon form.
Definition of a matrix in reduced row echelon form:
A matrix in reduced row echelon form has the following properties:
1. All rows consisting entirely of 0 are at the bottom of the matrix.
2. For each nonzero row, the first entry is 1. The first entry is called a
leading 1.
3. For two successive nonzero rows, the leading 1 in the higher row
appears farther to the left than the leading 1 in the lower row.
4. If a column contains a leading 1, then all other entries in that column
are 0.
Note: a matrix is in row echelon form as the matrix has the first 3
properties.
4
5
Example:
1
0

0
0


0
2
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
3
0
0
0
1
0
0
0
0
0
0
0
0
2
1

0
0

0

and
1
0

0
0


0
0
0

1
0

0

are the matrices in reduced row echelon form. The matrix
1
0

0

0
2
1
0
3
2
1
0
0
4
5

2

0
is not in reduced row echelon form but in row echelon form since the matrix has the
first 3 properties and all the other entries above the leading 1 in the third column are
not 0. The matrix
1
0

0

0
0
1
1
3
2
2
0
0
4
5

2

0
are not in row echelon form (also not in reduced row echelon form) since the leading
1 in the second row is not in the left of the leading 1 in the third row and all the other
entries above the leading 1 in the third column are not 0.
Definition of elementary row operation:
There are 3 elementary row operations:
1. Interchange two rows
2. Multiply a row by some nonzero constant
3. Add a multiple of a row to another row.
5
6
Example:
0
A  2
3

Multiply the third row of A by


1
3
3
0
6
2 
 2 .
 9 
3
2

0
3
6
3
0
0
1
0
1
3
1
0
2
Interchange rows 1 and 3 of A


0
 9
 2
2 
1
3
0
2

1
2 
 2
 3
Multiply the second row of A by -2, then add to the third row of A

0 1
0
2
3 0

 1  3 6
2 
 2
 5
Important result:
 Every nonzero m n matrix can be transformed to a unique matrix
in reduced row echelon form via elementary row operations.
 If the augmented matrix Ab can be transformed to the matrix in
reduced row echelon form C d  via elementary row operations,
then the solutions for the linear system corresponding to C d  is
exactly the same as the one corresponding to Ab.
Example:
0
0
2 x3  3 x4  4 (2)

2
2 x1  2 x2  5 x3  2 x4  4 (3)

2 x1
 6 x3  9 x4  7 (4)
2
2 x2  3 x3  4 x4  1
(1)
6
2
0
2
3
2
5
4
3
2
0
6
9
1
4
4

7
7
1)  ( 3)
(


2 x1  2 x2  5 x3  2 x4  4
2
0
2 x3  3 x4  4 (2)

2 x2  3 x3  4 x4  1 (3)
0

 6 x3  9 x4  7 ( 4 ) 2
2 x1
(1) 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  4
 3 x3 
(1)
1
0
(2)

0

(3)
0
(4)
8
0 3 9/2 7/2 
1 1 / 2  7 / 2  3 / 2
0 1 3/ 2
2 

0 2
3
4 
9
4 )  ( 4 )  2*( 3)
(
 
x1
9
7
x4 
2
2
1
7
-3
x2  x3  x4 
2
2
2
3
x3  x4  2
2
0 x3  0 x4  0
 3 x3 
(1)
1
(2) 0

0
(3) 
0
(4)
0 3 9/2 7/2 
1 1 / 2  7 / 2  3 / 2
0 1 3/ 2
2 

0 0
0
0 
1
( 2 )  ( 2 )  *( 3)
2

9
7
x4 
(1)
2
2
1
17
-5

x4 
(2) 0
4
2

0
3
x3  x4  2 (3)

2
0
0 x3  0 x4  0 (4)
 3 x3 
x1
x2
0 3 9/2
7/2 
1 0  17 / 4  5 / 2
0 1
3/ 2
2 

0 0
0
0 
1)  (1)  3*( 3)
(


19
(1)
2
1
17
-5

x4 
(2)
0
4
2

0
3
x3  x4  2 (3)

2
0
0 x3  0 x4  0 (4)
 9 x4 
x1
x2
Therefore,
9
0 0
9
19 / 2 
1 0  17 / 4  5 / 2
0 1 3/ 2
2 

0 0
0
0 
10

0
0

2

2
2 3  4 1
0 2
3 4
2  5 2 4

0  6 9 7
can be transformed to the unique matrix in reduce row echelon form,
1
0

0

0
0 0
9
19 / 2 
1 0  17 / 4  5 / 2
0 1 3/ 2
2 ,

0 0
0
0 
via elementary row operations.

The linear system
2 x2  3 x3  4 x4  1 (1)
2 x3  3 x4  4 (2)
2 x1  2 x2  5 x3  2 x4  4
(3)
 6 x3  9 x4  7
(4)
2 x1
has the exactly the same solution as the linear system
19
(1)
2
17
-5

x4 
(2)
4
2
3
x3  x4  2 (3)
2
0 x3  0 x4  0 (4)
 9 x4 
x1
x2
The solution for the linear system corresponding to the augmented matrix in reduced
row echelon form is
x1 
19
 5 17
3
 9t , x2 
 t , x3  2  t , x 4  t , t  R
2
2 4
2
10
11

 x1   (19 / 2)  9t   19 / 2    9 
 x  (5 / 2)  (17 / 4)t   5 / 2  17 / 4 


t
x   2  
 x3  
  2    3 / 2
2  (3 / 2)t
  
 
 

t
  0   1 
 x4  
The above solutions are also the solutions for the original linear system.
4. Gauss-Jordan reduction:
Step 1: Form the augmented matrix corresponding to the system of linear
equations.
Step 2: Transform the augmented matrix to the matrix in reduced row
echelon form via elementary row operations.
Step 3: Solve the linear system corresponding to the matrix in reduced
row echelon form. The solution(s) are also for the system of linear
equations in step 1.
Example:
Solve for the following linear system:
x1  x2  2 x3  5 x4  3
2 x1  5 x2  x3  9 x4  -3
2 x1  x2  x3  3 x4  -11
x1  3 x2  2 x3  7 x4  5
[solution:]
The Gauss-Jordan reduction is as follows:
Step 1:
The augmented matrix is
2 5
3 
1 1
2 5  1  9  3 


2 1  1 3  11 .


7
5
1  3 2
Step 2:
After elementary row operations, the matrix in reduced row echelon form is
11
12
0 0 2  5
1 0  3 2 
0 1 2 3 .

0 0 0
0
1
0

0

0
Step 3:
The linear system corresponding to the matrix in reduced row echelon form is
 2 x4  5
x1
 3x4  2
x2
x3  2 x4  3
The solutions are
x1  5  2t , x2  2  3t , x3  3  2t , x4  t , t  R
 x1   5  2t   5  2
 x   2  3t   2   3 
      t
x   2  
 x3   3  2t   3   2 
  
    
x
t
 0 1
 4 

Number of solutions of a system of linear equations:
For any system of linear equations, precisely one of the following is true.
I. The system has exactly one solution.
II. The system has an infinite number of solutions.
III. The system has no solution.
Note: the linear system with at least one solution is called consistent
and the linear system with no solution is called inconsistent.
Example:
I. Exactly one solution:
Solve for the following system:
x1  2 x 2  3 x3  9
2 x1  x 2  x3  8
3 x1
 x3  3
12
13
[solution:]
The Gauss-Jordan reduction is as follows:
Step 1:
The augmented matrix is
3 9
1 2
 2  1 1 8

.
3 0  1 3
Step 2:
The matrix in reduced row echelon form is
1 0 0 2 
0 1 0  1


0 0 1 3 
Step 3:
The solution is
x1  2, x2  1, x3  3
II. Infinite number of solutions:
Solve for the following system:
2 x1  4 x 2  2 x3  0
3 x1  5 x 2
1
[solution:]
The Gauss-Jordan reduction is as follows:
Step 1:
The augmented matrix is
2
3

4
5
2
0
0
1
Step 2:
The matrix in reduced row echelon form is
1
0

0
1
5
3
Step 3:
13
2
 1
14
The linear system corresponding to the matrix in reduced row echelon form is
 5 x3  2
x1
x2  3x3  1
The solutions are
x1  2  5t , x2  1  3t , x3  t , t  R

 x1   2  5t   2   5
x   x 2    1  3t    1   3 t
 x3   t   0   1 
III. No solution:
Solve for the following system:
x1  2 x2  2 x3  4 x4  5
x1  3 x2  5 x3  7 x4  1
x1
 x3  2 x4  6
[solution:]
The Gauss-Jordan reduction is as follows:
Step 1:
The augmented matrix is
4
5
1 2 3
1 3 5
7 11 

1 0  1  2  6
Step 2:
The matrix in reduced row echelon form is
1 0  1  2 0
0 1 2
3 0

0 0 0
0 1
Step 3:
The linear system corresponding to the matrix in reduced row echelon form is
14
15
x1
 x3  2 x 4  0
x 2  2 x3  3 x 4  0
0 1
Since 0  1, there is no solution.
5. Homogeneous systems:
A linear system of the form
a11x1  a12 x2    a1n xn  0
a21x1  a22 x2    a2 n xn  0

am1 x1  am 2 x2    amn xn  0
is called a homogeneous system.
Note: A homogeneous system must have at least one solution,
x1  x2    xn  0 .
That is, every homogeneous system of linear equations is consistent.
Note: The solution
x1  x 2    x n  0 is called the trivial
solution to the homogeneous system. A solution x1 , x 2 , , x n is
called a nontrivial solution if not all the xi are 0.
Important result:
 A homogeneous system of m equations in n unknown variables
always has infinite number of solutions if m  n .
 Let
xp
be
a
solution
of
the
nonhomogeneous
corresponding to the augmented matrix Ab and let
xh
system
be the
solution of the associated homogeneous system A0 . Then,
x p  x h is also a solution of the nonhomogeneous system.
15
16
 Every solution of the nonhomogeneous system corresponding to the
augmented matrix Ab can be written as
x p  x h , where x p be
a solution of the nonhomogeneous system and
xh
be the solution
of the associated homogeneous system A0.
Example:
For the nonhomogeneous linear system,
2 x1  4 x 2  2 x3  0
3 x1  5 x 2
1
the linear system corresponding to the matrix in reduced row echelon form is
 5 x3  2
x1
x2  3x3  1
The solutions are
x1  2  5t , x2  1  3t , x3  t , t  R
 x1   2  5t   2   5
x   x 2    1  3t    1   3 t
 x3   t   0   1 

Then,
xp
Note that
 2 



1



 0 

and
 5
t , t  R
xh  
3
.



 1 

 5
t , t  R
xh  
3
are the solutions for the homogeneous




 1 
linear system
2 x1  4 x2  2 x3  0
3 x1  5 x2
0
16
Download