Sie sind auf Seite 1von 60

MODULE 1

SYSTEM OF LINEAR EQUATIONS


SYSTEM OF LINEAR EQUATIONS IN 2
VARIABLES
SYSTEM OF EQUATIONS IN THREE
VARIABLES
• Elementary Operations
• There are three kinds of elementary matrix
operations.
• Interchange two rows (or columns).
• Multiply each element in a row (or column) by
a non-zero number.
• Multiply a row (or column) by a non-zero
number and add the result to another row (or
column).
GAUSS ELIMINATION METHOD
• Gauss elimination is used to solve
homogeneous and non-homogeneous linear
equations
• In this method we make an augmented matrix
of m linear equations in n variables
Gaussian Elimination
A method to solve simultaneous linear equations
of the form [A][X]=[C]

Two steps
1. Forward Elimination
2. Back Substitution
Forward Elimination
A set of n equations and n unknowns
a11x1  a12 x2  a13 x3  ...  a1n xn  b1
a21x1  a22 x2  a23 x3  ...  a2n xn  b2
. .
. .
. .
an1x1  an 2 x2  an3 x3  ...  ann xn  bn

(n-1) steps of forward elimination


Equations in matrix form

 a11 a12 a13 a1n   x1   b1 


a a22 a23    
a2 n   x2  b2  
 21
 a31 a32 a33 a3n   x3   b3 
    
    
 an1 an 2 an3 ... ann   xn  bn 
Forward elimination
• Uses these elementary row operations
a. A given equation can be multiplied by a non-zero
constant and the result substituted for the
original equation
b. The given equation can be added to a second
equation, and the result substituted for the
original equation,
c. Two equations can be transposed in order.

• Note: We finally arrive at an upper triangular


matrix
Matrix Form at End of Forward Elimination
(Row echelon form)

 a11 a12 a13 a1n   x1   b1 


0 a a23    
a2 n   x2  b2  
 22

0 0 a33 a3n   x3   b3 


    
    
 0 0 0 0 ann   xn  bn 
Elimination of first column

 a11 a12 a13 a14 b1 


a a22 a23 a24 b2  f 21  a21 / a11
 21 
a31 a32 a33 a34 b3  f 31  a31 / a11
 
 a41 a42 a43 a44 b4  f 41  a41 / a11

a11 a12 a13 a14 b1 


 0 
a22 
a23 
a24 b2  ( 2 )  f 21  ( 1)
 
 0 
a32 
a33 
a34 b3  ( 3 )  f 31  ( 1)
    
 0 a42 a43 a44 b4  ( 4 )  f 41  ( 1)
Elimination of second column
 a11 a12 a13 a14 b1 
 0 
a22 
a23 
a24 b2 
 
 0 
a32 
a33 
a34 b3   / a22
f 32  a32 
    
 0 a42 a43 a44 b4   / a22
f 42  a42 
 a11 a12 a13 a14 b1 
 0 
a22 
a23 
a24 b2 
 
 0 
0 a33 
a34 b3 ( 3 )  f 32  ( 2 )
   
 0 0 a43 a44 b4 ( 4 )  f 42  ( 2 )
Elimination of third column
 a11 a12a13 a14 b1 
 0 
a22 
a23 
a24 b2 
 
 0 
0 a33 
a34 a3 
   
 0 0 a43 a44 a4   / a33
f 43  a43 
 a11 a12 a13 a14 b1 
 0 
a22 
a23 
a24 b2 
Upper triangular
  matrix
 0 
0 a33 
a34 b3
  
 0 0 0 a44 b4 ( 4 )  f 43  ( 3 )
Back-Substitution

a 11 a 12 a 13 a 14 b1 
 0 a  a  a  b  Upper triangular
 22 23 24 2 matrix
 0 0 a 33 a 34 b3 
 
 0 0 0 a 44 b4
x 4  b4 / a 44
a 11 , a 22 , a 33 , a 44  0
x 3  ( b3  a 34 x 4 ) / a 33
x 2  ( b2  a 23 x 3  a 24 x 4 ) / a 22
x 1  ( b1  a 12 x 2  a 13 x 3  a 14 x 4 ) / a 11
Example
 1 0 2 3 1
 1 2 2  3  1 f 21  1
 
 0 1 1 4 2 f 31  0
 
 6 2 2 4 1 f 41  6
1 0 2 3 1
0 2 4 0 0  ( 2 )  ( 1)  f 21
 
0 1 1 4 2  ( 3 )  ( 1)  f 31
 
0 2  10  14  5  ( 4 )  ( 1)  f 41
Forward Elimination
1 0 2 3 1
0 2 4 0 0 
 
0 1 1 4 2 f 32  1/2
 
0 2  10  14  5  f 42  1
1 0 2 3 1
0 2 4 0 0 
 
0 0 1 4 2 ( 3 )  ( 2 )  f 32
 
0 0  14  14  5  ( 4 )  ( 2 )  f 42
Upper Triangular Matrix
1 0 2 3 1
0 2 4 0 0
 
0 1 1 4 2
 
0 2  14  14  5  f 43  14
1 0 2 3 1
0 2 4 0 0
 
0 0 1 4 2
 
0 0 0  70  33 ( 4 )  ( 3 )  f 43
Back-Substitution

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

0 0 1 4 2
 
0 0 0  70  33
x 4  33/  70  33/70   13/70 
x 3  4 x 4  2  4/35
 8/35 
  
x
x 2  2 x 3  8/35   4/35 
 
x 1  1  2 x 3  3 x 4  13/70  33/70 
Partial Pivoting
Problems with Gauss elimination
• division by zero
• round off errors
• ill conditioned systems

Use “Pivoting” to avoid this


• Find the row with largest absolute coefficient below the
pivot element
• Switch rows (“partial pivoting”)
• complete pivoting switch columns also (rarely used)
Partial (Row) Pivoting
x1  2 x3  3 x4 1
 x1  2 x2  2 x3  3 x4  1
x2  x3  4 x4 2
6 x1  2 x2  2 x3  4 x4 1
 1 0 2 3 1
 1 2  3  1
A b  
2
 0 1 1 4 2
 
 6 2 2 4 1
Forward Elimination
 6 2 2 4 1 Interchange rows 1 & 4
 1 2 2  3  1 f 21  1/6
 
 0 1 1 4 2 f 31  0
 
 1 0 2 3 1 f 41  1/6
6 2 2 4 1
0 7/3 7/3  7/3  5/6  ( 2 )  ( 1)  f 21
 
0 1 1 4 2  ( 3 )  ( 1)  f 31
 
0  1/3 5/3 7/3 5/6  ( 4 )  ( 1)  f 41
Forward Elimination
6 2 2 4 1
0 7/3 7/3  7/3  5/6  No interchange required

 
0 1 1 4 2 f 32  3/7
 
0  1/3 5/3 7/3 5/6  f 42  1/7
6 2 2 4 1
0 7/3 7/3  7/3  5/6 
 
0 0 0 5 33/14  ( 3 )  ( 2 )  f 32
 
0 0 2 2 5/7  ( 4 )  ( 2 )  f 42
Back-Substitution
6 2 2 4 1
0 7/3 7/3  7/3  5/6 
 
0 0 2 2 5/7  Interchange rows 3 & 4

 
0 0 0 5 33/14  f 43  0

x 4  ( 33/14 ) /5  33/70
  13/70 
 8/35 
x 3  ( 5/7  2 x 4 ) /2  4/35   
x
x 2  ( 5/6  7/3 x 4  7/3 x 3 ) / (7/3 )  8/35   4/35 
x1  ( 1  4 x 4  2 x 3  2 x 2 ) /6  13/70  
 33/70 
• Example. Consider the linear system

• Soln: x=4, y=-2, z=-2



TRY
• For what values of a and b do the system of
equations Ax=b have (i) unique solution (ii)
infinitely many solutions (iii)no solution
1 1 3 2
• where 𝐴 = 1 2 4 and 𝑏 = 3
1 3 𝑎 𝑏
• After Gauss elimination the matrix reduces
1 1 3 2
• 0 1 1 1
0 0 𝑎−5 𝑏−4
 For a unique solution, we want to have
𝑏−4
must be defined (ie) 𝑎 − 5 ≠ 0
𝑎−5
• if you want infinite number of solutions, a=5
and b=4 which removes the last equation.
• if you want no solutions, 𝑎 ≠ 5 and 𝑏 = 4.
INVERSE MATRICES
INVERSE OF AN ELEMENTARY MATRIX
• If E subtracts 5 times row 1 from row 2, then
E-1 will add 5 times row 1 to row 2.
TRY 1
LU FACTORISATION
• A=LU
• U is upper triangular matrix with pivots on the
diagonal. Elementary matrices take A to U
• L is lower triangular matrix obtained by
reversing the elementary operations that we
do in U
• (ie) U=EkEk-1….E2E1 A
• L=(EkEk-1….E2E1)-1
• NOTE:
• LU factorisation is possible only for matrices
which does not involve interchange of rows as
an elementary operation during Gauss
elimination.
0 1
• Example: Consider the matrix 𝐴 =
1 0
• This matrix doesnot have LU decomposition
unless 1st and 2nd rows are interchanged.
Example
Example 2
Solving Ax=b using LU decomposition
• Now using A= L U , 𝐴𝑥 = 𝑏 becomes 𝐿𝑈𝑥 = 𝑏
• Let U x = c. Also U x = L-1 b (ie) c = L-1 b
• Solve L c = b and then solve U x = c
REMARK
• Let A be any 3X3 matrix. Then
1 0
• (i) When A is multiplied by 0 , 1 and
0 0 0
0 on the right gives the 1st, 2nd and 3rd columns
1
of A.
1
• (ii) When A is multiplied by 1 , then it gives the
0
• vector which is the sum of first and second
columns of A
TUTORIAL PROBLEMS
• Solve the following system of equations by
writing the system in the form Ax=b and
finding A-1using Gauss-Jordan elimination
method
TUTORIAL PROBLEMS
• Using LU decomposition solve the following
systems of equations:
TRY 2

Das könnte Ihnen auch gefallen