1 / 72

SE301: Numerical Methods Topic 3: Solution of Systems of Linear Equations Lectures 12-17:

SE301: Numerical Methods Topic 3: Solution of Systems of Linear Equations Lectures 12-17:. KFUPM Read Chapter 9 of the textbook. Lecture 12 Vector, Matrices, and Linear Equations. VECTORS. MATRICES. MATRICES. Determinant of a MATRICES. Adding and Multiplying Matrices.

annis
Download Presentation

SE301: Numerical Methods Topic 3: Solution of Systems of Linear Equations Lectures 12-17:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SE301: Numerical MethodsTopic 3:Solution of Systems of Linear EquationsLectures 12-17: KFUPM Read Chapter 9 of the textbook KFUPM

  2. Lecture 12Vector, Matrices, andLinear Equations KFUPM

  3. VECTORS KFUPM

  4. MATRICES KFUPM

  5. MATRICES KFUPM

  6. Determinant of a MATRICES KFUPM

  7. Adding and Multiplying Matrices KFUPM

  8. Systems of Linear Equations KFUPM

  9. Solutions of Linear Equations KFUPM

  10. Solutions of Linear Equations • A set of equations is inconsistent if there exists no solution to the system of equations: KFUPM

  11. Solutions of Linear Equations • Some systems of equations may have infinite number of solutions KFUPM

  12. Graphical Solution of Systems ofLinear Equations solution KFUPM

  13. Cramer’s Rule is Not Practical KFUPM

  14. Lecture 13Naive Gaussian Elimination Naive Gaussian Elimination Examples KFUPM

  15. Naive Gaussian Elimination • The method consists of two steps: • Forward Elimination: the system is reduced to upper triangular form. A sequence of elementary operations is used. • Backward Substitution: Solve the system starting from the last variable. KFUPM

  16. Elementary Row Operations • Adding a multiple of one row to another • Multiply any row by a non-zero constant KFUPM

  17. ExampleForward Elimination KFUPM

  18. ExampleForward Elimination KFUPM

  19. ExampleForward Elimination KFUPM

  20. ExampleBackward Substitution KFUPM

  21. Forward Elimination KFUPM

  22. Forward Elimination KFUPM

  23. Backward Substitution KFUPM

  24. Lecture 14Naive Gaussian Elimination Summary of the Naive Gaussian Elimination Example How to check a solution Problems with Naive Gaussian Elimination Failure due to zero pivot element Error KFUPM

  25. Naive Gaussian Elimination • The method consists of two steps • Forward Elimination: the system is reduced to upper triangular form. A sequence of elementary operations is used. • Backward Substitution: Solve the system starting from the last variable. Solve for xn ,xn-1,…x1. KFUPM

  26. Example 1 KFUPM

  27. Example 1 KFUPM

  28. Example 1Backward Substitution KFUPM

  29. How Do We Know If a Solution is Good or Not • Given AX=B • X is a solution if AX-B=0 • Due to computation error AX-B may not be zero • Compute the residuals R=|AX-B| • One possible test is ????? KFUPM

  30. Determinant KFUPM

  31. How Many Solutions Does a System of Equations AX=B Have? KFUPM

  32. Examples KFUPM

  33. Lectures 15-16:Gaussian Elimination with Scaled Partial Pivoting Problems with Naive Gaussian Elimination Definitions and Initial step Forward Elimination Backward substitution Example KFUPM

  34. Problems with Naive Gaussian Elimination • The Naive Gaussian Elimination may fail for very simple cases. (The pivoting element is zero). • Very small pivoting element may result in serious computation errors KFUPM

  35. Example 2 KFUPM

  36. Example 2Initialization step Scale vector: disregard sign find largest in magnitude in each row KFUPM

  37. Why Index Vector? • Index vectors are used because it is much easier to exchange a single index element compared to exchanging the values of a complete row. • In practical problems with very large N, exchanging the contents of rows may not be practical since they could be stored at different locations. KFUPM

  38. Example 2Forward Elimination--Step 1: eliminate x1 KFUPM

  39. Example 2Forward Elimination--Step 1: eliminate x1 First pivot equation KFUPM

  40. Example 2Forward Elimination--Step 2: eliminate x2 KFUPM

  41. Example 2Forward Elimination--Step 2: eliminate x2 KFUPM

  42. Example 2Forward Elimination--Step 3: eliminate x3 Third pivot equation KFUPM

  43. Example 2Backward Substitution KFUPM

  44. Example 3 KFUPM

  45. Example 3Initialization step KFUPM

  46. Example 3Forward Elimination--Step 1: eliminate x1 KFUPM

  47. Example 3Forward Elimination--Step 1: eliminate x1 KFUPM

  48. Example 3Forward Elimination--Step 2: eliminate x2 KFUPM

  49. Example 3Forward Elimination--Step 2: eliminate x2 KFUPM

  50. Example 3Forward Elimination--Step 2: eliminate x2 KFUPM

More Related