Comparison of solution of 3x3 system of linear equation in terms of cost

: The solution of a linear system is one of the most frequently performed calculations in computational mathematics. Many numerical methods are involved to solve the system of linear equations. There are two basic approaches elimination approaches and iterative approaches are used for the solution. In this paper we describe the comparison of two popular elimination procedure simple Gauss Elimination and Gauss Jordan elimination method on to the solution of 3 x3 system of linear equation and find out the cost required to implement this procedures.


Introduction
Numerical methods are described to solve the system of linear equations. Every numerical computation requires a finite amount of time to solve the system of linear equation. Computer requires much time to work on a problem sometimes time is much more than user's lifetime. Again the linear equations may contain more equations hence the solution of such equations can be performing by using computational mathematics.
We refer cost of a particular method as the number of algebraic equations used in solving such linear system of equations. If any one method requires more algebraic equations to obtain solution of the system of linear equations then it is said to be inefficient or expensive compared to others. As we are doing additions, subtractions, multiplication and division on the system of equations we should keep in mind that multiplication and division operation are more expensive and also time consuming compare to addition and subtraction. Since addition and subtraction takes almost the same amount of time so they are grouped together. In counting operations addition includes both addition and subtraction operations. Similarly a multiplication includes both multiplication and division.
There are two basic approaches to solve the system of linear equations 1. Elimination approach 2. Iterative approach. In this paper we describe two popular elimination procedure simple Gauss elimination method and Gauss Jordan elimination method and we count the number of algebraic operation requires to work out with these two procedures.

Simple Gauss Elimination Method
Gauss elimination reduces the system of equations to the upper triangular form and then use reverse substitution to solve. It consists of two phases, forward elimination phase and backward substitution phase. The upper triangular form for the 3 system of equation in Gauss elimination method is given as below.
The last equation contains only one equation in one unknown so we can easily get the solution of that unknown. However if we count the number of basic algebraic operation to express the 3x3 system of linear equation in upper triangular form we get the number of algebraic equations as follows. We consider a simple numerical example to illustrate this.

Consider a 3x3 system of linear equation
x + y + z = 6 2x -y +3z = 4 4x + 5 y -10 z = 13 We can express the above system of equation in matrix form as follows Carrying the mathematical operation we can eliminate x 1 from the second equation and we eliminate x 1 from the third equations as follows In order to eliminate x 1 from the second equation of the original matrix we have to carry out the mathematical transformation as r 2 -2 r 1 we multiply first, second, third and right hand side element of the row one by the constant (-2) and added them to the first, second, third and right hand side element of the row two. This requires 4 multiplication and 4 addition operations. Hence r 2 -2 r 1 counts 4 multiplication and 3 addition operations.
In order to eliminate x 1 from the third equation of the original matrix we have to carry out the mathematical transformation r 3 -4 r 1 we multiply the first, second, third and right hand side element of the row one by the constant (-4) and added them to first, second, third and right hand side element of the row three. This again requires 4 multiplication and 3 addition operation.
To eliminate x 2 from the third equation we have to carry out the mathematical operation r 3 + (1\3) r 2 to first augmented matrix we have to multiply the second row by the constant (1\3) i.e. we multiply the second, third, and right hand side element of row two by constant (1\3) requires 3 multiplication and we are adding them to second, third and right hand side element of row three requires 3 addition operation Hence r 3 + (1\3) r 2 count 3 multiplications and 3 addition operation. Thus the total operation count for forward elimination phase of Gaussian elimination is 11 multiplication 9 addition operations = 20 total operations Back Substitution Phase In the back substitution phase we require to compute the value of x 3 from equation 3 which can be done by dividing right hand side element of row 3 by the third element of row 3 requires 1 multiplication. Computation of x 2 from the second equation requires 1 addition and 2 multiplications. To estimate the value x 1 from the first equation we require 2 multiplications and 2 addition operation.
Hence in the back substitution phase we require 5 multiplication and 3 addition operation. The complete solution of Gaussian elimination counts 28 algebraic operations.

Gauss Jordan Elimination method
Gauss Jordan method also uses the process of elimination like Gauss elimination procedure. Gauss Jordan method resulting in identity matrix rather than upper triangular matrix so that we can just directly read the values of x 1 , x 2 , x 3 .
To calculate the cost of Gauss Jordan elimination method we begin by counting the number of arithmetic operations necessary to convert the coefficient matrix to diagonal matrix. Considering the last augmented matrix of the Gaussian elimination method as the first matrix in the Gauss Jordan method.
To eliminate x 2 from the first equation we carry out the mathematical operation as r 1 + (1\3)r 2 which requires 3 multiplication and 3 addition operation we get the matrix as To make 1 on to the a 33 position we carry out the mathematical operation as r 3 which requires 2 multiplication operations. Hence we get matrix form as To get Zero on to the a 23 position we carry the mathematical operation as r 2 -r 3 operation which requires 3 addition operations hence we get the matrix form as To get Zero on to the a13 position we carrying the mathematical operation as r 1 -(4\3) r 3 which requires 2 addition 1 multiplication operation. and finally to make 1 on to the a 22 position we carrying the mathematical operation as r 2 = r 2 we get the final matrix form as The total counts in the Gauss Jordan method of elimination is therefore 8 multiplication and 8 addition operations The Bulletin of Society for Mathematical Services and Standards Vol. 4 3