Solving Linear Systems of Equations
|
|
- Rolf Austin
- 6 years ago
- Views:
Transcription
1 Solving Linear Systems of Equations Gerald Recktenwald Portland State University Mechanical Engineering Department These slides are a supplement to the book Numerical Methods with Matlab: Implementations and Applications, by Gerald W. Recktenwald, c, Prentice-Hall, Upper Saddle River, NJ. These slides are copyright c Gerald W. Recktenwald. The PDF version of these slides may be downloaded or stored or printed only for noncommercial, educational use. The repackaging or sale of these slides in any form, without written consent of the author, is prohibited. The latest version of this PDF file, along with other supplemental material for the book, can be found at or web.cecs.pdx.edu/~gerry/nmm/. Version.88 August, page 1 Primary Topics Basic Concepts Basic Concepts Gaussian Elimination Limitations on Numerical Solutions to Ax = b Factorization Methods Nonlinear Systems of Equations Matrix Formulation Requirements for a Solution Consistency The Role of rank(a) Formal Solution when A is n n NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
2 Pump Curve Model (1) Pump Curve Model () Objective: Find the coefficients of the quadratic equation that approximates the pump curve data. Head (m) Flow rate (m /s) x 1 Model equation: h = c 1 q + c q + c Write the model equation for three points on the curve. This gives three equations for the three unknowns c 1, c, and c. Points from the pump curve: q (m /s) h (m) Substitute each pair of data points into the model equation 11 = c c + c, 11 = 1 8 c c + c, 9. = c c + c, Rewrite in matrix form as c c = c 9. NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Pump Curve Model () Pump Curve Model () Using more compact symbolic notation where Ax = b A = , c 1 11 x = c, b = 11. c 9. In general, for any three (q, h) pairs the system is still Ax = b with q 1 q 1 1 c 1 h 1 A = q q 1, x = c, b = h. q q 1 c h NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
3 Matrix Formulation Thermal Model of an IC Package (1) Recommended Procedure 1. Write the equations in natural form.. Identify unknowns, and order them.. Isolate the unknowns.. Write equations in matrix form. Objective: Find the temperature of an integrated circuit (IC) package mounted on a heat spreader. The system of equations is obtained from a thermal resistive network model. Physical Model: air flow Mathematical Model: Q c Τ c Q 1 Τ p Q R 1 R Τ w T p Tw Q R Q R Q R ambient air at T a Τ a Τ a Τ a NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 9 Thermal Model of an IC Package () Thermal Model of an IC Package () 1. Write the equations in natural form: Use resistive model of heat flow between nodes to get Q 1 = 1 (T c T p ) R 1 Q = 1 (T p T w ) R Q = 1 (T c T a ) R Q = 1 (T p T a ) R Q = 1 (T w T a ) R Q c = Q 1 + Q Q 1 = Q + Q. Identify unknowns, and order them: Unknowns are Q 1, Q, Q, Q, T c, T p, and T w. Thus, Q 1 Q Q x = Q. T c T p T w. Isolate the Unknowns R 1 Q 1 T c + T p =, R Q T p + T w =, R Q T c = T a, R Q T p = T a, R Q T w = T a, Q 1 + Q = Q c, Q 1 Q Q =. NMM: Solving Systems of Equations page 1 NMM: Solving Systems of Equations page 11
4 Thermal Model of an IC Package () Requirements for a Solution. Write in Matrix Form R 1 1 R 1 R R R Q 1 Q Q Q T c T p T w T a = T a T a Q c 1. Consistency. The Role of rank(a). Formal Solution when A is n n. Summary Note: The coefficient matrix has many more zeros than non-zeros. This is an example of a sparse matrix. NMM: Solving Systems of Equations page 1 NMM: Solving Systems of Equations page 1 Consistency (1) Consistency () If an exact solution to Ax = b exists, b must lie in the column space of A. Ifitdoes, then the system is said to be consistent. If the system is consistent, an exact solution exists. rank(a) gives the number of linearly independent columns in A [A b] is the augmented matrix formed by combining the b vector with the columns of A. a 11 a 1 a 1,n b 1 [A b]= a 1 a a,n.. b.... a m,1 a m, a n,n b n If rank([a b]) > rank(a) then b does not lie in the column space of A. Inother words, since [A b] has a larger set of basis vectors than A, and since the difference in the size of the basis set is solely due to the b vector, the b vector cannot be constructed from the column vectors of A. NMM: Solving Systems of Equations page 1 NMM: Solving Systems of Equations page 1
5 Role of rank(a) Summary of Solution to Ax = b where A is m n If A is m n, and z is an n-element column vector, then Az =has a nontrivial solution only if the columns of A are linearly dependent 1. In other words, the only solution to Az =is z =when A is full rank. Given the m n matrix A, the system Ax = b has a unique solution if the system is consistent and if rank(a) =n. For the general case where A is m n and m n, If rank(a) =n and the system is consistent, the solution exists and it is unique. If rank(a) =n and the system is inconsistent, no solution exists. If rank(a) <nand the system is consistent, an infinite number of solutions exist. If A is n n and rank(a) =n, then the system is consistent and the solution is unique. 1 isthem-element column vector filled with zeros NMM: Solving Systems of Equations page 1 NMM: Solving Systems of Equations page 1 Formal Solution when A is n n Formal Solution when A is n n The formal solution to Ax = b is x = A b where A is n n. If A exists then A is said to be nonsingular. If A does not exist then A issaidtobesingular. If A exists then but Ax = b = x = A b Do not compute the solution to Ax = b by finding A, and then multiplying b by A! We see: We do: x = A b Solve Ax = b by Gaussian elimination or an equivalent algorithm NMM: Solving Systems of Equations page 18 NMM: Solving Systems of Equations page 19
6 Singularity of A Summary of Requirements for Solution of Ax = b If an n n matrix, A, issingular then the columns of A are linearly dependent therowsofa are linearly dependent rank(a) <n det(a) = A does not exist a solution to Ax = b may not exist If a solution to Ax = b exists, it is not unique Given the n n matrix A and the n 1 vector, b the solution to Ax = b exists and is unique for any b if and only if rank(a) =n. rank(a) =n automatically guarantees that the system is consistent. NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page 1 Gaussian Elimination Solving Diagonal Systems (1) Solving Diagonal Systems Solving Triangular Systems Gaussian Elimination Without Pivoting Hand Calculations Cartoon Version The Algorithm Gaussian Elimination with Pivoting Row or Column Interchanges, or Both Implementation Solving Systems with the Backslash Operator The system defined by 1 A = b = NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
7 Solving Diagonal Systems (1) Solving Diagonal Systems (1) The system defined by 1 A = b = The system defined by 1 A = b = is equivalent to x 1 = x = x = is equivalent to The solution is x 1 = x = x = x 1 = x = = x = = NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Solving Diagonal Systems () Triangular Systems (1) Algorithm 8.1 given A, b for i =1...n x i = b i /a i,i end In Matlab: >> A =... % A is a diagonal matrix >> b =... >> x = b./diag(a) This is the only place where element-by-element division (.*) has anything to do with solving linear systems of equations. The generic lower and upper triangular matrices are and The triangular systems l 11 L = l 1 l..... l n1 l nn u 11 u 1 u 1n U = u u n..... u nn Ly = b Ux = c are easily solved by forward substitution and backward substitution, respectively NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
8 Solving Triangular Systems () Solving Triangular Systems () 1 A = b = 9 8 is equivalent to 1 A = b = 9 8 x 1 + x + x = 9 x + x = x = 8 NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 9 Solving Triangular Systems () Solving Triangular Systems () is equivalent to 1 A = b = 9 8 x 1 + x + x = 9 x + x = x = 8 is equivalent to 1 A = b = 9 8 x 1 + x + x = 9 x + x = x = 8 Solve in backward order (last equation is solved first) x = 8 = Solve in backward order (last equation is solved first) x = 8 = x = 1 ( +x )= =1 NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page 1
9 Solving Triangular Systems () Solving Triangular Systems () is equivalent to 1 A = b = 9 8 x 1 + x + x = 9 x + x = x = 8 Solve in backward order (last equation is solved first) x = 8 = x = 1 ( +x )= =1 x 1 = 1 (9 x x )= = Solving for x n,x n,...,x 1 for an upper triangular system is called backward substitution. Algorithm 8. given U, b x n = b n /u nn for i = n s = b i for j = i +1...n s = s u i,j x j end x i = s/u i,i end NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Solving Triangular Systems (8) Gaussian Elimination Solving for x 1,x,...,x n for a lower triangular system is called forward substitution. Algorithm 8. given L, b x 1 = b 1 /l 11 for i =...n s = b i for j =1...i 1 s = s l i,j x j end x i = s/l i,i end Goal is to transform an arbitrary, square system into the equivalent upper triangular system so that it may be easily solved with backward substitution. The formal solution to Ax = b, wherea is an n n matrix is In Matlab: >> A =... >> b =... >> x = A\b x = A b Using forward or backward substitution is sometimes referred to as performing a triangular solve. NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
10 Gaussian Elimination Hand Calculations (1) Gaussian Elimination Hand Calculations () Solve The elimination phase transforms the matrix and right hand side to an equivalent system x 1 +x = x 1 +x = x 1 +x = x 1 +x = x 1 +x = x = Subtract times the first equation from the second equation x 1 +x = x = This equation is now in triangular form, and can be solved by backward substitution. The two systems have the same solution. The right hand system is upper triangular. Solve the second equation for x x = = Substitute the newly found value of x into the first equation and solve for x 1. x 1 = ()() = NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Gaussian Elimination Hand Calculations () Gaussian Elimination Hand Calculations () When performing Gaussian Elimination by hand, we can avoid copying the x i by using a shorthand notation. For example, to solve: A = b = Form the augmented system à =[A b]= Add times row 1 to row, and add (1 times) row 1 to row à (1) = Subtract (1 times) row from row à () = 9 9 The vertical bar inside the augmented matrix is just a reminder that the last column is the b vector. NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 9
11 Gaussian Elimination Hand Calculations () The transformed system is now in upper triangular form à () = 9 Solve by back substitution to get x = = x = 1 ( 9 x )= x 1 = 1 ( x + x )= Gaussian Elimination Cartoon Version (1) Start with the augmented system The xs represent numbers, they are not necessarily the same values. Begin elimination using the first row as the pivot row and the first element of the first row as the pivot element NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page 1 Gaussian Elimination Cartoon Version () Eliminate elements under the pivot element in the first column. x indicates a value that has been changed once. x x x x x x x x x x x x x x x x x x x x x x x x Gaussian Elimination Cartoon Version () The pivot element is now the diagonal element in the second row. Eliminate elements under the pivot element in the second column. x indicates a value that has been changed twice. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
12 Gaussian Elimination Cartoon Version () Gaussian Elimination Cartoon Version () The pivot element is now the diagonal element in the third row. Eliminate elements under the pivot element in the third column. x indicates a value that has been changed three times. x x x x x x x x x x x x x x x x x x x Summary Gaussian Elimination is an orderly process of transforming an augmented matrix into an equivalent upper triangular form. The elimination operation is Elimination requires three nested loops. ã kj =ã kj (ã ki /ã ii )ã ij The result of the elimination phase is represented by the image below. x x x x x x x x x NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Gaussian Elimination Algorithm The Need for Pivoting (1) Algorithm 8. form à =[A b] for i =1...n 1 for k = i +1...n for j = i...n+1 ã kj =ã kj (ã ki /ã ii )ã ij end end end GEshow: The GEshow function in the NMM toolbox uses Gaussian elimination to solve a system of equations. GEshow is intended for demonstration purposes only. Solve: A = 1 8 b = 1 Note that there is nothing wrong with this system. A is full rank. The solution exists and is unique. Form the augmented system NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
13 The Need for Pivoting () The Need for Pivoting () Subtract 1/ times the first row from the second row, add / times the first row to the third row, add 1/ times the first row to the fourth row. The result of these operations is: 1 The next stage of Gaussian elimination will not work because there is a zero in the pivot location, ã. Swap second and fourth rows of the augmented matrix. 1 Continue with elimination: subtract (1 times) row from row. NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 9 The Need for Pivoting () Pivoting Strategies Another zero has appear in the pivot position. Swap row and row. The augmented system is now ready for backward substitution. Partial Pivoting: Exchange only rows Exchanging rows does not affect the order of the x i For increased numerical stability, make sure the largest possible pivot element is used. This requires searching in the partial column below the pivot element. Partial pivoting is usually sufficient. NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page 1
14 Partial Pivoting Pivoting Strategies () To avoid division by zero, swap the row having the zero pivot with one of the rows below it. Full (or Complete) Pivoting: Exchange both rows and columns * Rows completed in forward elimination. Row with zero pivot element Rows to search for a more favorable pivot element. Column exchange requires changing the order of the x i For increased numerical stability, make sure the largest possible pivot element is used. This requires searching in the pivot row, and in all rows below the pivot row, starting the pivot column. Full pivoting is less susceptible to roundoff, but the increase in stability comes at a cost of more complex programming (not a problem if you use a library routine) and an increase in work associated with searching and data movement. To minimize the effect of roundoff, always choose the row that puts the largest pivot element on the diagonal, i.e., find i p such that a ip,i = max( a k,i ) for k = i,...,n NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Full Pivoting Gauss Elimination with Partial Pivoting * Columns to search for a more favorable pivot element. * Rows completed in forward elimination. Row with zero pivot element Rows to search for a more favorable pivot element. Algorithm 8. form à =[A b] for i =1...n 1 find i p such that max( ã ipi ) max( ã ki ) for k = i...n exchange row i p with row i for k = i +1...n for j = i...n+1 ã k,j =ã k,j (ã k,i /ã i,i )ã i,j end end end NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
15 Gauss Elimination with Partial Pivoting The Backslash Operator (1) GEshow: The GEshow function in the NMM toolbox uses naive Gaussian elimination without pivoting to solve a system of equations. GEpivshow: The GEpivshow function in the NMM toolbox uses Gaussian elimination with partial pivoting to solve a system of equations. GEpivshow is intended for demonstration purposes only. GEshow and GEpivshow are for demonstration purposes only. They are also a convenient way to check your hand calculations. Consider the scalar equation x = = x =() The extension to a system of equations is, of course Ax = b = x = A b where A b is the formal solution to Ax = b In Matlab notation the system is solved with x = A\b NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page The Backslash Operator () Limits on Numerical Solution to Ax = b Given an n n matrix A, and an n 1 vector b the \ operator performs a sequence of tests on the A matrix. Matlab attempts to solve the system with the method that gives the least roundoff and the fewest operations. When A is an n n matrix: 1. Matlab examines A to see if it is a permutation of a triangular system If so, the appropriate triangular solve is used. Machine Limitations RAM requirements grow as O(n ) flop count grows as O(n ) The time for data movement is an important speed bottleneck on modern systems. Matlab examines A to see if it appears to be symmetric and positive definite. If so, Matlab attempts a Cholesky factorization and two triangular solves.. If the Cholesky factorization fails, or if A does not appear to be symmetric, Matlab attempts an LU factorization and two triangular solves. NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 9
16 cache FPU internal bus CPU system bus RAM Data Access Time: shortest Limits on Numerical Solution to Ax = b Limits of Floating Point Arithmetic Exact singularity Effect of perturbations to b Effect of perturbations to A The condition number Stand alone computer Disk network Computer Computer Computer longest NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page 1 Geometric Interpretation of Singularity (1) Geometric Interpretation of Singularity () Consider a system describing two lines that intersect The matrix form of this equation is» 1 / 1 y = x + y = 1 x +1» x1 x =» 1 The equations for two parallel but not intersecting lines are»»» 1 x1 = 1 x The equations for two parallel and coincident lines are» 1 1» x1 x The equations for two nearly parallel lines are» 1 +δ 1» x1 x =»» = +δ Here the coefficient matrix is singular (rank(a) =1), and the system is inconsistent NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
17 Geometric Interpretation of Singularity () Effect of Perturbations to b 8 A and b are consistent A is nonsingular 1 8 A and b are consistent A is singular 1 8 A and b are inconsistent A is singular 1 8 A and b are consistent A is ill conditioned 1 Consider the solution of a system where One expects that the exact solutions to» 1 Ax = /» 1 b = /» 1 and Ax =. will be different. Should these solutions be a lot different or a little different? NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Perturb b with δb such that The perturbed system is The perturbations satisfy Effect of Perturbations to b δb b 1, A(x + δx b )=b + δb Aδx b = δb Analysis shows (see next two slides for proof) that δx b x A A δb b Thus, the effect of the perturbation is small only if A A is small. Effect of Perturbations to b (Proof) Let x + δx b be the exact solution to the perturbed system A(x + δx b )=b + δb (1) Expand Ax + Aδx b = b + δb Subtract Ax from left side and b from right side since Ax = b Aδx b = δb Left multiply by A δx b = A δb () δx b x 1 only if A A 1 NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
18 Effect of Perturbations to b (Proof, p. ) Effect of Perturbations to b (Proof) Take norm of equation () δx b = A δb Applying consistency requirement of matrix norms δx A δb () Similarly, Ax = b gives b = Ax, and b A x () Multiply Equation () by Equation () to get δx b x A A δb b Summary: If x + δx b is the exact solution to the perturbed system A(x + δx b )=b + δb () Rearrangement of equation () yields 1 x A b () then δx b x A A δb b NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 9 Effect of Perturbations to A Effect of Perturbations to both A and b Perturb both A with δa and b with δb such that Perturb A with δa such that The perturbed system is Analysis shows that δa A 1, (A + δa)(x + δx A )=b δx A x + δx A A A δa A Thus, the effect of the perturbation is small only if A A is small. δx A x + δx A 1 only if A A 1 The perturbation satisfies Analysis shows that δa δb A 1 and b 1 (A + δa)(x + δx) =b + δb δx x + δx A A 1 A A δa A» δa A + δb b Thus, the effect of the perturbation is small only if A A is small. δx x + δx 1 only if A A 1 NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page 1
19 Condition number of A Computational Stability The condition number κ(a) A A indicates the sensitivity of the solution to perturbations in A and b. The condition number can be measured with any p-norm. The condition number is always in the range 1 κ(a) κ(a) is a mathematical property of A Any algorithm will produce a solution that is sensitive to perturbations in A and b if κ(a) is large. In exact math a matrix is either singular or non-singular. κ(a) = for a singular matrix κ(a) indicates how close A is to being numerically singular. Amatrixwithlargeκ issaidtobeill-conditioned In Practice, applying Gaussian elimination with partial pivoting and back substitution to Ax = b gives the exact solution, ˆx, to the nearby problem (A + E)ˆx = b where E ε m A Gaussian elimination with partial pivoting and back substitution gives exactly the right answer to nearly the right question. Trefethen and Bau NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Computational Stability The Residual An algorithm that gives the exact answer to a problem that is near to the original problem issaidtobebackward stable. Algorithms that are not backward stable will tend to amplify roundoff errors present in the original data. As a result, the solution produced by an algorithm that is not backward stable will not necessarily be the solution to a problem that is close to the original problem. Gaussian elimination without partial pivoting is not backward stable for arbitrary A. IfA is symmetric and positive definite, then Gaussian elimination without pivoting in backward stable. Let ˆx be the numerical solution to Ax = b. ˆx x (x is the exact solution) because of roundoff. The residual measures how close ˆx is to satisfying the original equation It is not hard to show that ˆx x ˆx r = b Aˆx κ(a) r b Small r does not guarantee a small ˆx x. If κ(a) is large the ˆx returned by Gaussian elimination and back substitution (or any other solution method) is not guaranteed to be anywhere near the true solution to Ax = b. NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page
20 Rules of Thumb (1) Rules of Thumb () Applying Gaussian elimination with partial pivoting and back substitution to Ax = b yields a numerical solution ˆx such that the residual vector r = b Aˆx is small even if the κ(a) is large. If A and b are stored to machine precision ε m, the numerical solution to Ax = b by any variant of Gaussian elimination is correct to d digits where d = log 1 (ε m ) log 1 (κ(a)) d = log 1 (ε m ) log 1 (κ(a)) Example: Matlab computations have ε m. 1. For a system with κ(a) 1 1 the elements of the solution vector will have d = log 1 (. 1 ) log =11 = correct digits NMM: Solving Systems of Equations page NMM: Solving Systems of Equations page Summary of Limits to Numerical Solution of Ax = b Factorization Methods 1. κ(a) indicates how close A is to being numerically singular. If κ(a) is large, A is ill-conditioned and even the best numerical algorithms will produce a solution, ˆx that cannot be guaranteed to be close to the true solution, x. In practice, Gaussian elimination with partial pivoting and back substitution produces a solution with a small residual r = b Aˆx even if κ(a) is large. LU factorization Cholesky factorization Use of the backslash operator NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 9
21 LU Factorization (1) Find L and U such that A = LU and L is lower triangular, and U is upper triangular. 1 l,1 1 L = l,1 l, l n,1 l n, ln 1,n 1 u 1,1 u 1, u 1, u 1,n u, u, u,n U = u n,n u n,n Since L and U are triangular, it is easy to apply their inverses. LU Factorization () Since L and U are triangular, it is easy to apply their inverses. Consider the solution to Ax = b. Regroup, matrix multiplication is associative A = LU = (LU)x = b L(Ux)=b Let Ux = y, then Ly = b Since L is triangular it is easy (without Gaussian elimination) to compute y = L b This expression should be interpreted as Solve Ly = b with a forward substitution. NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 81 LU Factorization () LU Factorization () Now, since y is known, solve for x x = U y which is interpreted as Solve Ux = y with a backward substitution. Algorithm 8. Solve Ax = b with LU factorization Factor A into L and U Solve Ly = b for y use forward substitution Solve Ux = y for x use backward substitution NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 8
22 The Built-in lu Function Cholesky Factorization (1) Refer to lunopiv and lupiv functions in the NMM toolbox for expository implementations of LU factorization Use the built-in lu function for routine work A must be symmetric and positive definite (SPD) For SPD matrices, pivoting is not required Cholesky factorization requires one half as many flops as LU factorization. Since pivoting is not required, Cholesky factorization will be more than twice as fast as LU factorization since data movement is avoided. Refer to the Cholesky function in NMM Toolbox for a view of the algorithm Use built-in chol function for routine work NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 8 Backslash Redux Nonlinear Systems of Equations The \ operator examines the coefficient matrix before attempting to solve the system. \ uses: A triangular solve if A is triangular, or a permutation of a triangular matrix Cholesky factorization and triangular solves if A is symmetric and the diagonal elements of A are positive (and if the subsequent Cholesky factorization does not fail.) LU factorization if A is square and the preceding conditions are not met. QR factorization to obtain the least squares solution if A is not square. The system of equations Ax = b is nonlinear if A = A(x) or b = b(x) Characteristics of nonlinear systems Solution requires iteration Each iteration involves the work of solving a related linearized system of equations For strongly nonlinear systems it may be difficult to get the iterations to converge Multiple solutions might exist NMM: Solving Systems of Equations page 8 NMM: Solving Systems of Equations page 8
23 Nonlinear Systems of Equations Nonlinear Systems of Equations Example: Intersection of a parabola and a line or, using x 1 = x, x = y y = αx + β y = x + σx + τ αx 1 x = β (x 1 + σ)x 1 x = τ which can be expressed in matrix notation as» α x 1 + σ The coefficient matrix, A depends on x» x1 x =» β τ Graphical Interpretation of solutions to:» α x 1 + σ» x1 x =» β τ Change values of α and β to get Two distinct solutions - - One solution sensitive to inputs One solution - - No solution - - NMM: Solving Systems of Equations page 88 NMM: Solving Systems of Equations page 89 Newton s Method for Nonlinear Systems (1) Newton s Method for Nonlinear Systems () Given where A is n n, write Note: f = r Ax = b f = Ax b The solution is obtained when f 1 (x 1,x,...,x n )) f(x) = f (x 1,x,...,x n )). =. f n (x 1,x,...,x n )) Let x (k) be the guess at the solution for iteration k Look for Δx (k) so that x (k+1) = x (k) +Δx (k) f(x (k+1) )= Expand f with the multidimensional Taylor Theorem f(x (k+1) )=f(x (k) )+f (x (k) )Δx (k) + O Δx (k) NMM: Solving Systems of Equations page 9 NMM: Solving Systems of Equations page 91
24 Newton s Method for Nonlinear Systems () Newton s Method for Nonlinear Systems () f (x (k) ) is the Jacobian of the system of equations f 1 f 1 x 1 x f f f (x) J(x) = x 1 x.... f n f n x 1 x Neglect the higher order terms in the Taylor expansion f(x (k+1) )=f(x (k) )+J(x (k) )Δx (k) f 1 x n f x n f n x n Now, assume that we can find the Δx (k) that gives f(x (k+1) )= =f(x (k) )+J(x (k) )Δx (k) = J(x (k) )Δx (k) = f(x (k) ) The essence of Newton s method for systems of equations is 1. Make a guess at x. Evaluate f. If f is small enough, stop. Evaluate J. solve J Δx = f for Δx. update: x x +Δx. Go back to step NMM: Solving Systems of Equations page 9 NMM: Solving Systems of Equations page 9 Newton s Method for Nonlinear Systems () Newton s Method for Nonlinear Systems () Example: Intersection of a line and parabola y = αx + β y = x + σx + τ Recast as αx 1 x + β = x 1 + σx 1 x + τ = Evaluate each term in the Jacobian f 1 x 1 = α therefore f x 1 =x 1 + σ f 1 x = f x =» α J = (x 1 + σ) or» αx1 x f = + β x 1 + σx = 1 x + τ» NMM: Solving Systems of Equations page 9 NMM: Solving Systems of Equations page 9
Lecture 9. Errors in solving Linear Systems. J. Chaudhry (Zeb) Department of Mathematics and Statistics University of New Mexico
Lecture 9 Errors in solving Linear Systems J. Chaudhry (Zeb) Department of Mathematics and Statistics University of New Mexico J. Chaudhry (Zeb) (UNM) Math/CS 375 1 / 23 What we ll do: Norms and condition
More informationLecture 7. Gaussian Elimination with Pivoting. David Semeraro. University of Illinois at Urbana-Champaign. February 11, 2014
Lecture 7 Gaussian Elimination with Pivoting David Semeraro University of Illinois at Urbana-Champaign February 11, 2014 David Semeraro (NCSA) CS 357 February 11, 2014 1 / 41 Naive Gaussian Elimination
More informationA Review of Linear Algebra
A Review of Linear Algebra Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab: Implementations
More informationNumerical Methods I Solving Square Linear Systems: GEM and LU factorization
Numerical Methods I Solving Square Linear Systems: GEM and LU factorization Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 September 18th,
More informationLinear Algebraic Equations
Linear Algebraic Equations 1 Fundamentals Consider the set of linear algebraic equations n a ij x i b i represented by Ax b j with [A b ] [A b] and (1a) r(a) rank of A (1b) Then Axb has a solution iff
More informationComputational Methods. Systems of Linear Equations
Computational Methods Systems of Linear Equations Manfred Huber 2010 1 Systems of Equations Often a system model contains multiple variables (parameters) and contains multiple equations Multiple equations
More informationFinding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University
Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:
More informationFinding the Roots of f(x) = 0
Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:
More informationCOURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.
COURSE 9 4 Numerical methods for solving linear systems Practical solving of many problems eventually leads to solving linear systems Classification of the methods: - direct methods - with low number of
More informationReview Questions REVIEW QUESTIONS 71
REVIEW QUESTIONS 71 MATLAB, is [42]. For a comprehensive treatment of error analysis and perturbation theory for linear systems and many other problems in linear algebra, see [126, 241]. An overview of
More informationLU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b
AM 205: lecture 7 Last time: LU factorization Today s lecture: Cholesky factorization, timing, QR factorization Reminder: assignment 1 due at 5 PM on Friday September 22 LU Factorization LU factorization
More informationScientific Computing: Dense Linear Systems
Scientific Computing: Dense Linear Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Spring 2012 February 9th, 2012 A. Donev (Courant Institute)
More informationLU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark
DM559 Linear and Integer Programming LU Factorization Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark [Based on slides by Lieven Vandenberghe, UCLA] Outline
More informationApplied Mathematics 205. Unit II: Numerical Linear Algebra. Lecturer: Dr. David Knezevic
Applied Mathematics 205 Unit II: Numerical Linear Algebra Lecturer: Dr. David Knezevic Unit II: Numerical Linear Algebra Chapter II.2: LU and Cholesky Factorizations 2 / 82 Preliminaries 3 / 82 Preliminaries
More information5 Solving Systems of Linear Equations
106 Systems of LE 5.1 Systems of Linear Equations 5 Solving Systems of Linear Equations 5.1 Systems of Linear Equations System of linear equations: a 11 x 1 + a 12 x 2 +... + a 1n x n = b 1 a 21 x 1 +
More informationNumerical Methods - Numerical Linear Algebra
Numerical Methods - Numerical Linear Algebra Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Numerical Linear Algebra I 2013 1 / 62 Outline 1 Motivation 2 Solving Linear
More informationThe Solution of Linear Systems AX = B
Chapter 2 The Solution of Linear Systems AX = B 21 Upper-triangular Linear Systems We will now develop the back-substitution algorithm, which is useful for solving a linear system of equations that has
More informationAM 205: lecture 6. Last time: finished the data fitting topic Today s lecture: numerical linear algebra, LU factorization
AM 205: lecture 6 Last time: finished the data fitting topic Today s lecture: numerical linear algebra, LU factorization Unit II: Numerical Linear Algebra Motivation Almost everything in Scientific Computing
More informationScientific Computing
Scientific Computing Direct solution methods Martin van Gijzen Delft University of Technology October 3, 2018 1 Program October 3 Matrix norms LU decomposition Basic algorithm Cost Stability Pivoting Pivoting
More information14.2 QR Factorization with Column Pivoting
page 531 Chapter 14 Special Topics Background Material Needed Vector and Matrix Norms (Section 25) Rounding Errors in Basic Floating Point Operations (Section 33 37) Forward Elimination and Back Substitution
More informationChapter 2 - Linear Equations
Chapter 2 - Linear Equations 2. Solving Linear Equations One of the most common problems in scientific computing is the solution of linear equations. It is a problem in its own right, but it also occurs
More informationAM 205: lecture 6. Last time: finished the data fitting topic Today s lecture: numerical linear algebra, LU factorization
AM 205: lecture 6 Last time: finished the data fitting topic Today s lecture: numerical linear algebra, LU factorization Unit II: Numerical Linear Algebra Motivation Almost everything in Scientific Computing
More informationNumerical Analysis FMN011
Numerical Analysis FMN011 Carmen Arévalo Lund University carmen@maths.lth.se Lecture 4 Linear Systems Ax = b A is n n matrix, b is given n-vector, x is unknown solution n-vector. A n n is non-singular
More informationLinear Systems of n equations for n unknowns
Linear Systems of n equations for n unknowns In many application problems we want to find n unknowns, and we have n linear equations Example: Find x,x,x such that the following three equations hold: x
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 2 Systems of Linear Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction
More informationDirect Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le
Direct Methods for Solving Linear Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview General Linear Systems Gaussian Elimination Triangular Systems The LU Factorization
More informationOutline. Math Numerical Analysis. Errors. Lecture Notes Linear Algebra: Part B. Joseph M. Mahaffy,
Math 54 - Numerical Analysis Lecture Notes Linear Algebra: Part B Outline Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences
More informationCS227-Scientific Computing. Lecture 4: A Crash Course in Linear Algebra
CS227-Scientific Computing Lecture 4: A Crash Course in Linear Algebra Linear Transformation of Variables A common phenomenon: Two sets of quantities linearly related: y = 3x + x 2 4x 3 y 2 = 2.7x 2 x
More informationGaussian Elimination for Linear Systems
Gaussian Elimination for Linear Systems Tsung-Ming Huang Department of Mathematics National Taiwan Normal University October 3, 2011 1/56 Outline 1 Elementary matrices 2 LR-factorization 3 Gaussian elimination
More informationLinear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4
Linear Algebra Section. : LU Decomposition Section. : Permutations and transposes Wednesday, February 1th Math 01 Week # 1 The LU Decomposition We learned last time that we can factor a invertible matrix
More information1.Chapter Objectives
LU Factorization INDEX 1.Chapter objectives 2.Overview of LU factorization 2.1GAUSS ELIMINATION AS LU FACTORIZATION 2.2LU Factorization with Pivoting 2.3 MATLAB Function: lu 3. CHOLESKY FACTORIZATION 3.1
More informationMatrix decompositions
Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers
More informationLecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 2. Systems of Linear Equations
Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 2 Systems of Linear Equations Copyright c 2001. Reproduction permitted only for noncommercial,
More informationScientific Computing: Solving Linear Systems
Scientific Computing: Solving Linear Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Spring 2012 September 17th and 24th, 2015 A. Donev (Courant
More informationRoundoff Analysis of Gaussian Elimination
Jim Lambers MAT 60 Summer Session 2009-0 Lecture 5 Notes These notes correspond to Sections 33 and 34 in the text Roundoff Analysis of Gaussian Elimination In this section, we will perform a detailed error
More informationNumerical Linear Algebra
Numerical Linear Algebra Decompositions, numerical aspects Gerard Sleijpen and Martin van Gijzen September 27, 2017 1 Delft University of Technology Program Lecture 2 LU-decomposition Basic algorithm Cost
More informationProgram Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects
Numerical Linear Algebra Decompositions, numerical aspects Program Lecture 2 LU-decomposition Basic algorithm Cost Stability Pivoting Cholesky decomposition Sparse matrices and reorderings Gerard Sleijpen
More informationExample: Current in an Electrical Circuit. Solving Linear Systems:Direct Methods. Linear Systems of Equations. Solving Linear Systems: Direct Methods
Example: Current in an Electrical Circuit Solving Linear Systems:Direct Methods A number of engineering problems or models can be formulated in terms of systems of equations Examples: Electrical Circuit
More informationMTH 464: Computational Linear Algebra
MTH 464: Computational Linear Algebra Lecture Outlines Exam 2 Material Prof. M. Beauregard Department of Mathematics & Statistics Stephen F. Austin State University February 6, 2018 Linear Algebra (MTH
More informationDense LU factorization and its error analysis
Dense LU factorization and its error analysis Laura Grigori INRIA and LJLL, UPMC February 2016 Plan Basis of floating point arithmetic and stability analysis Notation, results, proofs taken from [N.J.Higham,
More informationMATH 3511 Lecture 1. Solving Linear Systems 1
MATH 3511 Lecture 1 Solving Linear Systems 1 Dmitriy Leykekhman Spring 2012 Goals Review of basic linear algebra Solution of simple linear systems Gaussian elimination D Leykekhman - MATH 3511 Introduction
More information6 Linear Systems of Equations
6 Linear Systems of Equations Read sections 2.1 2.3, 2.4.1 2.4.5, 2.4.7, 2.7 Review questions 2.1 2.37, 2.43 2.67 6.1 Introduction When numerically solving two-point boundary value problems, the differential
More information2.1 Gaussian Elimination
2. Gaussian Elimination A common problem encountered in numerical models is the one in which there are n equations and n unknowns. The following is a description of the Gaussian elimination method for
More informationCME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6
CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6 GENE H GOLUB Issues with Floating-point Arithmetic We conclude our discussion of floating-point arithmetic by highlighting two issues that frequently
More informationIntroduction to Numerical Analysis
Université de Liège Faculté des Sciences Appliquées Introduction to Numerical Analysis Edition 2015 Professor Q. Louveaux Department of Electrical Engineering and Computer Science Montefiore Institute
More informationPractical Linear Algebra: A Geometry Toolbox
Practical Linear Algebra: A Geometry Toolbox Third edition Chapter 12: Gauss for Linear Systems Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/pla
More informationNext topics: Solving systems of linear equations
Next topics: Solving systems of linear equations 1 Gaussian elimination (today) 2 Gaussian elimination with partial pivoting (Week 9) 3 The method of LU-decomposition (Week 10) 4 Iterative techniques:
More informationIntroduction to Mathematical Programming
Introduction to Mathematical Programming Ming Zhong Lecture 6 September 12, 2018 Ming Zhong (JHU) AMS Fall 2018 1 / 20 Table of Contents 1 Ming Zhong (JHU) AMS Fall 2018 2 / 20 Solving Linear Systems A
More information1 Backward and Forward Error
Math 515 Fall, 2008 Brief Notes on Conditioning, Stability and Finite Precision Arithmetic Most books on numerical analysis, numerical linear algebra, and matrix computations have a lot of material covering
More informationReview of matrices. Let m, n IN. A rectangle of numbers written like A =
Review of matrices Let m, n IN. A rectangle of numbers written like a 11 a 12... a 1n a 21 a 22... a 2n A =...... a m1 a m2... a mn where each a ij IR is called a matrix with m rows and n columns or an
More informationLECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel
LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count
More informationAx = b. Systems of Linear Equations. Lecture Notes to Accompany. Given m n matrix A and m-vector b, find unknown n-vector x satisfying
Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T Heath Chapter Systems of Linear Equations Systems of Linear Equations Given m n matrix A and m-vector
More informationCHAPTER 6. Direct Methods for Solving Linear Systems
CHAPTER 6 Direct Methods for Solving Linear Systems. Introduction A direct method for approximating the solution of a system of n linear equations in n unknowns is one that gives the exact solution to
More informationLinear System of Equations
Linear System of Equations Linear systems are perhaps the most widely applied numerical procedures when real-world situation are to be simulated. Example: computing the forces in a TRUSS. F F 5. 77F F.
More informationMatrix decompositions
Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers
More informationNUMERICAL MATHEMATICS & COMPUTING 7th Edition
NUMERICAL MATHEMATICS & COMPUTING 7th Edition Ward Cheney/David Kincaid c UT Austin Engage Learning: Thomson-Brooks/Cole wwwengagecom wwwmautexasedu/cna/nmc6 October 16, 2011 Ward Cheney/David Kincaid
More informationDirect Methods for Solving Linear Systems. Matrix Factorization
Direct Methods for Solving Linear Systems Matrix Factorization Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011
More informationPowerPoints organized by Dr. Michael R. Gustafson II, Duke University
Part 3 Chapter 10 LU Factorization PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
More informationNumerical Linear Algebra
Numerical Linear Algebra Direct Methods Philippe B. Laval KSU Fall 2017 Philippe B. Laval (KSU) Linear Systems: Direct Solution Methods Fall 2017 1 / 14 Introduction The solution of linear systems is one
More information9. Numerical linear algebra background
Convex Optimization Boyd & Vandenberghe 9. Numerical linear algebra background matrix structure and algorithm complexity solving linear equations with factored matrices LU, Cholesky, LDL T factorization
More informationSince the determinant of a diagonal matrix is the product of its diagonal elements it is trivial to see that det(a) = α 2. = max. A 1 x.
APPM 4720/5720 Problem Set 2 Solutions This assignment is due at the start of class on Wednesday, February 9th. Minimal credit will be given for incomplete solutions or solutions that do not provide details
More information5. Direct Methods for Solving Systems of Linear Equations. They are all over the place...
5 Direct Methods for Solving Systems of Linear Equations They are all over the place Miriam Mehl: 5 Direct Methods for Solving Systems of Linear Equations They are all over the place, December 13, 2012
More informationCPE 310: Numerical Analysis for Engineers
CPE 310: Numerical Analysis for Engineers Chapter 2: Solving Sets of Equations Ahmed Tamrawi Copyright notice: care has been taken to use only those web images deemed by the instructor to be in the public
More informationLinear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math 365 Week #4
Linear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math Week # 1 Saturday, February 1, 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x
More informationApplied Linear Algebra in Geoscience Using MATLAB
Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in
More informationToday s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn
Today s class Linear Algebraic Equations LU Decomposition 1 Linear Algebraic Equations Gaussian Elimination works well for solving linear systems of the form: AX = B What if you have to solve the linear
More informationLU Factorization a 11 a 1 a 1n A = a 1 a a n (b) a n1 a n a nn L = l l 1 l ln1 ln 1 75 U = u 11 u 1 u 1n 0 u u n 0 u n...
.. Factorizations Reading: Trefethen and Bau (1997), Lecture 0 Solve the n n linear system by Gaussian elimination Ax = b (1) { Gaussian elimination is a direct method The solution is found after a nite
More informationProcess Model Formulation and Solution, 3E4
Process Model Formulation and Solution, 3E4 Section B: Linear Algebraic Equations Instructor: Kevin Dunn dunnkg@mcmasterca Department of Chemical Engineering Course notes: Dr Benoît Chachuat 06 October
More informationMTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education
MTH 3 Linear Algebra Study Guide Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education June 3, ii Contents Table of Contents iii Matrix Algebra. Real Life
More information1 Error analysis for linear systems
Notes for 2016-09-16 1 Error analysis for linear systems We now discuss the sensitivity of linear systems to perturbations. This is relevant for two reasons: 1. Our standard recipe for getting an error
More information9. Numerical linear algebra background
Convex Optimization Boyd & Vandenberghe 9. Numerical linear algebra background matrix structure and algorithm complexity solving linear equations with factored matrices LU, Cholesky, LDL T factorization
More informationEAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science
EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Taylor s Theorem Can often approximate a function by a polynomial The error in the approximation
More informationEngineering Computation
Engineering Computation Systems of Linear Equations_1 1 Learning Objectives for Lecture 1. Motivate Study of Systems of Equations and particularly Systems of Linear Equations. Review steps of Gaussian
More informationSolving linear systems (6 lectures)
Chapter 2 Solving linear systems (6 lectures) 2.1 Solving linear systems: LU factorization (1 lectures) Reference: [Trefethen, Bau III] Lecture 20, 21 How do you solve Ax = b? (2.1.1) In numerical linear
More informationlecture 2 and 3: algorithms for linear algebra
lecture 2 and 3: algorithms for linear algebra STAT 545: Introduction to computational statistics Vinayak Rao Department of Statistics, Purdue University August 27, 2018 Solving a system of linear equations
More informationChapter 2. Solving Systems of Equations. 2.1 Gaussian elimination
Chapter 2 Solving Systems of Equations A large number of real life applications which are resolved through mathematical modeling will end up taking the form of the following very simple looking matrix
More informationSolution of Linear Equations
Solution of Linear Equations (Com S 477/577 Notes) Yan-Bin Jia Sep 7, 07 We have discussed general methods for solving arbitrary equations, and looked at the special class of polynomial equations A subclass
More informationNumerical Methods I Non-Square and Sparse Linear Systems
Numerical Methods I Non-Square and Sparse Linear Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 September 25th, 2014 A. Donev (Courant
More informationAMS 147 Computational Methods and Applications Lecture 17 Copyright by Hongyun Wang, UCSC
Lecture 17 Copyright by Hongyun Wang, UCSC Recap: Solving linear system A x = b Suppose we are given the decomposition, A = L U. We solve (LU) x = b in 2 steps: *) Solve L y = b using the forward substitution
More informationA Review of Matrix Analysis
Matrix Notation Part Matrix Operations Matrices are simply rectangular arrays of quantities Each quantity in the array is called an element of the matrix and an element can be either a numerical value
More informationANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3
ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3 ISSUED 24 FEBRUARY 2018 1 Gaussian elimination Let A be an (m n)-matrix Consider the following row operations on A (1) Swap the positions any
More informationGaussian Elimination and Back Substitution
Jim Lambers MAT 610 Summer Session 2009-10 Lecture 4 Notes These notes correspond to Sections 31 and 32 in the text Gaussian Elimination and Back Substitution The basic idea behind methods for solving
More informationRectangular Systems and Echelon Forms
CHAPTER 2 Rectangular Systems and Echelon Forms 2.1 ROW ECHELON FORM AND RANK We are now ready to analyze more general linear systems consisting of m linear equations involving n unknowns a 11 x 1 + a
More informationCS412: Lecture #17. Mridul Aanjaneya. March 19, 2015
CS: Lecture #7 Mridul Aanjaneya March 9, 5 Solving linear systems of equations Consider a lower triangular matrix L: l l l L = l 3 l 3 l 33 l n l nn A procedure similar to that for upper triangular systems
More informationGaussian Elimination without/with Pivoting and Cholesky Decomposition
Gaussian Elimination without/with Pivoting and Cholesky Decomposition Gaussian Elimination WITHOUT pivoting Notation: For a matrix A R n n we define for k {,,n} the leading principal submatrix a a k A
More informationMATH2210 Notebook 2 Spring 2018
MATH2210 Notebook 2 Spring 2018 prepared by Professor Jenny Baglivo c Copyright 2009 2018 by Jenny A. Baglivo. All Rights Reserved. 2 MATH2210 Notebook 2 3 2.1 Matrices and Their Operations................................
More informationLecture Note 2: The Gaussian Elimination and LU Decomposition
MATH 5330: Computational Methods of Linear Algebra Lecture Note 2: The Gaussian Elimination and LU Decomposition The Gaussian elimination Xianyi Zeng Department of Mathematical Sciences, UTEP The method
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS SYSTEMS OF EQUATIONS AND MATRICES Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a
More informationCSE 160 Lecture 13. Numerical Linear Algebra
CSE 16 Lecture 13 Numerical Linear Algebra Announcements Section will be held on Friday as announced on Moodle Midterm Return 213 Scott B Baden / CSE 16 / Fall 213 2 Today s lecture Gaussian Elimination
More information4.2 Floating-Point Numbers
101 Approximation 4.2 Floating-Point Numbers 4.2 Floating-Point Numbers The number 3.1416 in scientific notation is 0.31416 10 1 or (as computer output) -0.31416E01..31416 10 1 exponent sign mantissa base
More informationSolving Linear Systems Using Gaussian Elimination. How can we solve
Solving Linear Systems Using Gaussian Elimination How can we solve? 1 Gaussian elimination Consider the general augmented system: Gaussian elimination Step 1: Eliminate first column below the main diagonal.
More informationLinear Algebraic Equations
Linear Algebraic Equations Linear Equations: a + a + a + a +... + a = c 11 1 12 2 13 3 14 4 1n n 1 a + a + a + a +... + a = c 21 2 2 23 3 24 4 2n n 2 a + a + a + a +... + a = c 31 1 32 2 33 3 34 4 3n n
More informationChapter 9: Gaussian Elimination
Uchechukwu Ofoegbu Temple University Chapter 9: Gaussian Elimination Graphical Method The solution of a small set of simultaneous equations, can be obtained by graphing them and determining the location
More informationFundamentals of Linear Algebra. Marcel B. Finan Arkansas Tech University c All Rights Reserved
Fundamentals of Linear Algebra Marcel B. Finan Arkansas Tech University c All Rights Reserved 2 PREFACE Linear algebra has evolved as a branch of mathematics with wide range of applications to the natural
More informationECEN 615 Methods of Electric Power Systems Analysis Lecture 18: Least Squares, State Estimation
ECEN 615 Methods of Electric Power Systems Analysis Lecture 18: Least Squares, State Estimation Prof. om Overbye Dept. of Electrical and Computer Engineering exas A&M University overbye@tamu.edu Announcements
More informationNotes on Row Reduction
Notes on Row Reduction Francis J. Narcowich Department of Mathematics Texas A&M University September The Row-Reduction Algorithm The row-reduced form of a matrix contains a great deal of information, both
More informationChapter 2. Solving Systems of Equations. 2.1 Gaussian elimination
Chapter 2 Solving Systems of Equations A large number of real life applications which are resolved through mathematical modeling will end up taking the form of the following very simple looking matrix
More informationNumerical Analysis: Solutions of System of. Linear Equation. Natasha S. Sharma, PhD
Mathematical Question we are interested in answering numerically How to solve the following linear system for x Ax = b? where A is an n n invertible matrix and b is vector of length n. Notation: x denote
More informationCheat Sheet for MATH461
Cheat Sheet for MATH46 Here is the stuff you really need to remember for the exams Linear systems Ax = b Problem: We consider a linear system of m equations for n unknowns x,,x n : For a given matrix A
More informationMATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year
1 MATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year 2013-14 OUTLINE OF WEEK 2 Linear Systems and solutions Systems of linear
More information