1. CHAPTER IV: LINEAR ALGEBRAIC EQUATIONS Maria FernandaVergara Mendoza Petroleum engineering UIS-COLOMBIA 2010
2. MATHEMATICAL BACKGROUND To study the methods to solve linear algebraic equations it’s necessary to familiarize with matrices. A matrix is a rectangular array of elements represented by a single symbol. The horizontal and vertical lines in a matrix are called rows and columns, respectively. The numbers in the matrix are called its entries or its elements. To specify a matrix's size, a matrix with m rows and n columns is called an m-by-n matrix or m × n matrix, while m and n are called its dimensions. Matrices where n=m are called square matrices
3. MATHEMATICAL BACKGROUND SPECIAL TYPES OF SQUARE MATRICES Symmetric Matrix: aij = aji Diagonal Matrix: All elements off the main diagonal are zero Identity Matrix: Diagonal matrix where all elements on the main diagonal are equal to 1 Upper triangular matrix: all elements below the main diagonal are zero
4. SPECIAL TYPES OF SQUARE MATRICES Lower triangular matrix: All the elements above the main diagonal are zero Banded matrix: all the elements are equal to zero with the exception of a band centered on the main diagonal
9. 1. The graphical method This method is appropriate for solving small sets of simultaneous equations , n≤3. A graphical solution of two equations is obtained by plotting them on cartesian coordinates, one axis belongs to one variable (x) and the other corresponds to the another variable (y). Each equation is a straight line because they are linear equations. Both equations can be solved for x2:
10. 1. The graphical method The equations are in form of straight lines, the next step is to plot these lines on Cartesian coordinates (x2 ordinate, x1 abscissa). The values of x1 and x2 at the intersection of the lines is the solution. For example: Use the graphical method to solve 3x1+2x2=18 -x1+2x2=2 Solution: Solvetheeq. For x2 Thenweplotthetwolines: Thesolutionis 4, you can checkthis replacing in the x.
11. 2. Determinants and Cramer’s Rule Determinants: The determinant D of a system is formed from the coefficients of the equation For example, the value of the second order determinant: Is calculated by: For the third-order case, a single numerical value for the determinant can be computed as
12. 2. Determinants and Cramer’s Rule Cramer’s Rule: “Each unknown in a system of linear algebraic equations may be expressed as a fraction of two determinants with denominator D and with the numerator obtained from D by replacing the column of coefficients of the unknown in question by the constants b1, b2, …, bn.” For example, x1 would be:
13. 3. The elimination of unknowns The process is to multiply the equations by constants so that one of the unknowns will be eliminated when the two equations are combined. Then, the other variable can be found by substitution. For example: Use the elimination of unknowns to solve Solution:
15. NAIVE GAUSS ELIMINATION Forward Elimination of Unknowns: Reduce the set of equations to an upper triangular system. Back Substitution: Find xn ,this result can be back-substituted into the (n-1) equation, repeat this procedure to evaluate the remaining x’s. Forward elimination Back substitution
19. GAUSS-JORDAN Is a variation of Gauss elimination. When an unknown is eliminated in this method, it’s eliminated from all other equations rather than just the subsequent ones. The elimination step results in an identity matrix. It is not necessary to employ back substitution to obtain the solution.
20. MATHEMATICAL ALGORITHM Express the coefficients and the right-hand side as an augmented matrix. Go to the left column, get zeros below this front element adding appropriate multiples of the top to the rows below it. The process is done through the following operations: (a) Multiply an equation by a nonzero scalar; (b) Exchange of position two equations; (c) Add to a multiple of another equation.
21. Cover the top row and repeat the above process with the remaining submatrix. Repeat with the rest of the lines (at this point the array is in the form of step).
22. Starting with the last line is not zero, move up: for each row get a 1 up front and introduce zero multiples of this sum for the corresponding rows. Repeat this process until you get an identity matrix, and with this result get the solutions clearing the unknowns
23. EXAMPLE Use the Gauss-Jordan technique to solve: The augmented matrix is:
27. LU DECOMPOSITION The LU decomposition is a matrix decomposition which writes a matrix as the product of a lower triangular matrix and an upper triangular matrix. This decomposition is used in numerical analysis to solve systems of linear equations or calculate the determinant. Row swapping is not allowed. If you swap rows, then an LU decomposition will not exist. It is not necessary to get leading ones on the main diagonal when using Gaussian Elimination. In some matrices, however, it is recommended to get leading ones to use nice row operations. When using Gaussian Elimination to find such an LU decomposition, record all row operations involved. The row operations will help find the lower triangular matrix using the identity matrix. An LU decomposition is not unique. There can be more than one such LU decomposition for a matrix.
28. LU DECOMPOSITION To get the matrix U, just use row operations until an upper triangular matrix is formed. To get L, start with the identity matrix and use the following rules: Any row operations that involves adding a multiple of one row to another, for example, Ri + kRj, put the value –k in the ith-row, jth- column of the identity matrix. Any row operations that involves getting a leading one on the main diagonal, for example, kRi, put the value 1/k in the position of the identity matrix where the leading one occurs. Example: Find an LU decomposition of the following matrix:
29. LU DECOMPOSITION First use Gauss elimination to get the upper triangular matrix: Second Form the lower triangular matrix L by using the rules mentioned above for the row operations involved to get U.
30.
31. LU DECOMPOSITION LU decomposition can also be used to solve system of equations. STEPS TO SOLVE A SYSTEM OF EQUATION USING LU DECOMPOSITION
32. EXAMPLE Solve the following system using an LU decomposition Solution: Set up the equation Ax = b. Find an LU decomposition for A. This will yield the equation (LU)x = b. *Note: We found the LU composition for A earlier. Its given by
33. Let y = Ux. Then solve the equation Ly = b for y. where y = Ux
34. Now solving for y gives the following values: Take the values for y and solve the equation y = Ux for x. This will give the solution to the system Ax = b. The solution is: x1 = 1 x2= -1 x3= 2.
35. THE MATRIX INVERSE Matrix inverse: A and B are nxn matrices. Guess that A∙B=B∙A=In . ThenB iscalledtheinverse of A and isdenotedby A-1. Thusmustbe: Thismethodis a necessarytool for solving systems of linear equations and matrix equations. It represents an alternative operation unable to perform the division of matrices. When A has an inverse, then we say that A is invertible.For a matrix has inverse matrix must meet two conditions: Must be a square matrix. Its determinant must be different from zero A∙ A-1= A-1∙ A=In
37. BIBLIOGRAPHY CHAPRA S., Numerical methods for engineers. Mc Graw Hill Documents from The university of Texas at Dallas. GROSSMAN, Stanley l. Elementary Linear algebra. Mc Graw Hill.