Direct methods

990 views
897 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
990
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Direct methods

  1. 1. DirectMethodstothesolution of linear equationssystems<br />Lizeth Paola Barrero Riaño<br />NumericalMethods – Industrial Univesity of Santander<br />
  2. 2. <ul><li>SymmetricMatrix
  3. 3. TransposesMatrix
  4. 4. Determinant
  5. 5. Upper Triangular Matrix
  6. 6. Lower Triangular Matrix
  7. 7. BandedMatrix
  8. 8. AugmentedMatrix
  9. 9. MatrixMultiplication</li></ul>BASIC FUNDAMENTALS<br />
  10. 10. Matrix<br />A horizontal set of elements is called a row(i) and a vertical set is called a column (j). <br />A matrix consists of a rectangular array of elements represented by a single symbol. As depicted in Figure [A] is the shorthand notation for the matrix and designates an individual element of the matrix.<br />Column 3<br />Row 2<br />
  11. 11. SymmetricMatrix<br />It is a square matrix in which the elements are symmetric about the main diagonal<br />Example:<br />Scalar, diagonal and identity matrices, are symmetric matrices.<br />If A is a symmetric matrix, then:<br />The product is defined and is a symmetric matrix.<br />The sum of symmetric matrices is a symmetric matrix.<br />The product of two symmetric matrices is a symmetric matrix if the matrices commute<br />
  12. 12. TransposesMatrix<br />Letanymatrix A=(aij) of mxnorder, thematrix B=(bij) de ordernxmisthe A transposeifthe A rows are the B columns . This operation is usually denoted by At = A' = B<br />Example:<br />Properties: <br />
  13. 13. Determinant<br />Given a square matrix A of n size, its determinant is defined as the sum of the any matrix line elements product (row or column) chosen, by their corresponding attachments.<br />Example:<br />
  14. 14. Determinant Properties<br />If a matrix has a line (row or column) of zeros, the determinant is zero.<br />If a matrix has two equal rows or proportional, the determinant is null<br />If we permute two parallels lines of a square matrix, its determinant changes sign.<br />If we multiply all elements of a determinant line by a number, the determinant is multiplied by that number.<br />If a matrix line is added another line multiplied by a number, the determinant does not change.<br />The determinant of a matrix is equal to its transpose,<br />If A has inverse matrix, A-1, it is verified that:<br />
  15. 15. Upper and Lower Triangular Matrix<br />Upper Triangular Matrix<br />Lower Triangular Matrix<br />Example:<br />Example:<br />It is a square matrix in which all the items under the main diagonal are zero.<br />It is a square matrix in which all the elements above the main diagonal are zero.<br />
  16. 16. BandedMatrix<br />A band matrix is a sparse matrix whose non-zero entries are confined to a diagonal band, comprising the main diagonal and zero or more diagonals on either side.<br />Example:<br />Diagonal<br />Triadiagonal<br />Pentadiagonal<br />
  17. 17. AugmentedMatrix<br />It is called extended or augmented matrix that is formed by the coefficient matrix and the vector of independent terms, which are usually separated with a dotted line<br />Example:<br />
  18. 18. MatrixMultiplication<br />.<br />To define A ⋅ B is necessary that the number of columns in the first matrix coincides with the number of rows in the second matrix. The product order is given by the number of rows in the first matrix per the number of columns in the second matrix. That is, if A is mxn order and B is nxp order, then C = A ⋅ B is mxp order.<br />theproduct A.Bis<br />Given<br />anothermatrix<br />in whicheachCijisthenth<br />rowproduct of A per thenthcolumn of B, namelythe<br />element<br />
  19. 19. Matrix Multiplication<br />Graphically:<br />Example:<br />
  20. 20. Solution of Linear Algebraic Equation<br />Linear algebra is one of the corner stones of modern computational mathematics. Almost all numerical schemes such as the finite element method and finite difference method are in act techniques that transform, assemble, reduce, rearrange, and/or approximate the differential, integral, or other types of equations to systems of linear algebraic equations.<br />A system of linear algebraic equations can be expressed as<br />
  21. 21. Solution of Linear Algebraic Equation<br />Or:<br />AX=B<br /><ul><li>If the intersected part is a line or a surface, there are an infinite number of solutions, usually expressed by a particular solution added to a linear combination of typically n-m vectors. Otherwise, the solution does not exist.
  22. 22. In this part, we deal with the case of determining the values x1, x2,…,xn that simultaneously satisfy a set of equations.</li></ul>Solving a system with a coefficient matrix is equivalent to finding the intersection point(s) of all m surfaces (lines) in an n dimensional space. <br />If all m surfaces happen to pass through a single point then the solution is unique<br />
  23. 23. Small Systems of Linear Equations<br />GraphicalMethod<br />Cramer’s Rule<br />TheElimination of Unknows<br />
  24. 24. 1. Graphical Method<br />When solving a system with two linear equations in two variables, we are looking for the point where the two lines cross. <br />This can be determined by graphing each line on the same coordinate system and estimating the point of intersection.<br />When two straight lines are graphed, one of three possibilities may result:<br />
  25. 25. Graphical Method<br />When two lines cross in exactly one point, the system is consistent and independent and the solution is the one ordered pair where the two lines cross. The coordinates of this ordered pair can be estimated from the graph of the two lines:<br />Case 1<br />Independent system:<br />one solution point<br />
  26. 26. Graphical Method<br />This graph shows two distinct lines that are parallel. Since parallel lines never cross, then there can be no intersection; that is, for a system of equations that graphs as parallel lines, there can be no solution. This is called an "inconsistent" system of equations, and it has no solution.<br />Case 2<br />Inconsistent system:<br />no solution and<br />no intersection point<br />
  27. 27. Graphical Method<br />This graph appears to show only one line. Actually, it is the same line drawn twice. These "two" lines, really being the same line, "intersect" at every point along their length. This is called a "dependent" system, and the "solution" is the whole line.<br />Case 3<br />Dependent system:<br />the solution is the<br />whole line<br />
  28. 28. Graphical Method<br />ADVANTAGES:<br />The graphical method is good because it clearly illustrates the principle involved. <br />DISADVANTAGES:<br /><ul><li>It does not always give us an exact solution.
  29. 29. It cannot be used when we have more than two variables in the equations. </li></ul>For instance, if the lines cross at a shallow angle it can be just about impossible to tell where the lines cross:<br />
  30. 30. Graphical Method<br />Example<br />Solve the following system by graphing. <br />2x – 3y = –2<br />4x + y = 24<br />First, we must solve each equation for "y=", so we can graph easily:<br /> 2x – 3y = –2 4x + y = 24<br /> 2x + 2 = 3y y = –4x + 24<br /> (2/3)x + (2/3) = y<br />
  31. 31. Graphical Method<br />The second line will be easy to graph using just the slope and intercept, but it is necessary a T-chart for the first line.<br />Solution: (x, y) = (5, 4)<br />
  32. 32. Cramer’s Rule<br />Cramer’s rule is another technique that is best suited to small numbers of equations. This rule states that 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, x1would be computed as<br />
  33. 33. Example<br />Use Cramer’s Rule to solve the system: <br /> 5x – 4y = 2<br />6x – 5y = 1<br />Solution:<br />Webeginbysetting up and evaluatingthethreedeterminants:<br />
  34. 34. Example<br />FromCramer’s Rule, wehave:<br />and<br />Thesolutionis (6,7)<br />Cramer’s Rule doesnotapplyif D=0. When D=0 , thesystemiseitherinconsistentordependent. Anothermethodmustbeusedtosolveit. <br />
  35. 35. TheElimination of Unknows<br />The elimination of unknowns by combing equations is an algebraic approach that can be illustrated for a set of two equations:<br />The basic strategy is to multiply the equations by constants so that of the unknowns will be eliminated when the two equations are combined. The result is a single equation that can be solved for the remaining unknown. This value can then be substituted into either of the original equations to compute the other variable.<br />For example, these equations might be multiplied by a21 and a11 to give<br />
  36. 36. TheElimination of Unknows<br />Subtracting Eq. 3 from 4 will, therefore, eliminate the xt term from the equations to yield<br />Which can be solve for<br />This equation can then be substituted into Eq. 1, which can be solved for<br />
  37. 37. TheElimination of Unknows<br />Notice that these equations follow directly from Cramer’s rule, which states<br />EXAMPLE<br />Use the elimination of unknown to solve,<br />
  38. 38. GaussianElimination<br />Gaussian Elimination is considered the workhorse of computational science for the solution of a system of linear equations. Karl Friedrich Gauss, a great 19th century mathematician, suggested this elimination method as a part of his proof of a particular theorem. Computational scientists use this “proof” as a direct computational method. <br />Gaussian Elimination is a systematic application of elementary row operations to a system of linear equations in order to convert the system to upper triangular form. <br />Once the coefficient matrix is in upper triangular form, we use back substitution to find a solution. <br />
  39. 39. GaussianElimination<br />The general procedure for Gaussian Elimination can be summarized in the following steps: <br />Write the augmented matrix for the system of linear equations. <br />Use elementary row operations on the augmented matrix [A|b] to transform A into upper triangular form. If a zero is located on the diagonal, switch the rows until a nonzero is in that place. If you are unable to do so, stop; the system has either infinite or no solutions. <br />Use back substitution to find the solution of the problem. <br />
  40. 40. GaussianElimination<br />Example<br />1. Write the augmented matrix for the system of linear equations.<br />2.Use elementary row operations on theaugmented matrix [A|b] to transform A into upper triangular form.<br />Change row 1 to row 2<br />and vice versa<br />
  41. 41. GaussianElimination<br />Notice that the original coefficient matrix had a “0” on the diagonal in row 1. Since we needed to use multiples of that diagonal element to eliminate the elements below it, we switched two rows in order to move a nonzero element into that position. We can use the same technique when a “0” appears on the diagonal as a result of calculation. If it is not possible to move a nonzero onto the diagonal by interchanging rows, then the system has either infinitely many solutions or no solution, and the coefficient matrix is said to be singular. <br />Since all of the nonzero elements are now located in the “upper triangle” of the matrix, we have completed the first phase of solving a system of linear equations using Gaussian Elimination.<br />
  42. 42. GaussianElimination<br />The second and final phase of Gaussian Elimination is back substitution. During this phase, we solve for the values of the unknowns, working our way up from the bottom row. <br />3. Use back substitution to find the solution of the problem<br />The last row in the augmented matrix represents the equation:<br />
  43. 43. GaussianElimination<br />The second row of the augmented matrix represents the equation:<br />Finally, the first row of the augmented matrix represents the equation <br />
  44. 44. Gaussian-Jordan Elimination<br />As in Gaussian Elimination, again we are transforming the coefficient matrix into another matrix that is much easier to solve, and the system represented by the new augmented matrix has the same solution set as the original system of linear equations. <br />In Gauss-Jordan Elimination, the goal is to transform the coefficient matrix into a diagonal matrix, and the zeros are introduced into the matrix one column at a time. We work to eliminate the elements both above and below the diagonal element of a given column in one pass through the matrix. <br />
  45. 45. Gaussian-Jordan Elimination<br />The general procedure for Gauss-Jordan Elimination can be summarized in the following steps: <br />Write the augmented matrix for the system of linear equations. <br />Use elementary row operations on the augmented matrix [A|b] to transform A into diagonal form. If a zero is located on the diagonal, switch the rows until a nonzero is in that place. If you are unable to do so, stop; the system has either infinite or no solutions. <br />By dividing the diagonal element and the right-hand-side element in each row by the diagonal element in that row, make each diagonal element equal to one.<br />
  46. 46. Gaussian-Jordan Elimination<br />Example<br />We will apply Gauss-Jordan Elimination to the same example that was used to demonstrate Gaussian Elimination<br />1-Write the augmented matrix for the system of linear equations.<br />2. Use elementary row operations on the augmented matrix [A|b] to transform A into diagonal form.<br />
  47. 47. Gaussian-Jordan Elimination<br />3-By dividing the diagonal element and the right-hand-side element in each row by the diagonal element in that row, make each diagonal element equal to one.<br />Notice that the coefficient matrix is now a diagonal matrix with ones on the diagonal. This is a special matrix called the identity matrix.<br />
  48. 48. LU Decomposition<br />Just as was the case with Gauss elimination, Lu decomposition requires pivoting to avoid division by zero. However, to simplify the following description, we will defer the issue of pivoting until after the fundamental approach is elaborated. In addition, the following explanation is limited to a set of three simultaneous equations. The results can be directly extended to n-dimensional systems.method. <br />Linear algebraic notation can be rearranged to give<br />Suppose that this equation could be expressed as an upper triangular system:<br />Elimination is used to reduce the system to upper triangular form. The above equation can also be expressed in matrix notation and rearranged to give<br />
  49. 49. LU Decomposition<br />Now, assume that there is a lower diagonal matrix with 1’s on the diagonal,<br />That has the property that when Eq. 3 is premultiplied by it, Eq. 1 is the result. That is,<br />If this equation holds, it follows from the rules for matrix multiplication that<br />
  50. 50. LU Decomposition<br />A two-step strategy for obtaining solutions can be based on Eqs. 3, 6 y 7.<br /><ul><li>LU decomposition step. [A] is factored or “decomposed” into lower [L] and upper [U] triangular matrices.
  51. 51. Substitution step. [L] and [U] are used to determine a solution {X} for a right-hand side {B}. This step itself consists of two steps. First, Eq. 7 is used to generate an intermediate vector {D} by forward substitution. Then, the result is substituted into Eq. 3, which can solved by back substitution for [X].</li></ul>In the other hand, Gauss Elimination can be implemented in this way.<br />
  52. 52. Bibliography<br />CHAPRA, Steven. Numerical Methods for engineers. Editorial McGraw-Hill. 2000.<br />http://www.efunda.com/math<br />http://www.purplemath.com<br />http://ceee.rice.edu/Books<br />

×