Review of matrices. Let m, n IN. A rectangle of numbers written like A =

Size: px
Start display at page:

Download "Review of matrices. Let m, n IN. A rectangle of numbers written like A ="

Transcription

1 Review of matrices Let m, n IN. A rectangle of numbers written like a 11 a a 1n a 21 a 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 m n matrix. The above matrix may be denoted by [a ij ] 1 i m 1 j n (or just by [a ij ]). The number a ij is called the (i,j) entry. It lies in the i th row and j th column. Dana Mackey (DIT) Numerical Methods 1 / 56

2 The entries like a 11, a 22, a 33 and so on are called the diagonal entries. These entries form the main diagonal. Notice that the main diagonal finishes in the bottom right corner only if the matrix has the same number of rows as columns, i.e. we have a square matrix. A matrix composed of only one column (that is an m 1 matrix) is called a column matrix or vector. Two matrices are equal if and only if they have the same size and the corresponding entries are all equal. For each m and n in IN, we use M m,n for the set of all m n matrices. The m n matrix whose entries are all zero is called the m n zero matrix and is denoted 0 m,n or simply 0. Dana Mackey (DIT) Numerical Methods 2 / 56

3 Matrix addition If A = [a ij ] and B = [b ij ] are two matrices in M m,n then we define A + B M m,n by a 11 + b 11 a 12 + b a 1n + b 1n a 21 + b 21 a 22 + b a 2n + b 2n A + B = [a ij + b ij ] = a m1 + b m1 a m2 + b m2... a mn + b mn For example, [ ] [ ] = [ ] Note: We can only add two matrices if they are of the same size. Dana Mackey (DIT) Numerical Methods 3 / 56

4 Scalar multiplication If A = [a ij ] M m,n and k IR then we define the product of A with the scalar number k to be ka M m,n given by ka 11 ka ka 1n ka 21 ka ka 2n ka = [ka ij ] = ka m1 ka m2... ka mn This operation is called scalar multiplication. Note that ka = [ka ij ] = [a ij k] so the notation Ak will also be used, and then ka = Ak. For example 5 [ ] 1 2 = 4 3 [ ] 5 10 and [ ] 1 2 = 4 3 [ ] Dana Mackey (DIT) Numerical Methods 4 / 56

5 Inner product The next question is how to multiply two matrices. We start with a special case. Let n IN and let A be a 1 n matrix (a row matrix) and let B be an n 1 column matrix. That is A = [ ] b 2 a 1 a 2... a n while B =.. We b n define the (inner) product of A and B to be b 1 AB = [ ] b 2 a 1 a 2... a n. = a 1b 1 + a 2 b a n b n. b n b 1 Dana Mackey (DIT) Numerical Methods 5 / 56

6 Note that the inner product is of a row and a column of the same length (the length of a row or column matrix is the number of entries in it) and that the answer is a real number (not a matrix). For example [ ] = 2( 2) + ( 1)5 + 3(3) = = 0. 3 Dana Mackey (DIT) Numerical Methods 6 / 56

7 Matrix multiplication Let m, n and p IN. Suppose A M m,n and B M n.p. Then we define the product of A and B to be the m p matrix formed as follows: The (i,j) entry of AB is the inner product of the i th row of A with the j th column of B. [ ] Example: Let A = and B = Then A M , and B M 3,4 implies AB M 2,4 and AB = [ ] = [ ] Dana Mackey (DIT) Numerical Methods 7 / 56

8 In general AB BA for matrices In order to multiply two matrices, A by B, the number of columns of A must equal the number of rows of B. In other words, if A M m,n and B M p,q then to form AB we must have that n = p. To form BA we must have q = m. In particular we note that AB BA in this case. Even if we take two matrices A and B so that AB and BA are the [ same ] size, we cannot [ ] assume that AB = BA. For example, if A = and B = then [ ][ ] AB = = [ 19 ] while [ ][ ] BA = = [ ] AB Dana Mackey (DIT) Numerical Methods 8 / 56

9 Elementary Row operations Given a matrix, the following operations on the rows of that matrix are called (elementary) row operations. 1 Interchange rows, e.g R 1 R Multiply a row by a non-zero real number R R Add a scalar multiple of one row to another R 3 R 3 2R = (1) ( 1) Dana Mackey (DIT) Numerical Methods 9 / 56

10 Echelon form A matrix A = [a ij ] is said to be in echelon form if a ij = 0 for i > j. For example, is in echelon form. A square matrix in echelon form is called upper triangular. Any matrix can be converted to echelon form by using elementary row operations. The steps involved are as follows. Let A = [a ij ] M m,n. Dana Mackey (DIT) Numerical Methods 10 / 56

11 1 Look at the first column. We want all entries below the first one, a 11, to be zero. If necessary (that is, if a 11 = 0), interchange two rows so that a Add multiples of the first row to the other rows to ensure a 21, a 31,...,a m1 are all zero. For example, add a 21 row 1 to row 2, etc. 3 Move to the second column. We want all the entries below a 22, that is a 32, a 42, etc., to be zero. If necessary, interchange two rows (not the first row) so that a Add multiples of the second row to ensure a 32,a 42,...,a m2 are all zero. 5 Move along the columns in this way until the matrix is in echelon form. a 11 Dana Mackey (DIT) Numerical Methods 11 / 56

12 Example: Convert the matrix to echelon form Dana Mackey (DIT) Numerical Methods 12 / 56

13 Systems of linear equations A linear equation in one variable is an equation of the form ax = b where a and b are given real numbers, and x is a variable. A linear equation in n variables is an equation of the form a 1 x 1 + a 2 x a n x n = b where a 1,...,a n,b IR. For example, 2x 1 + 3x 2 = 7 is a linear equation in two variables; 2x 3y + 4z = 5 is a linear equation in three variables. Dana Mackey (DIT) Numerical Methods 13 / 56

14 We can also consider a system of m equations in n variables. That is, a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 2 + a 22 x a 2n x n = b 2.. a m1 x 1 + a m2 x a mn x n = b m. The system of m equations above can also be written as one matrix equation: a 11 a a 1n x 1 b 1 a 21 a a 2n x = b 2. a m1 a m2... a mn x n b m and we will usually write this as AX = B. When written in this form, a solution of the system will be a n 1 column matrix with n elements (or n-vector). A linear system may have no solutions, many solutions or just a unique solution. Dana Mackey (DIT) Numerical Methods 14 / 56

15 The method of Gaussian Elimination for solving systems Suppose the system is AX = B where A M m,n and B M m,1. Form the augmented matrix [A. B] and convert this matrix to echelon form to get a matrix [A. B ]. The echelon system A X = B has the same solutions as the original system AX = B but is much easier to solve. This process of solving a linear system is called Gaussian elimination. Example: Solve the system of linear equations, x 2 + 2x 3 = 3 x 1 + 2x 2 + 3x 3 = 2 x 1 2x 2 2x 3 = 0 Dana Mackey (DIT) Numerical Methods 15 / 56

16 More examples Solve, by Gaussian elimination, the following systems of linear equations. (i) x 1 2x 2 2x 3 = 4 3x 1 x 2 x 3 = 7 6x 1 +x 2 +x 3 = 5. (ii) x 1 +x 2 +x 3 x 4 = 0 3x 1 x 2 x 3 +2x 4 = 0 4x 1 +5x 2 +x 3 x 4 = 0 9x 1 +6x 2 +2x 3 x 4 = 0 Dana Mackey (DIT) Numerical Methods 16 / 56

17 Gaussian Elimination with partial pivoting Example: Consider the following system 2 3 x x x 3 = x x x 3 = x x x 3 = 12 5 (1) Exercise: Using Gaussian elimination and back substitution show that the exact solution is x 1 = 1, x 2 = 7 and x 3 = 1. Dana Mackey (DIT) Numerical Methods 17 / 56

18 Now write the system using four decimal digit rounding arithmetic x x x 3 = x x x 3 = (2) x x x 3 = Remarks: 1 To obtain the 4-digit floating point approximation of a number, we use the rounding method (e.g. 2 3 = gives ) 2 Whenever performing a calculation (e.g. addition or multiplication) involving two or more numbers, the 4-digit rounded form is used for each number and then the result of the calculation is rounded as well. For example, = = This is the source of roundoff error accummulation. 3 When performing row operations to get the echelon form, the entries below the pivot are implicitly set equal to zero, as opposed to being explicitly calculated, in order to avoid unnecessary calculations. Dana Mackey (DIT) Numerical Methods 18 / 56

19 The first step of the Gaussian elimination yields x x x 3 = x x 3 = (3) x x 3 = where the row operations performed were R R 1 = R R 1 R R 1 = R R 1 and the above entries have been calculated as follows: and so on = = = = = = Dana Mackey (DIT) Numerical Methods 19 / 56

20 The next step of the Gaussian elimination gives x x x 3 = which gives the solution: x 3 = (exact) x 2 = (relative error=57%) and x 1 = (relative error=200%)! x x 3 = (4) 3086x 3 = 3087 Dana Mackey (DIT) Numerical Methods 20 / 56

21 Remark: The large errors obtained in the previous example were obtained because of a cancellation (or loss of significance) error which occurred while working on the first column. This introduced a small pivot, , in the second column which amplified the error. We cannot always avoid cancellation errors but at least we can try to avoid the use of very small pivots. Dana Mackey (DIT) Numerical Methods 21 / 56

22 The partial pivoting strategy is the simplest scheme which eliminates the use of small pivots. For each column j let M i = max A ij j i and let i 0 be the smallest value of i (i > j) for which this maximum is achieved. Then interchange rows j and i 0. In other words, while working on column j, look for the entry with the largest absolute value below the pivot (A ij with i j). If this largest entry appears in more than one row, take the one closest to the pivot row, i 0, and swap it with the current pivot row, j. Exercise: Apply the technique of Gaussian elimination with partial pivoting to system (2) and verify if the error has improved. Dana Mackey (DIT) Numerical Methods 22 / 56

23 ( R R 1 ) R R (R 2 R 3 ) (R R 2 ) Partial pivoting gives the solution x 3 = 1.001, x 2 = and x 1 = Dana Mackey (DIT) Numerical Methods 23 / 56

24 Exercise: Consider the following system 3x 1 + x 2 + 4x 3 x 4 = 7 2x 1 2x 2 x 3 + 2x 4 = 1 5x 1 + 7x x 3 8x 4 = 20 x 1 + 3x 2 + 2x 3 + 4x 4 = 4 1 Show, by direct substitution, that the exact solution is (1,-1,1,-1). 2 Solve the system using Gaussian elimination without pivoting and calculate the relative errors. 3 Solve the system using Gaussian elimination with partial pivoting and calculate the relative errors. Dana Mackey (DIT) Numerical Methods 24 / 56

25 Scaled partial pivoting Consider now the example 0.7x x 2 = x x 2 = The exact solution is x 1 = 20 and x 2 = 1. Partial pivoting would leave the equations unchanged since 0.7 is the largest entry in the first column. Gaussian elimination then gives hence x 2 = and x 1 = x x 2 = x 2 = 1078 Dana Mackey (DIT) Numerical Methods 25 / 56

26 The large errors obtained in this case are due to the fact that the entries 0.7 and are not compared with the other coefficients in their corresponding rows. For instance, 0.7 > but < If, instead, we choose the pivot which is largest in magnitude relative to the other coefficients in the equation, we need to swap the rows and use as pivot x x 2 = x x 2 = 1739 which gives x 2 = and x 2 = Dana Mackey (DIT) Numerical Methods 26 / 56

27 Scaled partial pivoting Construct a scale vector as follows S i = max 1 j n a ij, for each 1 i n (S i is the largest absolute value in row i.) During step i of the Gaussian elimination (column i), let ( ) aji M i = max i j n and let j 0 be the smallest j for which this maximum occurs. If j 0 > i then we interchange rows i and j 0. Note: The scale vector S does not change during the Gaussian elimination process. S j Dana Mackey (DIT) Numerical Methods 27 / 56

28 Exercise: Consider the system 3x 1 + x 2 + 4x 3 x 4 = 7 2x 1 2x 2 x 3 + 2x 4 = 1 5x 1 + 7x x 3 8x 4 = 20 x 1 + 3x 2 + 2x 3 + 4x 4 = 4 Recall that the exact solution of this system is (1,-1,1,-1). Calculate the solution using Gaussian elimination with scaled partial pivoting and compare the errors with those obtained using (simple) partial pivoting. Dana Mackey (DIT) Numerical Methods 28 / 56

29 The LU decomposition method Consider the system of equations, written in matrix form where A M n,n is a square matrix and X, B M n,1. AX = B (5) The LU decomposition (or factorisation) of the matrix A consists of writing the matrix A as the product of a lower triangular matrix L and an upper triangular matrix U, such that A = LU. (Recall that a matrix is called upper triangular if all entries below the main diagonal are zero and lower triangular if all entries above the main diagonal are zero.) Dana Mackey (DIT) Numerical Methods 29 / 56

30 The procedure of solving the system of equations (5) using LU decomposition is the following. Step 1: Determining the LU decomposition The matrices L and U can be determined by writing (in the case of a 3 3 matrix, for example) a 11 a 12 a u 11 u 12 u 13 A = a 21 a 22 a 23 = L U = l u 22 u 23 a 31 a 32 a 33 l 31 l u 33 and solving this system for the entries l ij and u ij. Dana Mackey (DIT) Numerical Methods 30 / 56

31 Step 2: Solving the LU decomposed system After the LU factorisation, system (5) becomes LUX = B which can be solved as two successive problems: (1) LY = B; (2) UX = Y. Each of these two systems is easy to solve since the matrix of coefficients is either upper or lower triangular. Dana Mackey (DIT) Numerical Methods 31 / 56

32 Example: Solve the following system using the LU decomposition method. x 1 + x 2 x 3 = 1 x 1 + 2x 2 2x 3 = 5 2x 1 + x 2 + x 3 = 10 Dana Mackey (DIT) Numerical Methods 32 / 56

33 Properties of the LU decomposition method: 1: Not every matrix has an LU-decomposition. For example, A = cannot be written as the product of a lower triangular and upper triangular matrices. However, given any invertible matrix A, it is always possible to rearrange the rows of A so that the resulting matrix does have an LU-decomposition. A sufficient condition for a matrix A to have an LU decomposition is that Gaussian elimination can be performed on A without row interchanges. Dana Mackey (DIT) Numerical Methods 33 / 56

34 2. When a matrix has an LU-decomposition, that decomposition is not unique. Given the factorisation A = LU, if we define the new matrices L = LD and U = D 1 U where D is any invertible diagonal matrix, then L is lower triangular, U is upper triangular and A = L U so we found another LU-factorisation. In fact, once a matrix A admits an LU-factorisation, there are an infinite number of choices for the matrices L and U! Dana Mackey (DIT) Numerical Methods 34 / 56

35 3. The LU-decomposition is unique up to scaling by a diagonal matrix. This means that, if A admits two LU-factorisations, then we must have for some diagonal matrix D. A = L 1 U 1 = L 2 U 2 L 1 = L 2 D and U 2 = DU 1 Note: A product of upper (or lower) triangular matrices is also an upper (or lower) triangular matrix. Dana Mackey (DIT) Numerical Methods 35 / 56

36 4. If A admits a LU-factorisation then we can find matrices L and U such that L has 1 s along the diagonal. (Similarly, we can find a decomposition in which U has 1 s along the diagonal.) 5. The decomposition A = LU is unique if we require that L (or U) has 1 s along its diagonal! Dana Mackey (DIT) Numerical Methods 36 / 56

37 LU Factorization using Gaussian Elimination Consider the following example A = = = where the row operations used were as follows R 2 R 2 4R 1 R 3 R 3 5R 1 R 3 R 3 3R 2 On the other hand, the LU factorization of the matrix A is A = = = LU Dana Mackey (DIT) Numerical Methods 37 / 56

38 We notice that the upper triangular echelon form of the matrix A yields the matrix U in the LU decomposition. The matrix L is constructed as a lower triangular matrix with 1 s along the main diagonal and the negatives of the Gaussian elimination multipliers in the appropriate positions. An algorithm for constructing an LU decomposition for a matrix A can be constructed as follows. Initialize the matrix L as the identity matrix and U as the matrix A. Perform Gaussian elimination on the matrix U and insert the row multipliers into the appropriate positions in the matrix L. When the echelon form for U has been achieved, L will be a lower triangular matrix. The LU decomposition is complete. Dana Mackey (DIT) Numerical Methods 38 / 56

39 Example Find the LU factorization of the matrix A = Gaussian elimination: L = U = L = 1/ / U = / R R 1 R R 1 R R 1 Dana Mackey (DIT) Numerical Methods 39 / 56

40 L = 1/ /2 3/4 1 0 U = R R 2 3/4 1/ R R 2 L = 1/ /2 3/4 1 0 U = /4 1/2 1/ R R 3 which completes the LU decomposition. Exercise: Check that A = LU! Dana Mackey (DIT) Numerical Methods 40 / 56

41 Why does this work? Consider the matrices M 1 = 2 1 0, M 2 = Exercise 1: Show that multiplying a matrix A by the matrix M 1 has the same effect as performing the row operations R 2 R 2 + 2R 1 and R 3 R 3 + 3R 1, while multiplication by the matrix M 2 has the same effect as performing the row operation R 3 R 3 + 4R 2. Exercise 2 Calculate the inverse matrices M 1 M1 1 M , M 1 2 and the product Dana Mackey (DIT) Numerical Methods 41 / 56

42 Remarks 1 The Gaussian elimination procedure can be viewed as repeated multiplication by lower triangular matrices and the inverse of their product yields the matrix L in the LU decomposition. 2 Note that we have avoided row interchanges in the previous examples. If such row operations are needed (for example when performing Gaussian elimination with pivoting), the procedure is slightly different. (We won t cover this case now!) 3 The old procedure is referred to as LU decomposition by direct calculation or Doolittle s method. Dana Mackey (DIT) Numerical Methods 42 / 56

43 The Inverse of a Matrix Let A M n,n. If there exists B M n,n such that AB = I = BA then we say A is invertible and B is an inverse of A. We write B = A 1. Note that if B is an inverse of A, then A is an inverse of B. Procedure to invert a matrix: We can use elementary [ ] row operations to invert a 2 2 invertible matrix. 1 2 Start with A = and augment the identity matrix to form the matrix Now use elementary row operations to convert the left hand side to the identity matrix but performing the row operations across the entire row. Dana Mackey (DIT) Numerical Methods 43 / 56

44 When the left hand matrix becomes equal to the identity, the right hand matrix will be the inverse of A. Example: [ ] [ ] R 2 R 2 3R Hence the inverse of R R 2 [ [ ] [ is [ R 1 R 1 +R This procedure can be used to invert any n n matrix, if it is invertible. ]. ]. ] Dana Mackey (DIT) Numerical Methods 44 / 56

45 0 1 2 Example: Find the inverse of the matrix A = The answer is A 1 = Check that AA 1 = I = A 1 A Note: A square matrix is invertible if and only if it does not contain a zero on the main diagonal after it has been reduced to echelon form by elementary row operations For example, the matrix A = has no inverse! Dana Mackey (DIT) Numerical Methods 45 / 56

46 Solving systems of linear equations The inverse of a matrix gives a new method for solving a system of linear equations: If AX = B then X = A 1 B provided A is invertible. Exercise: Solve the following system of equations by inverting the matrix of coefficients. x + 2y + 3z = 1 x y + 4z = 4 2x 2y + z = 8 Dana Mackey (DIT) Numerical Methods 46 / 56

47 Iterative methods for systems of linear equations Linear systems arising from practical applications tend to be large and their coeffficient matrices will often be sparse (that is, only a small percentage of entries are non-zero). For such systems, iterative methods are generally more efficient than direct methods. Basic Idea: Iterative methods for systems of linear equations are similar to the algorithms for finding roots of nonlinear algebraic equations. For example, consider the linear system where A is an n n matrix and B is an n-vector. AX = B (6) Dana Mackey (DIT) Numerical Methods 47 / 56

48 This can be converted to a fixed-point problem: X = TX + C for some (new) n n matrix T, called the iteration matrix, and n-vector C. An iterative method for solving this problem consists of starting with a suitable initial guess, X (0) and then constructing the iterative sequence X (k) as follows X (k+1) = TX (k) + C, k = 1,2,... This algorithm is terminated when two successive vectors X (k) and X (k+1) are close enough in a sense which remains to be defined. Dana Mackey (DIT) Numerical Methods 48 / 56

49 Definition: Let A be an n n matrix. If we can write A = M N, where M and N are n n matrices and M is invertible, then the pair (M,N) is called a splitting of the matrix A. If we have a splitting A = M N in Equation (1) above then the system can also be written as MX = NX + B or X = M 1 NX + M 1 B = TX + C where we let T = M 1 N and C = M 1 B. Dana Mackey (DIT) Numerical Methods 49 / 56

50 1. The Jacobi method This method is based on splitting the coefficient matrix A as follows: A = D (L + U) where D is the diagonal part of A, while L and U are the strictly lower and upper triangular parts of A, respectively. (So, according to the definition above, we have M = D and N = L + U.) Note that L and U in this context are not related at all to the matrices L, U we would get from a LU-decomposition of A. Example: Find the Jacobi splitting for the matrix A = Dana Mackey (DIT) Numerical Methods 50 / 56

51 Recall, from the definition of a splitting, that the matrix M has to be invertible. In the case of the Jacobi splitting this means that the diagonal part of A has to be invertible so all diagonal elements have to be non-zero. If at least one diagonal element of A happens to be zero, the equations in the system must be reordered so that the zero entry is relocated to a non-diagonal position. The Jacobi method iteration formula X (k+1) = TX (k) + C where T = D 1 (L + U) and C = D 1 B. Dana Mackey (DIT) Numerical Methods 51 / 56

52 Exercise 1: Consider the following system of equations 5x 1 + x 2 + 2x 3 = 10 3x 1 + 9x 2 + 4x 3 = 14 x 1 + 2x 2 7x 3 = 33. Show that the exact solution is x1 = 1, x 2 = 3, x 3 = 4 and that the iteration sequence associated with the Jacobi method is given by x (k+1) 1 = 1 (k) [10 x 2 2x (k) 3 ] 5 x (k+1) 2 = 1 (k) [ x 1 4x (k) 3 ] 9 x (k+1) 3 = 1 (k) [ 33 x 1 2x (k) 2 ] 7 Find an approximate solution such that { } max x (k) 1 x1, x (k) 2 x2, x (k) 3 x Dana Mackey (DIT) Numerical Methods 52 / 56

53 Solution k x (k) 1 x (k) 2 x (k) 3 x (k) 1 1 x (k) x (k) Dana Mackey (DIT) Numerical Methods 53 / 56

54 2. The Gauss-Seidel method An obvious improvement in the Jacobi method is to use x (k+1) 1 and x (k+1) 2 as soon as they have been calculated rather than wait for the next iteration. This modification yields the Gauss-Seidel iteration algorithm: x (k+1) 1 = 1 (k) [10 x 2 2x (k) 3 ] 5 x (k+1) 2 = 1 (k+1) [ x 1 4x (k) 3 ] 9 x (k+1) 3 = 1 (k+1) [ 33 x 1 2x (k+1) 2 ] 7 Exercise 2: From the approximation equations above, show that the Gauss-Seidel method is based on the splitting A = (D L) U where D, U and L have the same meaning as in the Jacobi method. Dana Mackey (DIT) Numerical Methods 54 / 56

55 Exercise 3 : Redo Exercise 1 above using the Gauss-Seidel method. k x (k) 1 x (k) 2 x (k) 3 x (k) 1 1 x (k) x (k) We have obtained the same order of accuracy after only 6 steps therefore the Gauss-Seidel method is faster than the Jacobi method. Dana Mackey (DIT) Numerical Methods 55 / 56

56 Convergence properties for the Jacobi and Gauss-Seidel methods A matrix is called strictly diagonally dominant if, for each row, the absolute value of the diagonal element is strictly larger than the sum of absolute values of the other elements. If A is strictly diagonally dominant then both the Jacobi and Gauss-Seidel algorithms will converge for any choice of the initial vector approximation! Note that strict diagonal dominance is a sufficient condition: it does guarantee convergence but convergence might still occur even if the condition is not satisfied. Dana Mackey (DIT) Numerical Methods 56 / 56

Next topics: Solving systems of linear equations

Next 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 information

The Solution of Linear Systems AX = B

The 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 information

Computational Methods. Systems of Linear Equations

Computational 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 information

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns 5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns (1) possesses the solution and provided that.. The numerators and denominators are recognized

More information

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

ANALYTICAL 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 information

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method 54 CHAPTER 10 NUMERICAL METHODS 10. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS As a numerical technique, Gaussian elimination is rather unusual because it is direct. That is, a solution is obtained after

More information

Numerical Analysis: Solutions of System of. Linear Equation. Natasha S. Sharma, PhD

Numerical 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 information

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511) GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511) D. ARAPURA Gaussian elimination is the go to method for all basic linear classes including this one. We go summarize the main ideas. 1.

More information

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Linear 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 information

30.3. LU Decomposition. Introduction. Prerequisites. Learning Outcomes

30.3. LU Decomposition. Introduction. Prerequisites. Learning Outcomes LU Decomposition 30.3 Introduction In this Section we consider another direct method for obtaining the solution of systems of equations in the form AX B. Prerequisites Before starting this Section you

More information

Gaussian Elimination and Back Substitution

Gaussian 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 information

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

LU 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 information

Chapter 4. Solving Systems of Equations. Chapter 4

Chapter 4. Solving Systems of Equations. Chapter 4 Solving Systems of Equations 3 Scenarios for Solutions There are three general situations we may find ourselves in when attempting to solve systems of equations: 1 The system could have one unique solution.

More information

4 Elementary matrices, continued

4 Elementary matrices, continued 4 Elementary matrices, continued We have identified 3 types of row operations and their corresponding elementary matrices. To repeat the recipe: These matrices are constructed by performing the given row

More information

MATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year

MATHEMATICS 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

2.1 Gaussian Elimination

2.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 information

MTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~

MTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~ MTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~ Question No: 1 (Marks: 1) If for a linear transformation the equation T(x) =0 has only the trivial solution then T is One-to-one Onto Question

More information

Iterative Methods. Splitting Methods

Iterative Methods. Splitting Methods Iterative Methods Splitting Methods 1 Direct Methods Solving Ax = b using direct methods. Gaussian elimination (using LU decomposition) Variants of LU, including Crout and Doolittle Other decomposition

More information

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Chapter 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 information

Matrix Factorization Reading: Lay 2.5

Matrix Factorization Reading: Lay 2.5 Matrix Factorization Reading: Lay 2.5 October, 20 You have seen that if we know the inverse A of a matrix A, we can easily solve the equation Ax = b. Solving a large number of equations Ax = b, Ax 2 =

More information

Matrices and systems of linear equations

Matrices and systems of linear equations Matrices and systems of linear equations Samy Tindel Purdue University Differential equations and linear algebra - MA 262 Taken from Differential equations and linear algebra by Goode and Annin Samy T.

More information

Linear Equations in Linear Algebra

Linear Equations in Linear Algebra 1 Linear Equations in Linear Algebra 1.1 SYSTEMS OF LINEAR EQUATIONS LINEAR EQUATION x 1,, x n A linear equation in the variables equation that can be written in the form a 1 x 1 + a 2 x 2 + + a n x n

More information

Review Questions REVIEW QUESTIONS 71

Review 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 information

Lectures on Linear Algebra for IT

Lectures on Linear Algebra for IT Lectures on Linear Algebra for IT by Mgr. Tereza Kovářová, Ph.D. following content of lectures by Ing. Petr Beremlijski, Ph.D. Department of Applied Mathematics, VSB - TU Ostrava Czech Republic 2. Systems

More information

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations Chapter 1: Systems of linear equations and matrices Section 1.1: Introduction to systems of linear equations Definition: A linear equation in n variables can be expressed in the form a 1 x 1 + a 2 x 2

More information

Solving Linear Systems

Solving Linear Systems Solving Linear Systems Iterative Solutions Methods Philippe B. Laval KSU Fall 207 Philippe B. Laval (KSU) Linear Systems Fall 207 / 2 Introduction We continue looking how to solve linear systems of the

More information

Elementary matrices, continued. To summarize, we have identified 3 types of row operations and their corresponding

Elementary matrices, continued. To summarize, we have identified 3 types of row operations and their corresponding Elementary matrices, continued To summarize, we have identified 3 types of row operations and their corresponding elementary matrices. If you check the previous examples, you ll find that these matrices

More information

CHAPTER 6. Direct Methods for Solving Linear Systems

CHAPTER 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 information

Methods for Solving Linear Systems Part 2

Methods for Solving Linear Systems Part 2 Methods for Solving Linear Systems Part 2 We have studied the properties of matrices and found out that there are more ways that we can solve Linear Systems. In Section 7.3, we learned that we can use

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

MATRIX 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 information

Solving Linear Systems of Equations

Solving Linear Systems of Equations November 6, 2013 Introduction The type of problems that we have to solve are: Solve the system: A x = B, where a 11 a 1N a 12 a 2N A =.. a 1N a NN x = x 1 x 2. x N B = b 1 b 2. b N To find A 1 (inverse

More information

TMA4125 Matematikk 4N Spring 2017

TMA4125 Matematikk 4N Spring 2017 Norwegian University of Science and Technology Institutt for matematiske fag TMA15 Matematikk N Spring 17 Solutions to exercise set 1 1 We begin by writing the system as the augmented matrix.139.38.3 6.

More information

Linear Algebraic Equations

Linear 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 information

Solving Ax = b w/ different b s: LU-Factorization

Solving Ax = b w/ different b s: LU-Factorization Solving Ax = b w/ different b s: LU-Factorization Linear Algebra Josh Engwer TTU 14 September 2015 Josh Engwer (TTU) Solving Ax = b w/ different b s: LU-Factorization 14 September 2015 1 / 21 Elementary

More information

Math 344 Lecture # Linear Systems

Math 344 Lecture # Linear Systems Math 344 Lecture #12 2.7 Linear Systems Through a choice of bases S and T for finite dimensional vector spaces V (with dimension n) and W (with dimension m), a linear equation L(v) = w becomes the linear

More information

30.5. Iterative Methods for Systems of Equations. Introduction. Prerequisites. Learning Outcomes

30.5. Iterative Methods for Systems of Equations. Introduction. Prerequisites. Learning Outcomes Iterative Methods for Systems of Equations 0.5 Introduction There are occasions when direct methods (like Gaussian elimination or the use of an LU decomposition) are not the best way to solve a system

More information

1 - Systems of Linear Equations

1 - Systems of Linear Equations 1 - Systems of Linear Equations 1.1 Introduction to Systems of Linear Equations Almost every problem in linear algebra will involve solving a system of equations. ü LINEAR EQUATIONS IN n VARIABLES We are

More information

COURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.

COURSE 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 information

CS227-Scientific Computing. Lecture 4: A Crash Course in Linear Algebra

CS227-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 information

CSE 160 Lecture 13. Numerical Linear Algebra

CSE 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 information

4 Elementary matrices, continued

4 Elementary matrices, continued 4 Elementary matrices, continued We have identified 3 types of row operations and their corresponding elementary matrices. If you check the previous examples, you ll find that these matrices are constructed

More information

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Chapter 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 information

1111: Linear Algebra I

1111: Linear Algebra I 1111: Linear Algebra I Dr. Vladimir Dotsenko (Vlad) Lecture 7 Dr. Vladimir Dotsenko (Vlad) 1111: Linear Algebra I Lecture 7 1 / 8 Properties of the matrix product Let us show that the matrix product we

More information

MTH 464: Computational Linear Algebra

MTH 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 information

7.6 The Inverse of a Square Matrix

7.6 The Inverse of a Square Matrix 7.6 The Inverse of a Square Matrix Copyright Cengage Learning. All rights reserved. What You Should Learn Verify that two matrices are inverses of each other. Use Gauss-Jordan elimination to find inverses

More information

Elementary Linear Algebra

Elementary Linear Algebra Matrices J MUSCAT Elementary Linear Algebra Matrices Definition Dr J Muscat 2002 A matrix is a rectangular array of numbers, arranged in rows and columns a a 2 a 3 a n a 2 a 22 a 23 a 2n A = a m a mn We

More information

22A-2 SUMMER 2014 LECTURE 5

22A-2 SUMMER 2014 LECTURE 5 A- SUMMER 0 LECTURE 5 NATHANIEL GALLUP Agenda Elimination to the identity matrix Inverse matrices LU factorization Elimination to the identity matrix Previously, we have used elimination to get a system

More information

Direct 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 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 information

MODEL ANSWERS TO THE THIRD HOMEWORK

MODEL ANSWERS TO THE THIRD HOMEWORK MODEL ANSWERS TO THE THIRD HOMEWORK 1 (i) We apply Gaussian elimination to A First note that the second row is a multiple of the first row So we need to swap the second and third rows 1 3 2 1 2 6 5 7 3

More information

MATH2210 Notebook 2 Spring 2018

MATH2210 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 information

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices MAC05-College Algebra Chapter 5-Systems of Equations & Matrices 5. Systems of Equations in Two Variables Solving Systems of Two Linear Equations/ Two-Variable Linear Equations A system of equations is

More information

1 Last time: linear systems and row operations

1 Last time: linear systems and row operations 1 Last time: linear systems and row operations Here s what we did last time: a system of linear equations or linear system is a list of equations a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22

More information

1300 Linear Algebra and Vector Geometry

1300 Linear Algebra and Vector Geometry 1300 Linear Algebra and Vector Geometry R. Craigen Office: MH 523 Email: craigenr@umanitoba.ca May-June 2017 Introduction: linear equations Read 1.1 (in the text that is!) Go to course, class webpages.

More information

Elementary Row Operations on Matrices

Elementary Row Operations on Matrices King Saud University September 17, 018 Table of contents 1 Definition A real matrix is a rectangular array whose entries are real numbers. These numbers are organized on rows and columns. An m n matrix

More information

Matrix & Linear Algebra

Matrix & Linear Algebra Matrix & Linear Algebra Jamie Monogan University of Georgia For more information: http://monogan.myweb.uga.edu/teaching/mm/ Jamie Monogan (UGA) Matrix & Linear Algebra 1 / 84 Vectors Vectors Vector: A

More information

Section Gaussian Elimination

Section Gaussian Elimination Section. - Gaussian Elimination A matrix is said to be in row echelon form (REF) if it has the following properties:. The first nonzero entry in any row is a. We call this a leading one or pivot one..

More information

CPE 310: Numerical Analysis for Engineers

CPE 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 information

Today 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. 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 information

MIDTERM 1 - SOLUTIONS

MIDTERM 1 - SOLUTIONS MIDTERM - SOLUTIONS MATH 254 - SUMMER 2002 - KUNIYUKI CHAPTERS, 2, GRADED OUT OF 75 POINTS 2 50 POINTS TOTAL ) Use either Gaussian elimination with back-substitution or Gauss-Jordan elimination to solve

More information

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2 Week 22 Equations, Matrices and Transformations Coefficient Matrix and Vector Forms of a Linear System Suppose we have a system of m linear equations in n unknowns a 11 x 1 + a 12 x 2 + + a 1n x n b 1

More information

Math 313 Chapter 1 Review

Math 313 Chapter 1 Review Math 313 Chapter 1 Review Howard Anton, 9th Edition May 2010 Do NOT write on me! Contents 1 1.1 Introduction to Systems of Linear Equations 2 2 1.2 Gaussian Elimination 3 3 1.3 Matrices and Matrix Operations

More information

Numerical Methods - Numerical Linear Algebra

Numerical 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 information

Math 3C Lecture 20. John Douglas Moore

Math 3C Lecture 20. John Douglas Moore Math 3C Lecture 20 John Douglas Moore May 18, 2009 TENTATIVE FORMULA I Midterm I: 20% Midterm II: 20% Homework: 10% Quizzes: 10% Final: 40% TENTATIVE FORMULA II Higher of two midterms: 30% Homework: 10%

More information

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3 Linear Algebra Row Reduced Echelon Form Techniques for solving systems of linear equations lie at the heart of linear algebra. In high school we learn to solve systems with or variables using elimination

More information

Solving Linear Systems Using Gaussian Elimination

Solving Linear Systems Using Gaussian Elimination Solving Linear Systems Using Gaussian Elimination DEFINITION: A linear equation in the variables x 1,..., x n is an equation that can be written in the form a 1 x 1 +...+a n x n = b, where a 1,...,a n

More information

Numerical Linear Algebra

Numerical 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 information

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects

Program 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 information

Algebra C Numerical Linear Algebra Sample Exam Problems

Algebra C Numerical Linear Algebra Sample Exam Problems Algebra C Numerical Linear Algebra Sample Exam Problems Notation. Denote by V a finite-dimensional Hilbert space with inner product (, ) and corresponding norm. The abbreviation SPD is used for symmetric

More information

Process Model Formulation and Solution, 3E4

Process 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 information

Systems of Linear Equations. By: Tri Atmojo Kusmayadi and Mardiyana Mathematics Education Sebelas Maret University

Systems of Linear Equations. By: Tri Atmojo Kusmayadi and Mardiyana Mathematics Education Sebelas Maret University Systems of Linear Equations By: Tri Atmojo Kusmayadi and Mardiyana Mathematics Education Sebelas Maret University Standard of Competency: Understanding the properties of systems of linear equations, matrices,

More information

MATH 3511 Lecture 1. Solving Linear Systems 1

MATH 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 information

Lecture 6 & 7. Shuanglin Shao. September 16th and 18th, 2013

Lecture 6 & 7. Shuanglin Shao. September 16th and 18th, 2013 Lecture 6 & 7 Shuanglin Shao September 16th and 18th, 2013 1 Elementary matrices 2 Equivalence Theorem 3 A method of inverting matrices Def An n n matrice is called an elementary matrix if it can be obtained

More information

System of Linear Equations

System of Linear Equations Math 20F Linear Algebra Lecture 2 1 System of Linear Equations Slide 1 Definition 1 Fix a set of numbers a ij, b i, where i = 1,, m and j = 1,, n A system of m linear equations in n variables x j, is given

More information

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey Copyright 2005, W.R. Winfrey Topics Preliminaries Echelon Form of a Matrix Elementary Matrices; Finding A -1 Equivalent Matrices LU-Factorization Topics Preliminaries Echelon Form of a Matrix Elementary

More information

Matrices MA1S1. Tristan McLoughlin. November 9, Anton & Rorres: Ch

Matrices MA1S1. Tristan McLoughlin. November 9, Anton & Rorres: Ch Matrices MA1S1 Tristan McLoughlin November 9, 2014 Anton & Rorres: Ch 1.3-1.8 Basic matrix notation We have studied matrices as a tool for solving systems of linear equations but now we want to study them

More information

Department of Aerospace Engineering AE602 Mathematics for Aerospace Engineers Assignment No. 4

Department of Aerospace Engineering AE602 Mathematics for Aerospace Engineers Assignment No. 4 Department of Aerospace Engineering AE6 Mathematics for Aerospace Engineers Assignment No.. Decide whether or not the following vectors are linearly independent, by solving c v + c v + c 3 v 3 + c v :

More information

PH1105 Lecture Notes on Linear Algebra.

PH1105 Lecture Notes on Linear Algebra. PH05 Lecture Notes on Linear Algebra Joe Ó hógáin E-mail: johog@mathstcdie Main Text: Calculus for the Life Sciences by Bittenger, Brand and Quintanilla Other Text: Linear Algebra by Anton and Rorres Matrices

More information

1.5 Gaussian Elimination With Partial Pivoting.

1.5 Gaussian Elimination With Partial Pivoting. Gaussian Elimination With Partial Pivoting In the previous section we discussed Gaussian elimination In that discussion we used equation to eliminate x from equations through n Then we used equation to

More information

Roundoff Analysis of Gaussian Elimination

Roundoff 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 information

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim Introduction - Motivation Many phenomena (physical, chemical, biological, etc.) are model by differential equations. Recall the definition of the derivative of f(x) f f(x + h) f(x) (x) = lim. h 0 h Its

More information

Chapter 1. Vectors, Matrices, and Linear Spaces

Chapter 1. Vectors, Matrices, and Linear Spaces 1.4 Solving Systems of Linear Equations 1 Chapter 1. Vectors, Matrices, and Linear Spaces 1.4. Solving Systems of Linear Equations Note. We give an algorithm for solving a system of linear equations (called

More information

Elementary Linear Algebra

Elementary Linear Algebra Elementary Linear Algebra Linear algebra is the study of; linear sets of equations and their transformation properties. Linear algebra allows the analysis of; rotations in space, least squares fitting,

More information

MATRICES. a m,1 a m,n A =

MATRICES. a m,1 a m,n A = MATRICES Matrices are rectangular arrays of real or complex numbers With them, we define arithmetic operations that are generalizations of those for real and complex numbers The general form a matrix of

More information

AMS 209, Fall 2015 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems

AMS 209, Fall 2015 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems AMS 209, Fall 205 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems. Overview We are interested in solving a well-defined linear system given

More information

Gaussian Elimination -(3.1) b 1. b 2., b. b n

Gaussian Elimination -(3.1) b 1. b 2., b. b n Gaussian Elimination -() Consider solving a given system of n linear equations in n unknowns: (*) a x a x a n x n b where a ij and b i are constants and x i are unknowns Let a n x a n x a nn x n a a a

More information

MTH 215: Introduction to Linear Algebra

MTH 215: Introduction to Linear Algebra MTH 215: Introduction to Linear Algebra Lecture 5 Jonathan A. Chávez Casillas 1 1 University of Rhode Island Department of Mathematics September 20, 2017 1 LU Factorization 2 3 4 Triangular Matrices Definition

More information

Linear Algebra March 16, 2019

Linear Algebra March 16, 2019 Linear Algebra March 16, 2019 2 Contents 0.1 Notation................................ 4 1 Systems of linear equations, and matrices 5 1.1 Systems of linear equations..................... 5 1.2 Augmented

More information

Scientific Computing

Scientific 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 information

Solving Linear Systems

Solving Linear Systems Solving Linear Systems Iterative Solutions Methods Philippe B. Laval KSU Fall 2015 Philippe B. Laval (KSU) Linear Systems Fall 2015 1 / 12 Introduction We continue looking how to solve linear systems of

More information

Linear Systems of n equations for n unknowns

Linear 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 information

A Review of Matrix Analysis

A 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 information

1 GSW Sets of Systems

1 GSW Sets of Systems 1 Often, we have to solve a whole series of sets of simultaneous equations of the form y Ax, all of which have the same matrix A, but each of which has a different known vector y, and a different unknown

More information

Exercise Sketch these lines and find their intersection.

Exercise Sketch these lines and find their intersection. These are brief notes for the lecture on Friday August 21, 2009: they are not complete, but they are a guide to what I want to say today. They are not guaranteed to be correct. 1. Solving systems of linear

More information

3 Matrix Algebra. 3.1 Operations on matrices

3 Matrix Algebra. 3.1 Operations on matrices 3 Matrix Algebra A matrix is a rectangular array of numbers; it is of size m n if it has m rows and n columns. A 1 n matrix is a row vector; an m 1 matrix is a column vector. For example: 1 5 3 5 3 5 8

More information

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017 Math 4A Notes Written by Victoria Kala vtkala@math.ucsb.edu Last updated June 11, 2017 Systems of Linear Equations A linear equation is an equation that can be written in the form a 1 x 1 + a 2 x 2 +...

More information

1111: Linear Algebra I

1111: Linear Algebra I 1111: Linear Algebra I Dr. Vladimir Dotsenko (Vlad) Michaelmas Term 2015 Dr. Vladimir Dotsenko (Vlad) 1111: Linear Algebra I Michaelmas Term 2015 1 / 15 From equations to matrices For example, if we consider

More information

POLI270 - Linear Algebra

POLI270 - Linear Algebra POLI7 - Linear Algebra Septemer 8th Basics a x + a x +... + a n x n b () is the linear form where a, b are parameters and x n are variables. For a given equation such as x +x you only need a variable and

More information

is a 3 4 matrix. It has 3 rows and 4 columns. The first row is the horizontal row [ ]

is a 3 4 matrix. It has 3 rows and 4 columns. The first row is the horizontal row [ ] Matrices: Definition: An m n matrix, A m n is a rectangular array of numbers with m rows and n columns: a, a, a,n a, a, a,n A m,n =...... a m, a m, a m,n Each a i,j is the entry at the i th row, j th column.

More information

6. Iterative Methods for Linear Systems. The stepwise approach to the solution...

6. Iterative Methods for Linear Systems. The stepwise approach to the solution... 6 Iterative Methods for Linear Systems The stepwise approach to the solution Miriam Mehl: 6 Iterative Methods for Linear Systems The stepwise approach to the solution, January 18, 2013 1 61 Large Sparse

More information

Matrix decompositions

Matrix 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 information