"); hg.document.close(); } function tipclose(){ hg.window.close(); }
Direct Methods
  • Direct methods : These are the methods which can find the solution of the system in a finite 

  • number of steps known apriori. Some of the important direct methods are 
    1. Elimination methods
    2. Decomposition methods

Gauss Elimination Method : 

There are  two basic steps in this elimination method. They are 
 
  • Forward elimination 
  • Back substitution. 
In forward elimination the augmented matrix (the elements of the vector b has joined with the coefficient matrix A  as (n+1)th column) and is denoted by A|b is converted into upper diagonal form by making  use of matrix row transformations (one can also convert into a lower triangular form in which case the process is called backward elimination). 
Then by starting with the last row of the upper triangular matrix (first row for lower triangular matrix) the unknown quatity is obtained by back (forward) substitution. 
For example consider the following n algebraic linear equations in n unknowns x 1, x 2 , . . ., xn as 
a11 x1 + a 12x2 + . . . + a 1nx n = b1
a21x 1 + a 22 x2 + . . . + a 2n xn = b 2
. . .
ai1x 1 + a i2 x2 + . . . + a in xn = bi
. . .
an1x 1 + a n2 x2 + . . . + a nn xn = b n
or in the matrix notation Ax = b

where A =  
a11 x 1  a12 x 2  . . .  a 1nxn
 
a21x1   a22x 2   . . .  a2nx n
. . .
. . .
. . .
an1x1   an2x 2   . . .  annx n
x = (x1 , x2, . . ., x n ) T and b = (b1 , b2, . . ., bn )T
Forward elimination procedure  : 
Use the row transformation 

R2 ® R2 - R 1*a21/a11means the elements of the second row are replaced by the second row elements subtracted with the first row elements  multiplied with the coefficient of the first element of the second row and divided with the diagonal elements of the first row. 

This will make the elements in the second row first column as zero. Similarly the remaining (n-2 ) rows are also replaced with corresponding row transformations so that the elements below the diagonal element in the first column become zero. 

Now the elements of the second now can be used to make the elements below the diagonal element of the second column, zero. Here the elements of the first row cann't be used since that will change the zeros in the first column to non zero again. 

By applying similar procedure for the remaining columns of the augmented matrix A|b(except the last column), the coefficent matrix part of the augmented matrix A|b will become upper diagonal. (A similar procedure can be applied from the last row to make the coefficient matrix A as lower diagonal). Now the last row of the augmented matrix has only two non-zero terms (the coefficient of x n and bn). This can be used to find xn. Once xn is known, the value of xn is substituted in (n-1)th row and obtain the xn-1. As we continue this process until first row gives unknown quatities x1, x 2, . . ., x n

Example : Consider the simple example : 

x1 + x2 + x3 = 6
2x1 + 3x2 + 4x3 = 20
3x1 + 4x2 + 2x3 = 17



here A =   1 1 1  ,  b =   6
20
17
 
2 3 4
3 4 2
and the unknown vector X = (x1 , x 2, x 3)T

Augmented matrix is A|b =   1 1 6  
2 3 4 20
3 4 2 17
Forward elimination : 

R2 ® R2 - 2/1 R 1
R3 ® R3 - 3/1 R 1


A|b =   1 1 6  
0 1 2 8
0 1 -1 -1
R3 ® R3 -1/1 R 2
 

A|b =   1 1 6  
0 1 2 8
0 0 -3 -9
Back Substitution :
From the last row
-3x3 = -9 Þ x3 = 3

From the second row x2 + 2x3 = 8
x2 = 8 - 2x3 = 2

Now from the first row x 1+ x2 + x 3 = 6

x1 = 6 - 2 - 3 =1 Þ x = (1, 2, 3) TThe same procedure can be extended to the system of any order n provided the system has an unique solution. 

Pivoting : The main draw back of the above elimination process is division by the diagonal term while converting the augmented matrix into upper triangular form. If the diagonal element is zero or a vanishingly very small then the elements of the rows below this diagonal become very large in magnitude and difficult to handle because of the finite storage capacity of the computers. Alternative is to convert the system such that the element which has large magnitude in that column comes at the pivotal position i.e., the diagonal position. 

Partial Pivoting : If only row interchanging is used to bring the element of large magnitude of the pivotal column to the pivotal position at each step of diagonalization then such a process is called partial pivoting. In this process the matrix may have larger element in non-pivotal column(the column where the pivot is there) but the largest element in the pivotal column only brought to pivotal (or diagonal) position in this process by making use of row transformations. 

Complete Pivoting : In this process the largest element(in magnitude) of the whole coefficient matrix A is first brought at 1x 1 position of the coefficeint matrix and then leaving the first row and first column, the largest among the remaining elements is brought to the pivotal 2 x2 position and so on by using both row and column transformations, is called complete pivoting. During row transformations the last column of the augmented matrix also has to be considered but this column is not considered to find the largest element in magnitude. Since the column transformations are also allowed in this process, there will be a change in the position of the individual elements of the unknown vector X. Hence in the end the elements of the unknown vector X has to be rearranged by applying inverse column transformations in reverse order to all the column transformations preformed. 

Example : Consider x 1+ x2 + x3 = 6, 3x 1 + 3x 2 + 4x 3 = 20, 2x1+ x 2 + 3x3 = 13Partial pivoting : Since the largest element in the first column is at 3x1 which is not in the pivotal position, perform the row transformation  R1 « R 2. Now the system is 
3x1 + 3x2 + 4x 3 = 20
x1+ x2 + x3 = 6
2x1+ x2 + 3x3 = 13



Augmented matrix is =   3 4 20  
1 1 6
1 3 13
R2 ® R2 - 1/3 R 1
R3 ® R3 - 2/3 R 1

A|b =   
3
3
4
20
 
0
-1/3
-2/3
0
-1
1/3
-1/3
Since this is a '0' at the pivotal position i.e., at second row second column apply R 2«R3 (interchange rows tow and three) 
 

A|b =   
3
3
4
20
 
0
-1
1/3
-1/3
0
0
-1/3
-2/3
Now the augmented matrix is in diagonal form(the part of coefficient matrix A). 

Back substitution : From the last row : -1/3x3 = -2/3 Þ x 3 = 2
Now from the second row 
-x2 = -1/3 - 1/3x2 Þ x 2 =1
and from the first row 3x1 = 20 - 3x1 - 4x(2) Þ x1 =3
Hence the solution is X = (3 1 2)T

Complete Pivoting :

The given system is 

3x1+ 3x2 + 4x 3 = 20
x1+ x2 + x3 = 6
2x1+ x2 + 3x3 = 13
 Since the largest element in magnitude is at first row third column perform the column transformation C1 « C3 (interchange first and third columns) then the augmented matrix is 


Augmented matrix is =   
4
3
3
20
 
1
1
1
6
3
1
2
13
(please note the order of the individual elements of the unknown vector x is now (x3 x2 x 1) T
Perform R2 ® R2 - 1/4R 1
R3 ® R3 - 3/4R 1
 

A|b =   
4
3
3
20
 
0
1/4
1/4
-2
0
-5/4
-1/4
3/5
Now the elment with the largest magnitude is in the third row(leaving the first row aside) 
Perform R2« R3
 

A|b =   
4
3
3
20
 
0
-5/4
-1/4
-2
0
1/4
1/4
1
R3 ® R3 - (-1/5) R 2
 

A|b =   
4
3
3
20
 
0
-5/4
-1/4
-2
0
0
1/5
3/5
From the last row 1/5x 1 = 3/5 Þ x1 =3

From the second row -5/4x 2 = -2 +1/4 x 3 Þ x 2=1

4x3 = 20-3x2-3x 1 = 20 -3 -9 = 8 Þ x 3 = 2
 

COMPLEXITY OR OPERATIONAL COUNT
 
 
First step (division by first pivot) : n
second step (division by second pivot) : n-1
.
.
.
:
:
:
.
.
.
nth step(division by nth pivot) : 1

Total number of divisions = Sn = n(n+1) / 2

no. of multiplications:
 
First step :  second equ : n
third equ : n
.
.
.
:
:
:
.
.
.
nth equ : n
Total : n(n-1)

Similarly for second, third and so on
ÞTotal no of multiplications in Forward elimination = Sn(n-1) = S(n2 - n) = (n/3) (n+1)(n-1)

No. of multiplications in back substitutions
 
(n-1)th equation : 1
(n-2)th equation : 2
.
.
.
:
:
:
.
.
.
first equation : n-1

ÞTotal no of multiplications in back substitution = S(n-1) = (n/2)(n-1)

Total multiplications = (n/3)(n+1)(n-1) + (n/2)(n-1) = (n/6) (n-1)(2n+5)

Operational count = Total no of divisions and multiplications

= (n/2)(n+1) + (n/6)(n-1)(2n+5) = (n/3)(n2 +3n -1)

for very large 'n' the operational count is @ n3/3 or the complexity of the Gauss elimination is O(n3/3)

No. of additions and subtractions = (n/6)(n-1)(2n+5).

Similarly operational count for cholesky method is (1/6)(n3+9n2+2n).
 
 

Ill Conditioned Systems :

During computation it is not possible to store the numbers exactly in the computer but prone to some round off errors. If dA is the error in A and db is the error in b then the equation Ax = b is actually solved for (A + dA)= b + db.
(or)
|| - x|| < ||(A + dA)-1 - A-1|| ||b|| + ||(A + dA)-1|| ||db||

where ||.|| is any matrix norm

This gives
|| - x|| < (||A-1dA|| ||db||) (||A-1|| / (1 - ||A-1dA||))

|| - x|| < [ ||db|| / ||b||   +  ||dA|| / ||dA|| ] ( k(A) / (1 - ||A-1dA||)))

where k(A) = ||A-1|| ||A-1|| is called the condition number of the matrix A. If k(A) is small (close to one) small change in A and b leads to small changes in x where as for large values of k(A)  a small change in A or b (or both) leads to large changes in x. The systems for which k(A) is large are called ill conditioned systems.

Example : consider 2.1x +1.8y = 2.1 and 6.2x + 5.3y = 6.2

eigen value of A are 74.18 and l2 = 0.000012
if we use || ||2 for the norm then k(A) = Ö(l1/l2) = 2472.73
That is the given system is ill-conditioned.
 
 


Solution of Transcendental Equations | Solution of Linear System of Algebraic Equations | Interpolation & Curve Fitting
Numerical Differentiation & Integration | Numerical Solution of Ordinary Differential Equations
Numerical Solution of Partial Differential Equations