Solving of a system of linear algebraic equations appears frequently in many engineering problems. Most of numerical techniques which deals with partial differential equations, represent the governing equations of physical phenomena in the form of a system of linear algebraic equations. Gauss elimination technique is a well-known numerical method which is employed in many scientific problems. Consider an arbitrary system of linear algebraic equations as follows:
. . .
where a are coefficients of unknowns and _{ij}c are equations’ constants. This system of algebraic equation can be written in the matrix form as follows:_{i}[A]{x}={C} Where [A] is the matrix of coefficient and {x} is the vector of unknowns and {C} is the vector of constants. Gauss elimination method eliminate unknowns’ coefficients of the equations one by one. Therefore the matrix of coefficients of the system of linear equations is transformed to an upper triangular matrix. The last transformed equation has only one unknown which can be determined easily. This evaluated unknown can be used in the upper equation for determining the next unknown and so on. Finally the system of linear equations can be solved by back substitution of evaluated unknowns. For example consider the following system of algebraic equations:
If the first equation is multiplied by -2 and is added to the second equation and if the first equation is added to the third equation, the system of linear equation can be written as follows:
The
Using the third equation,
The algorithm of the Gauss elimination method can be written as follows:
(Source Code in C++) |