Chapter 4: Linear Algebraic Equations

811 views

Published on

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
811
On SlideShare
0
From Embeds
0
Number of Embeds
103
Actions
Shares
0
Downloads
18
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Chapter 4: Linear Algebraic Equations

  1. 1. CHAPTER IV: LINEAR ALGEBRAIC EQUATIONS<br />Maria FernandaVergara Mendoza<br />Petroleum engineering<br />UIS-COLOMBIA<br />2010<br />
  2. 2. MATHEMATICAL BACKGROUND<br />To study the methods to solve linear algebraic equations it’s necessary to familiarize with matrices.<br />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.<br />Matrices where n=m are called square matrices<br />
  3. 3. MATHEMATICAL BACKGROUND<br />SPECIAL TYPES OF SQUARE MATRICES<br />Symmetric Matrix: aij = aji<br />Diagonal Matrix: All elements off the main diagonal are zero<br />Identity Matrix: Diagonal matrix where all elements on the main diagonal are equal to 1<br />Upper triangular matrix: all elements below the main diagonal are zero<br />
  4. 4. SPECIAL TYPES OF SQUARE MATRICES<br />Lower triangular matrix: All the elements above the main diagonal are zero<br />Banded matrix: all the elements are equal to zero with the exception of a band centered on the main diagonal<br />
  5. 5. MATHEMATICAL BACKGROUND<br />MATRIX OPERATION RULES<br /><ul><li>Addition: The sumA+B of two m-by-n matrices A and B is calculated entry wise: (A + B)i,j = Ai,j + Bi,j
  6. 6. Multiplication: is an m-by-n matrix and B is an n-by-p matrix, then their matrix productAB is the m-by-p matrix whose entries are given by dot product of the corresponding row of A and the corresponding column of B:</li></li></ul><li>MATHEMATICAL BACKGROUND<br />REPRESENTING LINEAR ALGEBRAIC EQUATIONS IN MATRIX FORM<br /> where A is the nxn matrix of coefficients:<br />B is the vector of constants:<br />And X is the vector of unknowns:<br />We must solve the equation for X, one way to obtain a solution is to multiply eachs side by the inverse of A.<br />
  7. 7. Gauss elimination<br />
  8. 8. SOLVING SMALL NUMBERS OF EQUATIONS<br />
  9. 9. 1. The graphical method<br />This method is appropriate for solving small sets of simultaneous equations , n≤3.<br />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). <br />Each equation is a straight line because they are linear equations.<br />Both equations can be solved for x2:<br />
  10. 10. 1. The graphical method<br />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. <br />For example: Use the graphical method to solve<br /> 3x1+2x2=18<br /> -x1+2x2=2<br />Solution: Solvetheeq. For x2<br />Thenweplotthetwolines:<br />Thesolutionis 4, you can checkthis<br />replacing in the x.<br />
  11. 11. 2. Determinants and Cramer’s Rule<br />Determinants: The determinant D of a system is formed from the coefficients of the equation<br />For example, the value of the second order determinant:<br /> Is calculated by:<br />For the third-order case, a single numerical value for the determinant can be computed as<br />
  12. 12. 2. Determinants and Cramer’s Rule<br />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.”<br />For example, x1 would be:<br />
  13. 13. 3. The elimination of unknowns<br />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.<br />For example: Use the elimination of unknowns to solve<br /> Solution:<br />
  14. 14. NAIVE GAUSS ELIMINATION<br />This process is based in two simple steps:<br />
  15. 15. NAIVE GAUSS ELIMINATION<br />Forward Elimination of Unknowns: Reduce the set of equations to an upper triangular system.<br />Back Substitution: Find xn ,this result can be back-substituted into the (n-1) equation, repeat this procedure to evaluate the remaining x’s.<br />Forward <br />elimination<br />Back<br />substitution<br />
  16. 16. EXAMPLE<br />1<br />2<br />
  17. 17. 3<br />
  18. 18. PITFALLS OF ELIMINATION METHODS<br />
  19. 19. GAUSS-JORDAN<br />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.<br />The elimination step results in an identity matrix.<br />It is not necessary to employ back substitution to obtain the solution.<br />
  20. 20. MATHEMATICAL ALGORITHM<br />Express the coefficients and the right-hand side as an augmented matrix. <br />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.<br />
  21. 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).<br />
  22. 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. <br /> Repeat this process until you get an identity matrix, and with this result get the solutions clearing the unknowns<br />
  23. 23. EXAMPLE<br />Use the Gauss-Jordan technique to solve:<br />The augmented matrix is:<br />
  24. 24. Solution:<br />
  25. 25. Solution:<br />
  26. 26. LU DECOMPOSITION AND MATRIX INVERSION<br />
  27. 27. LU DECOMPOSITION<br />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.<br />Row swapping is not allowed. If you swap rows, then an LU decomposition will not exist.<br />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.<br />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.<br />An LU decomposition is not unique. There can be more than one such LU decomposition for a matrix.<br />
  28. 28. LU DECOMPOSITION<br />To get the matrix U, just use row operations until an upper triangular matrix is formed.<br />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.<br />Example: Find an LU decomposition of the following matrix:<br />
  29. 29. LU DECOMPOSITION<br />First use Gauss elimination to get the upper triangular matrix:<br />Second Form the lower triangular matrix L by using the rules mentioned above for the row operations involved to get U.<br />
  30. 30.
  31. 31. LU DECOMPOSITION<br />LU decomposition can also be used to solve system of equations.<br />STEPS TO SOLVE A SYSTEM OF EQUATION USING LU DECOMPOSITION<br />
  32. 32. EXAMPLE<br />Solve the following system using an LU decomposition<br />Solution: <br />Set up the equation Ax = b.<br />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<br />
  33. 33. Let y = Ux. Then solve the equation Ly = b for y.<br />where y = Ux<br />
  34. 34. Now solving for y gives the following values:<br />Take the values for y and solve the equation y = Ux for x. This will give the solution to the system Ax = b.<br />The solution is:<br />x1 = 1<br />x2= -1<br />x3= 2.<br />
  35. 35. THE MATRIX INVERSE<br />Matrix inverse: A and B are nxn matrices. Guess that A∙B=B∙A=In . ThenB iscalledtheinverse of A and isdenotedby A-1. Thusmustbe:<br />Thismethodis a necessarytool for solving systems of linear equations and matrix equations. It represents an alternative operation unable to perform the division of matrices.<br />When A has an inverse, then we say that A is invertible.For a matrix has inverse matrix must meet two conditions:<br />Must be a square matrix.<br />Its determinant must be different from zero<br />A∙ A-1= A-1∙ A=In<br />
  36. 36. Methods to find the inverse of a matrix<br />
  37. 37. BIBLIOGRAPHY<br />CHAPRA S., Numerical methods for engineers. Mc Graw Hill<br />Documents from The university of Texas at Dallas.<br />GROSSMAN, Stanley l. Elementary Linear algebra. Mc Graw Hill. <br />

×