0% found this document useful (0 votes)
18 views22 pages

Lecture 6 Guass Jordan Elimination 16092024 042254pm

Uploaded by

inaamallah54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views22 pages

Lecture 6 Guass Jordan Elimination 16092024 042254pm

Uploaded by

inaamallah54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

GAUSS- JORDAN ELIMINATION

1
Example-4: Gauss-Jordan
Elimination(1/4)
• Solve by Gauss-Jordan
Elimination x1  3x2  2x3 
2x5  0 2x1  6x2  5x3  2x4  4x5 
3x6  1 5x3 10x4 15x6  5
2x1  6x2  8x4  4x5  18x6  6
Solution:
The augmented matrix for the system is
3 -2 0 2 0
1 0
2 6 -5 -2 4 -3
-1
0 0 5 10 0 15 5 
2 6 0 8 4 18 6

2
Example 4
Gauss-Jordan Elimination(2/4)
• Adding -2 times the 1st row to the 2nd and 4th rows gives
3 -2 0 2 0
1 0
0 0 -1 - 2 0 - 3
-1
0 0 5 10 0 15 5 
0 0 4 8 0 18 
6
• Multiplying the 2nd row by -1 and then adding -5 times the new
2nd row to the 3rd row and -4 times the new 2nd row to the
4th row gives
1 3 - 2 0 2 0 0
0 1
 0 1 2 0 -3 
0 0 0 0 0 0 0
0 0 0 0 0 6 
2
35
1
Example 4
Gauss-Jordan Elimination(3/4)
• Interchanging the 3rd and 4th rows and then multiplying the 3rd row of
the resulting matrix by 1/6 gives the row-echelon form.

1 3 -2 0 2 0 0
0 0 - 3
-1 - 2 0 -1
0
 0 0 0 0 1
1
3

0 times
• Adding-3 0 0the 3rd
0 row0 0to the
0  2nd row and then adding 2 times the
2nd row of the resulting matrix to the 1st row yields the reduced row-
echelon form.
1 3 0 4 2 0 0
0 0 
 0 1 2 0 0

0 0 0 0 0 1 1

 3
0 0 0 0 0 
0 0 4
Example 4
Gauss-Jordan Elimination(4/4)
• The corresponding system of equations is
x1  3x2  4x4  2x5  0
x3  2x4 
x6 013
• Solution 
The augmented matrix for the system is
x1  3x2  4x4  2x5
x3  2x4
x6 1
3

• We assign the free variables, and the general solution is given
by the formulas:
x1  3r  4s  2t, x 2  r, x3  2s, x 4  s, x 5 6
1
3
 t, x  5
Back-Substitution
• It is sometimes preferable to solve a system of linear equations by
using Gaussian elimination to bring the augmented matrix into row-
echelon form without continuing all the way to the reduced row-
echelon form.
• When this is done, the corresponding system of equations can be
solved by solved by a technique called back-substitution.
• Example 5

6
Example 5
ex4 solved by Back-substitution(1/2)
• From the computations in Example 4, a row-echelon form from the
augmented matrix is
1 3 -2 0 02 0
0 
 0 -1 - 2 0 - 3 -1
1
3


0 0 0 0 0 1

• To solve
0 the
0 corresponding
0 0 0 0 0 system of equations
 
x1  3x2  4x 4  2x5 0
x3  2x4 0
1
x6 3

• Step1. Solve the equations for the leading variables.
x1  3x 2  2 x3  2 x 5

x3  1  2 x 4  3x 6

x6  13
7
Example5
ex4 solved by Back-substitution(2/2)
• Step2. Beginning with the bottom equation and working upward,
successively substitute each equation into all the equations above it.
– Substituting x6=1/3 into the 2nd equation
x1  3x2  2x3  2x 5
x3   2 x 4
x 6  13
– Substituting x3=-2 x4 into the 1st equation
x1  3x2  2x3  2x5
x3  2x4
x 1
6 3
• 
Step3. Assign free variables, the general solution is given by the formulas.

x1  3r  4s  2t, x2  r, x3  2s, x4  s, x5  t, x 1


6 3
 8
Example 6
Gaussian elimination(1/2)
• Solve2xx  4 y  3z
y  2z  9
 by Gaussian elimination
and 3x
1
 6 y  5z  0 back-substitution. (ex3 of Section1.1)

• Solution 1 1 2 9
– We convert the augmented 2 1  3
4
matrix  3

– to the ow-echelon form 6 5


 0  7  1720
0 3 

 1is 1
– The system corresponding to this matrix 2 9 
x  y  2z  9, y  72 z  1  127 , z 
2

3 0 1 9
Example 6
Gaussian elimination(2/2)
• Solution
– Solving for the leading variables x  9  y  2z,
y 17
2  7
2 z,
z3
– Substituting the bottom equation into those
above
x

3

y,
x  1,y  2, z 
3 y 10

Homogeneous Linear Systems(1/2)
• A system of linear equations is ...  a1n xn 
a11 x1  a12 x2
said to be homogeneous if the 0
constant terms are all zero; that is , a21x1  a22 x2 ...  a⁝2n xn  ⁝
the system has the form :
am1⁝ x1  am2⁝ x2 0... amn xn 
• Every homogeneous system of linear equation 0
is consistent,
since all such system have x1  0, x2  0,..., xn  0
as a solution. This solution is called the trivial solution; if there
are another solutions, they are called nontrivial solutions.
• There are only two possibilities for its solutions:
– The system has only the trivial solution.
– The system has infinitely many solutions in addition to the
trivial solution.

11
Homogeneous Linear Systems(2/2)

• In a special case of a
homogeneous linear
system of two linear
equations in two
unknowns: (fig1.2.1)

a1x  b1 y  0 (a1,b1 not


both zero)
a2 x  b2 y  0 (a2 ,b2 not
both zero)

12
Example 7
Gauss-Jordan Elimination(1/3)
2x1  2x2  x3  x5 
 Solve the following 0 x 1  x 2 2x 3 3x  x5 
homogeneous system of
0 4
 x5 
linear equations by using
x1  x2  2x3
Gauss- Jordan elimination. 0 x5 
x4 
x3  0
 Solution
 The augmented 2 2 1 0 1 0
1 1 2 3 1 0
matrix  0
1 1 2 0 1
 
0 0 0 1 0
0
 Reducing this matrix to 1 1 0 0 1 0
reduced row-echelon 0 0
form  0 1 0 1 

 0 
0 0 1 0 00 13
6
1
Example 7
Gauss-Jordan Elimination(2/3)
Solution
(cont)
 The corresponding system of
x1  x2  x5  0
equation
x3  x5 
0

Solving for the leading


x4 0

x1   x2  x5
variables is
x3  x5
x4  0
 Thus the general solution is
x1   s  t , x2  s, x3 
t, x4  0, x5
t
14
Example7
Gauss-Jordan Elimination(3/3)
 Two important points:
 Non of the three row operations alters the final
column of zeros, so the system of equations
corresponding to the reduced row-echelon form of
the augmented matrix must also be a
homogeneous system.
 If the given homogeneous system has m
equations in n unknowns with m<n, and there
are r nonzero rows in reduced row-echelon form
of the augmented matrix,
  ()  0 we will have r<n. It
xk1    ()
 xk1
will have the form:
 xk 2   ()  0
⋱ ⁝ ⁝
xr   ()  0 (1) xr    () (2)
xk 2    ()
15
Theorem 1.2.1

A homogeneous system of linear equations


with more unknowns than equations has
infinitely many solutions.

– Note: theorem 1.2.1 applies only to


homogeneous system
– Example 7 (3/3)

16
Computer Solution of Linear System

• Most computer algorithms for solving large linear


systems are based on Gaussian elimination or Gauss-
Jordan elimination.
• Issues
– Reducing roundoff errors
– Minimizing the use of computer memory space
– Solving the system with maximum speed

17
Matrix Products as Linear
Combinations (1/2)

18
Example 8
Linear Combination

19
Example 9
Columns of a Product AB as Linear
Combinations

20
Matrix form of a Linear System(1/2)

 Consider any system of m a11 x1  a12 x2  ...  a1n xn 

linear equations in n b1 a21x1  a22 x2  ...  a2n xn 


unknowns. b2
⁝ ⁝ ⁝ ⁝
 Since two matrices are
11xx11aa  
a
am1 12mx22x
2 ... ...
a1namn
n xn
 b1 
equal if and only if their xa 21 x1  a22 x2 b...
m
 a2n x 
b 
 ⁝   ⁝ 2 
n
⁝ ⁝
corresponding entries are    
equal. am1x1  am2 x2  ... amnxn  bm 

 The m×1 matrix on the ... a1n


a11 a12 x1  b1 
left side of this equation a 21 a22 ... a  x  b 
2n  2   2
 ⁝ ⁝ ⁝   ⁝ 
can be written as a product 
   
⁝ ... amn  x m  bm  21
7
to give: 0
Matrix form of a Linear System(1/2)
• If w designate these matrices by A ,x ,and b ,respectively,
the original system of m equations in n unknowns has been
replaced by the single matrix equation
• The matrix A in this equation is called the coefficient matrix
of the system. The augmented matrix for the system is
obtained by adjoining b to A as the last column; thus the
augmented matrix is

22
7
1

You might also like