Direct Methods for Solving Linear Systems. Matrix Factorization


 Brendan Greer
 2 years ago
 Views:
Transcription
1 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 Brooks/Cole, Cengage Learning
2 Outline 1 Computation Cost Rationale & Basic Solution Strategy Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 2 / 46
3 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 2 / 46
4 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 2 / 46
5 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix 4 The LU Factorization Algorithm Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 2 / 46
6 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix 4 The LU Factorization Algorithm 5 Permutation Matrices for Row Interchanges Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 2 / 46
7 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix 4 The LU Factorization Algorithm 5 Permutation Matrices for Row Interchanges Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 3 / 46
8 Matrix Factorization Background Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 4 / 46
9 Matrix Factorization Background Gaussian elimination is the principal tool in the direct solution of linear systems of equations. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 4 / 46
10 Matrix Factorization Background Gaussian elimination is the principal tool in the direct solution of linear systems of equations. We will now see that the steps used to solve a system of the form Ax = b can be used to factor a matrix. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 4 / 46
11 Matrix Factorization Background Gaussian elimination is the principal tool in the direct solution of linear systems of equations. We will now see that the steps used to solve a system of the form Ax = b can be used to factor a matrix. The factorization is particularly useful when it has the form A = LU, where L is lower triangular and U is upper triangular. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 4 / 46
12 Matrix Factorization Background Gaussian elimination is the principal tool in the direct solution of linear systems of equations. We will now see that the steps used to solve a system of the form Ax = b can be used to factor a matrix. The factorization is particularly useful when it has the form A = LU, where L is lower triangular and U is upper triangular. Although not all matrices have this type of representation, many do that occur frequently in the application of numerical techniques. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 4 / 46
13 Matrix Factorization Computational Cost Considerations Gaussian elimination applied to an arbitrary linear system Ax = b requires O(n 3 /3) arithmetic operations to determine x. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 5 / 46
14 Matrix Factorization Computational Cost Considerations Gaussian elimination applied to an arbitrary linear system Ax = b requires O(n 3 /3) arithmetic operations to determine x. However, to solve a linear system that involves an uppertriangular system requires only backward substitution, which takes O(n 2 ) operations. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 5 / 46
15 Matrix Factorization Computational Cost Considerations Gaussian elimination applied to an arbitrary linear system Ax = b requires O(n 3 /3) arithmetic operations to determine x. However, to solve a linear system that involves an uppertriangular system requires only backward substitution, which takes O(n 2 ) operations. The number of operations required to solve a lowertriangular systems is similar. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 5 / 46
16 Matrix Factorization Solution Strategy Suppose that A has been factored into the triangular form A = LU, where L is lower triangular and U is upper triangular. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 6 / 46
17 Matrix Factorization Solution Strategy Suppose that A has been factored into the triangular form A = LU, where L is lower triangular and U is upper triangular. Then we can solve for x more easily by using a twostep process: Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 6 / 46
18 Matrix Factorization Solution Strategy Suppose that A has been factored into the triangular form A = LU, where L is lower triangular and U is upper triangular. Then we can solve for x more easily by using a twostep process: First we let y = Ux and solve the lower triangular system Ly = b for y. Since L is triangular, determining y from this equation requires only O(n 2 ) operations. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 6 / 46
19 Matrix Factorization Solution Strategy Suppose that A has been factored into the triangular form A = LU, where L is lower triangular and U is upper triangular. Then we can solve for x more easily by using a twostep process: First we let y = Ux and solve the lower triangular system Ly = b for y. Since L is triangular, determining y from this equation requires only O(n 2 ) operations. Once y is known, the upper triangular system Ux = y requires only an additional O(n 2 ) operations to determine the solution x. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 6 / 46
20 Matrix Factorization Solution Strategy Suppose that A has been factored into the triangular form A = LU, where L is lower triangular and U is upper triangular. Then we can solve for x more easily by using a twostep process: First we let y = Ux and solve the lower triangular system Ly = b for y. Since L is triangular, determining y from this equation requires only O(n 2 ) operations. Once y is known, the upper triangular system Ux = y requires only an additional O(n 2 ) operations to determine the solution x. Solving a linear system Ax = b in factored form means that the number of operations needed to solve the system Ax = b is reduced from O(n 3 /3) to O(2n 2 ). Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 6 / 46
21 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix 4 The LU Factorization Algorithm 5 Permutation Matrices for Row Interchanges Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 7 / 46
22 Matrix Factorization Constructing L & U First, suppose that Gaussian elimination can be performed on the system Ax = b without row interchanges. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 8 / 46
23 Matrix Factorization Constructing L & U First, suppose that Gaussian elimination can be performed on the system Ax = b without row interchanges. With the notation used earlier, this is equivalent to having nonzero pivot elements a (i) ii, for each i = 1, 2,...,n. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 8 / 46
24 Matrix Factorization Constructing L & U First, suppose that Gaussian elimination can be performed on the system Ax = b without row interchanges. With the notation used earlier, this is equivalent to having nonzero pivot elements a (i) ii, for each i = 1, 2,...,n. The first step in the Gaussian elimination process consists of performing, for each j = 2, 3,..., n, the operations (E j m j,1 E 1 ) (E j ), where m j,1 = a(1) j1 a (1) 11 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 8 / 46
25 Matrix Factorization Constructing L & U First, suppose that Gaussian elimination can be performed on the system Ax = b without row interchanges. With the notation used earlier, this is equivalent to having nonzero pivot elements a (i) ii, for each i = 1, 2,...,n. The first step in the Gaussian elimination process consists of performing, for each j = 2, 3,..., n, the operations (E j m j,1 E 1 ) (E j ), where m j,1 = a(1) j1 a (1) 11 These operations transform the system into one in which all the entries in the first column below the diagonal are zero. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 8 / 46
26 Matrix Factorization: Constructing L & U (Cont d) The system of operations in (E j m j,1 E 1 ) (E j ), where m j,1 = a(1) j1 a (1) 11 can be viewed in another way. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 9 / 46
27 Matrix Factorization: Constructing L & U (Cont d) The system of operations in (E j m j,1 E 1 ) (E j ), where m j,1 = a(1) j1 a (1) 11 can be viewed in another way. It is simultaneously accomplished by multiplying the original matrix A on the left by the matrix m M (1) = m n Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 9 / 46
28 Matrix Factorization: Constructing L & U (Cont d) The system of operations in (E j m j,1 E 1 ) (E j ), where m j,1 = a(1) j1 a (1) 11 can be viewed in another way. It is simultaneously accomplished by multiplying the original matrix A on the left by the matrix m M (1) = m n This is called the first Gaussian transformation matrix. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 9 / 46
29 Matrix Factorization Constructing L & U (Cont d) We denote the product of this matrix with A (1) A by A (2) and with b by b (2), Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 10 / 46
30 Matrix Factorization Constructing L & U (Cont d) We denote the product of this matrix with A (1) A by A (2) and with b by b (2), so A (2) x = M (1) Ax = M (1) b = b (2) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 10 / 46
31 Matrix Factorization Constructing L & U (Cont d) We denote the product of this matrix with A (1) A by A (2) and with b by b (2), so A (2) x = M (1) Ax = M (1) b = b (2) In a similar manner we construct M (2), the identity matrix with the entries below the diagonal in the second column replaced by the negatives of the multipliers m j,2 = a(2) j2 a (2) 22. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 10 / 46
32 Matrix Factorization Constructing L & U (Cont d) The product of M (2) with A (2) has zeros below the diagonal in the first two columns, Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 11 / 46
33 Matrix Factorization Constructing L & U (Cont d) The product of M (2) with A (2) has zeros below the diagonal in the first two columns, and we let A (3) x = M (2) A (2) x = M (2) M (1) Ax = M (2) M (1) b = b (3) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 11 / 46
34 Matrix Factorization Constructing L & U (Cont d) In general, with A (k) x = b (k) already formed, Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 12 / 46
35 Matrix Factorization Constructing L & U (Cont d) In general, with A (k) x = b (k) already formed, multiply by the kth Gaussian transformation matrix M (k). = m..... k+1,k m n,k Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 12 / 46
36 Matrix Factorization Constructing L & U (Cont d) to obtain A (k+1) x = M (k) A (k) x Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 13 / 46
37 Matrix Factorization Constructing L & U (Cont d) to obtain A (k+1) x = M (k) A (k) x = M (k) M (1) Ax Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 13 / 46
38 Matrix Factorization Constructing L & U (Cont d) to obtain A (k+1) x = M (k) A (k) x = M (k) M (1) Ax = M (k) b (k) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 13 / 46
39 Matrix Factorization Constructing L & U (Cont d) to obtain A (k+1) x = M (k) A (k) x = M (k) M (1) Ax = M (k) b (k) = b (k+1) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 13 / 46
40 Matrix Factorization Constructing L & U (Cont d) to obtain A (k+1) x = M (k) A (k) x = M (k) M (1) Ax = M (k) b (k) = b (k+1) = M (k) M (1) b Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 13 / 46
41 Matrix Factorization Constructing L & U (Cont d) The process ends with the formation of A (n) x = b (n), where A (n) is the upper triangular matrix a (1) 11 a (1) 12 a (1) 1n 0 a (2)... A (n) 22. = (n 1) a n 1,n 0 0 a (n) n,n Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 14 / 46
42 Matrix Factorization Constructing L & U (Cont d) The process ends with the formation of A (n) x = b (n), where A (n) is the upper triangular matrix a (1) 11 a (1) 12 a (1) 1n 0 a (2)... A (n) 22. = (n 1) a n 1,n 0 0 a (n) n,n given by A (n) = M (n 1) M (n 2) M (1) A Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 14 / 46
43 Matrix Factorization Constructing L & U (Cont d) This process forms the U = A (n) portion of the matrix factorization A = LU. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 15 / 46
44 Matrix Factorization Constructing L & U (Cont d) This process forms the U = A (n) portion of the matrix factorization A = LU. To determine the complementary lower triangular matrix L, Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 15 / 46
45 Matrix Factorization Constructing L & U (Cont d) This process forms the U = A (n) portion of the matrix factorization A = LU. To determine the complementary lower triangular matrix L, first recall the multiplication of A (k) x = b (k) by the Gaussian transformation of M (k) used to obtain: A (k+1) x = M (k) A (k) x = M (k) b (k) = b (k+1), Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 15 / 46
46 Matrix Factorization Constructing L & U (Cont d) This process forms the U = A (n) portion of the matrix factorization A = LU. To determine the complementary lower triangular matrix L, first recall the multiplication of A (k) x = b (k) by the Gaussian transformation of M (k) used to obtain: A (k+1) x = M (k) A (k) x = M (k) b (k) = b (k+1), where M (k) generates the row operations (E j m j,k E k ) (E j ), for j = k + 1,...,n. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 15 / 46
47 Matrix Factorization Constructing L & U (Cont d) To reverse the effects of this transformation and return to A (k) requires that the operations (E j + m j,k E k ) (E j ) be performed for each j = k + 1,...,n. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 16 / 46
48 Matrix Factorization Constructing L & U (Cont d) To reverse the effects of this transformation and return to A (k) requires that the operations (E j + m j,k E k ) (E j ) be performed for each j = k + 1,...,n. This is equivalent to multiplying by [ M (k)] 1 : [ L (k) = M (k)] 1. = m..... k+1,k m n,k Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 16 / 46
49 Matrix Factorization Constructing L & U (Cont d) The lowertriangular matrix L in the factorization of A, then, is the product of the matrices L (k) : m L = L (1) L (2) L (n 1) = m n1 m n,n 1 1 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 17 / 46
50 Matrix Factorization Constructing L & U (Cont d) The lowertriangular matrix L in the factorization of A, then, is the product of the matrices L (k) : m L = L (1) L (2) L (n 1) = m n1 m n,n 1 1 since the product of L with the uppertriangular matrix U = M (n 1) M (2) M (1) A gives Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 17 / 46
51 Matrix Factorization Constructing L & U (Cont d) LU = L (1) L (2) L (n 3) L (n 2) L (n 1) M (n 1) M (n 2) M (n 3) M (2) M (1) A Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 18 / 46
52 Matrix Factorization Constructing L & U (Cont d) LU = L (1) L (2) L (n 3) L (n 2) L (n 1) M (n 1) M (n 2) M (n 3) M (2) M (1) A = [M (1) ] 1 [M (2) ] 1 [M (n 2) ] 1 [M (n 1) ] 1 M (n 1) M (n 2) M (2) M (1) A Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 18 / 46
53 Matrix Factorization Constructing L & U (Cont d) LU = L (1) L (2) L (n 3) L (n 2) L (n 1) M (n 1) M (n 2) M (n 3) M (2) M (1) A = [M (1) ] 1 [M (2) ] 1 [M (n 2) ] 1 [M (n 1) ] 1 M (n 1) M (n 2) M (2) M (1) A = A Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 18 / 46
54 Matrix Factorization Constructing L & U (Cont d) LU = L (1) L (2) L (n 3) L (n 2) L (n 1) M (n 1) M (n 2) M (n 3) M (2) M (1) A = [M (1) ] 1 [M (2) ] 1 [M (n 2) ] 1 [M (n 1) ] 1 M (n 1) M (n 2) M (2) M (1) A = A We now state a theorem which follows from these observations. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 18 / 46
55 Matrix Factorization Theorem If Gaussian elimination can be performed on the linear system Ax = b without row interchanges, Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 19 / 46
56 Matrix Factorization Theorem If Gaussian elimination can be performed on the linear system Ax = b without row interchanges, then the matrix A can be factored into the product of a lowertriangular matrix L and an uppertriangular matrix U, Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 19 / 46
57 Matrix Factorization Theorem If Gaussian elimination can be performed on the linear system Ax = b without row interchanges, then the matrix A can be factored into the product of a lowertriangular matrix L and an uppertriangular matrix U, that is, A = LU, where m ji = a (i) ji /a (i) ii, U = a (1) 11 a (1) 12 a (1) 1n 0 a (2) a (n 1) n 1,n 0 0 a (n) n,n m L = m n1 m n,n 1 1 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 19 / 46
58 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix 4 The LU Factorization Algorithm 5 Permutation Matrices for Row Interchanges Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 20 / 46
59 Matrix Factorization Example (a) Determine the LU factorization for matrix A in the linear system Ax = b, where A = and b = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 21 / 46
60 Matrix Factorization Example (a) Determine the LU factorization for matrix A in the linear system Ax = b, where A = and b = (b) Then use the factorization to solve the system x 1 + x 2 + 3x 4 = 8 2x 1 + x 2 x 3 + x 4 = 7 3x 1 x 2 x 3 + 2x 4 = 14 x 1 + 2x 2 + 3x 3 x 4 = 7 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 21 / 46
61 Matrix Factorization: 4 4 Example Part (a) Solution (1/2) The original system was considered under Gaussian Elimination Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 22 / 46
62 Matrix Factorization: 4 4 Example Part (a) Solution (1/2) The original system was considered under Gaussian Elimination where we saw that the sequence of operations (E 2 2E 1 ) (E 2 ) (E 3 3E 1 ) (E 3 ) (E 4 ( 1)E 1 ) (E 4 ) (E 3 4E 2 ) (E 3 ) (E 4 ( 3)E 2 ) (E 4 ) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 22 / 46
63 Matrix Factorization: 4 4 Example Part (a) Solution (1/2) The original system was considered under Gaussian Elimination where we saw that the sequence of operations (E 2 2E 1 ) (E 2 ) (E 3 3E 1 ) (E 3 ) (E 4 ( 1)E 1 ) (E 4 ) (E 3 4E 2 ) (E 3 ) (E 4 ( 3)E 2 ) (E 4 ) converts the system to the triangular system x 1 + x 2 + 3x 4 = 4 x 2 x 3 5x 4 = 7 3x x 4 = 13 13x 4 = 13 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 22 / 46
64 Matrix Factorization: 4 4 Example Part (a) Solution (2/2) The multipliers m ij and the upper triangular matrix produce the factorization A = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 23 / 46
65 Matrix Factorization: 4 4 Example Part (a) Solution (2/2) The multipliers m ij and the upper triangular matrix produce the factorization A = = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 23 / 46
66 Matrix Factorization: 4 4 Example Part (a) Solution (2/2) The multipliers m ij and the upper triangular matrix produce the factorization A = = = LU Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 23 / 46
67 Matrix Factorization: 4 4 Example Part (b) Solution (1/3) To solve Ax = LUx = = x 1 x 2 x 3 x 4 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 24 / 46
68 Matrix Factorization: 4 4 Example Part (b) Solution (1/3) To solve Ax = LUx = = we first introduce the substitution y = Ux x 1 x 2 x 3 x 4 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 24 / 46
69 Matrix Factorization: 4 4 Example Part (b) Solution (1/3) To solve Ax = LUx = = we first introduce the substitution y = Ux. Then b = L(Ux) = Ly. x 1 x 2 x 3 x 4 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 24 / 46
70 Matrix Factorization: 4 4 Example Part (b) Solution (2/3) First, solve Ly = b (where y = Ux: Ly = y 1 y 2 y 3 y 4 = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 25 / 46
71 Matrix Factorization: 4 4 Example Part (b) Solution (2/3) First, solve Ly = b (where y = Ux: Ly = y 1 y 2 y 3 y 4 = This system is solved for y by a simple forwardsubstitution process: y 1 = 8 2y 1 + y 2 = 7 y 2 = 7 2y 1 = 9. 3y 1 + 4y 2 + y 3 = 14 y 3 = 14 3y 1 4y 2 = 26 y 1 3y 2 + y 4 = 7 y 4 = 7 + y 1 + 3y 2 = 26 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 25 / 46
72 Matrix Factorization: 4 4 Example Part (b) Solution (3/3) We then solve Ux = y for x, the solution of the original system; Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 26 / 46
73 Matrix Factorization: 4 4 Example Part (b) Solution (3/3) We then solve Ux = y for x, the solution of the original system; that is, x x x 3 = x 4 26 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 26 / 46
74 Matrix Factorization: 4 4 Example Part (b) Solution (3/3) We then solve Ux = y for x, the solution of the original system; that is, x x x 3 = x 4 26 Using backward substitution we obtain x 4 = 2, x 3 = 0, x 2 = 1, x 1 = 3. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 26 / 46
75 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix 4 The LU Factorization Algorithm 5 Permutation Matrices for Row Interchanges Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 27 / 46
76 LU Factorization Algorithm (1/3) To factor the n n matrix A = [a ij ] into the product of the lowertriangular matrix L = [l ij ] and the uppertriangular matrix U = [u ij ]; that is, A = LU, where the main diagonal of either L or U consists of all ones: Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 28 / 46
77 LU Factorization Algorithm (1/3) To factor the n n matrix A = [a ij ] into the product of the lowertriangular matrix L = [l ij ] and the uppertriangular matrix U = [u ij ]; that is, A = LU, where the main diagonal of either L or U consists of all ones: INPUT dimension n; the entries a ij, 1 i, j n of A; the diagonal l 11 = = l nn = 1 of L or the diagonal u 11 = = u nn = 1 of U. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 28 / 46
78 LU Factorization Algorithm (1/3) To factor the n n matrix A = [a ij ] into the product of the lowertriangular matrix L = [l ij ] and the uppertriangular matrix U = [u ij ]; that is, A = LU, where the main diagonal of either L or U consists of all ones: INPUT dimension n; the entries a ij, 1 i, j n of A; the diagonal l 11 = = l nn = 1 of L or the diagonal u 11 = = u nn = 1 of U. OUTPUT the entries l ij, 1 j i, 1 i n of L and the entries, u ij, i j n, 1 i n of U. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 28 / 46
79 LU Factorization Algorithm (2/3) Step 1 Select l 11 and u 11 satisfying l 11 u 11 = a 11 If l 11 u 11 = 0 then OUTPUT ( Factorization impossible ) STOP Step 2 For j = 2,...,n set u 1j = a 1j /l 11 (First row of U) l j1 = a j1 /u 11 (First column of L) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 29 / 46
80 LU Factorization Algorithm (2/3) Step 1 Select l 11 and u 11 satisfying l 11 u 11 = a 11 If l 11 u 11 = 0 then OUTPUT ( Factorization impossible ) STOP Step 2 For j = 2,...,n set u 1j = a 1j /l 11 (First row of U) l j1 = a j1 /u 11 (First column of L) Step 3 For i = 2,...,n 1 do Steps 4 and 5: Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 29 / 46
81 LU Factorization Algorithm (2/3) Step 1 Select l 11 and u 11 satisfying l 11 u 11 = a 11 If l 11 u 11 = 0 then OUTPUT ( Factorization impossible ) STOP Step 2 For j = 2,...,n set u 1j = a 1j /l 11 (First row of U) l j1 = a j1 /u 11 (First column of L) Step 3 For i = 2,...,n 1 do Steps 4 and 5: Step 4 Select l ii and u ii satisfying l ii u ii = a ii i 1 k=1 l iku ki If l ii u ii = 0 then OUTPUT ( Factorization impossible ) STOP Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 29 / 46
82 LU Factorization Algorithm (2/3) Step 1 Select l 11 and u 11 satisfying l 11 u 11 = a 11 If l 11 u 11 = 0 then OUTPUT ( Factorization impossible ) STOP Step 2 For j = 2,...,n set u 1j = a 1j /l 11 (First row of U) l j1 = a j1 /u 11 (First column of L) Step 3 For i = 2,...,n 1 do Steps 4 and 5: Step 4 Step 5 Select l ii and u ii satisfying l ii u ii = a ii i 1 k=1 l iku ki If l ii u ii = 0 then OUTPUT ( Factorization impossible ) STOP For j = i + 1,...,n set u ij = 1 l ii [ a ij i 1 k=1 l iku kj ] l ji = 1 u ii [ a ji i 1 k=1 l jku ki ] (ith row of U) (ith column of L) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 29 / 46
83 LU Factorization Algorithm (3/3) Step 6 Select l nn and u nn satisfying l nn u nn = a nn n 1 k=1 l nku kn (Note: If l nn u nn = 0, then A = LU but A is singular) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 30 / 46
84 LU Factorization Algorithm (3/3) Step 6 Select l nn and u nn satisfying l nn u nn = a nn n 1 k=1 l nku kn (Note: If l nn u nn = 0, then A = LU but A is singular) Step 7 OUTPUT (l ij for j = 1,...,i and i = 1,...,n) OUTPUT (u ij for j = i,..., n and i = 1,...,n) STOP Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 30 / 46
85 Matrix Factorization Using the LU Factorization to solve Ax = b Once the matrix factorization is complete, Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 31 / 46
86 Matrix Factorization Using the LU Factorization to solve Ax = b Once the matrix factorization is complete, the solution to a linear system of the form Ax = LUx = b Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 31 / 46
87 Matrix Factorization Using the LU Factorization to solve Ax = b Once the matrix factorization is complete, the solution to a linear system of the form Ax = LUx = b is found by first letting y = Ux Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 31 / 46
88 Matrix Factorization Using the LU Factorization to solve Ax = b Once the matrix factorization is complete, the solution to a linear system of the form Ax = LUx = b is found by first letting and solving for y. y = Ux Ly = b Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 31 / 46
89 Matrix Factorization Using the LU Factorization (Cont d) Since L is lower triangular, we have y 1 = b 1 l 11 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 32 / 46
90 Matrix Factorization Using the LU Factorization (Cont d) Since L is lower triangular, we have y 1 = b 1 and, for each l 11 i = 2, 3,...,n, y i = 1 i 1 b i l ij y j l ii j=1 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 32 / 46
91 Matrix Factorization Using the LU Factorization (Cont d) Since L is lower triangular, we have y 1 = b 1 and, for each l 11 i = 2, 3,...,n, y i = 1 i 1 b i l ij y j l ii After y is found by this forwardsubstitution process, the uppertriangular system Ux = y is solved for x by backward substitution using the equations x n = y n u nn and x i = 1 u ii j=1 y i n j=i+1 u ij x j Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 32 / 46
92 Outline 1 Computation Cost Rationale & Basic Solution Strategy 2 Constructing the Matrix Factorization 3 Example: LU Factorization of a 4 4 Matrix 4 The LU Factorization Algorithm 5 Permutation Matrices for Row Interchanges Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 33 / 46
93 Matrix Factorization: Permutation Matrices Limitations of the LU Factorization Algorithm We assumed that Ax = b can be solved using Gaussian elimination without row interchanges. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 34 / 46
94 Matrix Factorization: Permutation Matrices Limitations of the LU Factorization Algorithm We assumed that Ax = b can be solved using Gaussian elimination without row interchanges. From a practical standpoint, this factorization is useful only when row interchanges are not required to control roundoff error. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 34 / 46
95 Matrix Factorization: Permutation Matrices Limitations of the LU Factorization Algorithm We assumed that Ax = b can be solved using Gaussian elimination without row interchanges. From a practical standpoint, this factorization is useful only when row interchanges are not required to control roundoff error. We will now consider the modifications that must be made when row interchanges are required. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 34 / 46
96 Matrix Factorization: Permutation Matrices We begin with the introduction of a class of matrices that are used to rearrange, or permute, rows of a given matrix. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 35 / 46
97 Matrix Factorization: Permutation Matrices We begin with the introduction of a class of matrices that are used to rearrange, or permute, rows of a given matrix. Permutation Matrix An n n permutation matrix P = [p ij ] is a matrix obtained by rearranging the rows of I n, the identity matrix. This gives a matrix with precisely one nonzero entry in each row and in each column, and each nonzero entry is a 1. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 35 / 46
98 Matrix Factorization: Permutation Matrices Example The matrix is a 3 3 permutation matrix. P = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 36 / 46
99 Matrix Factorization: Permutation Matrices Example The matrix P = is a 3 3 permutation matrix. For any 3 3 matrix A, multiplying on the left by P has the effect of interchanging the second and third rows of A: PA = a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 36 / 46
100 Matrix Factorization: Permutation Matrices Example The matrix P = is a 3 3 permutation matrix. For any 3 3 matrix A, multiplying on the left by P has the effect of interchanging the second and third rows of A: PA = a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 = a 11 a 12 a 13 a 31 a 32 a 33 a 21 a 22 a 23 Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 36 / 46
101 Matrix Factorization: Permutation Matrices Example The matrix P = is a 3 3 permutation matrix. For any 3 3 matrix A, multiplying on the left by P has the effect of interchanging the second and third rows of A: PA = a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 = a 11 a 12 a 13 a 31 a 32 a 33 a 21 a 22 a 23 Similarly, multiplying A on the right by P interchanges the second and third columns of A. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 36 / 46
102 Matrix Factorization: Permutation Matrices Two useful properties of permutation matrices (1/2) Suppose k 1,...,k n is a permutation of the integers 1,...,n Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 37 / 46
103 Matrix Factorization: Permutation Matrices Two useful properties of permutation matrices (1/2) Suppose k 1,...,k n is a permutation of the integers 1,...,n and the permutation matrix P = (p ij ) is defined by p ij = { 1, if j = k i 0, otherwise Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 37 / 46
104 Matrix Factorization: Permutation Matrices Two useful properties of permutation matrices (2/2) Then PA permutes the rows of A; that is, a k1 1 a k1 2 a k1 n a k2 1 a k2 2 a k2 n PA = a kn1 a kn2 a knn Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 38 / 46
105 Matrix Factorization: Permutation Matrices Two useful properties of permutation matrices (2/2) Then PA permutes the rows of A; that is, a k1 1 a k1 2 a k1 n a k2 1 a k2 2 a k2 n PA = a kn1 a kn2 a knn P 1 exists and P 1 = P t. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 38 / 46
106 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination Earlier, we saw that for any nonsingular matrix A, the linear system Ax = b can be solved by Gaussian elimination, with the possibility of row interchanges. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 39 / 46
107 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination Earlier, we saw that for any nonsingular matrix A, the linear system Ax = b can be solved by Gaussian elimination, with the possibility of row interchanges. If we knew the row interchanges that were required to solve the system by Gaussian elimination, we could arrange the original equations in an order that would ensure that no row interchanges are needed. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 39 / 46
108 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination Earlier, we saw that for any nonsingular matrix A, the linear system Ax = b can be solved by Gaussian elimination, with the possibility of row interchanges. If we knew the row interchanges that were required to solve the system by Gaussian elimination, we could arrange the original equations in an order that would ensure that no row interchanges are needed. Hence there is a rearrangement of the equations in the system that permits Gaussian elimination to proceed without row interchanges. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 39 / 46
109 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination (Cont d) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 40 / 46
110 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination (Cont d) This implies that for any nonsingular matrix A, a permutation matrix P exists for which the system PAx = Pb can be solved without row interchanges. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 40 / 46
111 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination (Cont d) This implies that for any nonsingular matrix A, a permutation matrix P exists for which the system PAx = Pb can be solved without row interchanges. As a consequence, this matrix PA can be factored into PA = LU, where L is lower triangular and U is upper triangular. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 40 / 46
112 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination (Cont d) This implies that for any nonsingular matrix A, a permutation matrix P exists for which the system PAx = Pb can be solved without row interchanges. As a consequence, this matrix PA can be factored into PA = LU, where L is lower triangular and U is upper triangular. Because P 1 = P t, this produces the factorization A = P 1 LU = (P t L)U. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 40 / 46
113 Matrix Factorization: Permutation Matrices Permutation Matrices & Gaussian Elimination (Cont d) This implies that for any nonsingular matrix A, a permutation matrix P exists for which the system PAx = Pb can be solved without row interchanges. As a consequence, this matrix PA can be factored into PA = LU, where L is lower triangular and U is upper triangular. Because P 1 = P t, this produces the factorization A = P 1 LU = (P t L)U. The matrix U is still upper triangular, but P t L is not lower triangular unless P = I. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 40 / 46
114 Matrix Factorization: Permutation Matrices Example Determine a factorization in the form A = (P t L)U for the matrix A = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 41 / 46
115 Matrix Factorization: Permutation Matrices Example Determine a factorization in the form A = (P t L)U for the matrix A = Note The matrix A cannot have an LU factorization because a 11 = 0. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 41 / 46
116 Matrix Factorization: Permutation Matrices Solution (1/4) However, using the row interchange (E 1 ) (E 2 ), Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 42 / 46
117 Matrix Factorization: Permutation Matrices Solution (1/4) However, using the row interchange (E 1 ) (E 2 ), followed by (E 3 + E 1 ) (E 3 ) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 42 / 46
118 Matrix Factorization: Permutation Matrices Solution (1/4) However, using the row interchange (E 1 ) (E 2 ), followed by (E 3 + E 1 ) (E 3 ) and (E 4 E 1 ) (E 4 ), Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 42 / 46
119 Matrix Factorization: Permutation Matrices Solution (1/4) However, using the row interchange (E 1 ) (E 2 ), followed by (E 3 + E 1 ) (E 3 ) and (E 4 E 1 ) (E 4 ), produces Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 42 / 46
120 Matrix Factorization: Permutation Matrices Solution (1/4) However, using the row interchange (E 1 ) (E 2 ), followed by (E 3 + E 1 ) (E 3 ) and (E 4 E 1 ) (E 4 ), produces Then, the row interchange (E 2 ) (E 4 ), Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 42 / 46
121 Matrix Factorization: Permutation Matrices Solution (1/4) However, using the row interchange (E 1 ) (E 2 ), followed by (E 3 + E 1 ) (E 3 ) and (E 4 E 1 ) (E 4 ), produces Then, the row interchange (E 2 ) (E 4 ), followed by (E 4 + E 3 ) (E 4 ), Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 42 / 46
122 Matrix Factorization: Permutation Matrices Solution (1/4) However, using the row interchange (E 1 ) (E 2 ), followed by (E 3 + E 1 ) (E 3 ) and (E 4 E 1 ) (E 4 ), produces Then, the row interchange (E 2 ) (E 4 ), followed by (E 4 + E 3 ) (E 4 ), gives the matrix U = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 42 / 46
123 Matrix Factorization: Permutation Matrices Solution (2/4) The permutation matrix associated with the row interchanges Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 43 / 46
124 Matrix Factorization: Permutation Matrices Solution (2/4) The permutation matrix associated with the row interchanges (E 1 ) (E 2 ) and (E 2 ) (E 4 ) Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 43 / 46
125 Matrix Factorization: Permutation Matrices Solution (2/4) The permutation matrix associated with the row interchanges (E 1 ) (E 2 ) and (E 2 ) (E 4 ) is P = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 43 / 46
126 Matrix Factorization: Permutation Matrices Solution (2/4) The permutation matrix associated with the row interchanges (E 1 ) (E 2 ) and (E 2 ) (E 4 ) is P = and PA = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 43 / 46
127 Matrix Factorization: Permutation Matrices Solution (3/4) Gaussian elimination is performed on PA using the same operations as on A, except without the row interchanges. Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 44 / 46
128 Matrix Factorization: Permutation Matrices Solution (3/4) Gaussian elimination is performed on PA using the same operations as on A, except without the row interchanges. That is, (E 2 E 1 ) (E 2 ), (E 3 + E 1 ) (E 3 ), followed by (E 4 + E 3 ) (E 4 ). Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 44 / 46
129 Matrix Factorization: Permutation Matrices Solution (3/4) Gaussian elimination is performed on PA using the same operations as on A, except without the row interchanges. That is, (E 2 E 1 ) (E 2 ), (E 3 + E 1 ) (E 3 ), followed by (E 4 + E 3 ) (E 4 ). The nonzero multipliers for PA are consequently, m 21 = 1, m 31 = 1, and m 43 = 1, and the LU factorization of PA is PA = = LU Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 44 / 46
130 Matrix Factorization: Permutation Matrices Solution (4/4) Multiplying by P 1 = P t produces the factorization A = P 1 (LU) = P t (LU) = (P t L)U Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 45 / 46
131 Matrix Factorization: Permutation Matrices Solution (4/4) Multiplying by P 1 = P t produces the factorization A = P 1 (LU) = P t (LU) = (P t L)U = Numerical Analysis (Chapter 6) Matrix Factorization R L Burden & J D Faires 45 / 46
132 Questions?
Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication).
MAT 2 (Badger, Spring 202) LU Factorization Selected Notes September 2, 202 Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix
More informationFactorization Theorems
Chapter 7 Factorization Theorems This chapter highlights a few of the many factorization theorems for matrices While some factorization results are relatively direct, others are iterative While some factorization
More information7. LU factorization. factorsolve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix
7. LU factorization EE103 (Fall 201112) factorsolve method LU factorization solving Ax = b with A nonsingular the inverse of a nonsingular matrix LU factorization algorithm effect of rounding error sparse
More information7 Gaussian Elimination and LU Factorization
7 Gaussian Elimination and LU Factorization In this final section on matrix factorization methods for solving Ax = b we want to take a closer look at Gaussian elimination (probably the best known method
More informationDiagonal, Symmetric and Triangular Matrices
Contents 1 Diagonal, Symmetric Triangular Matrices 2 Diagonal Matrices 2.1 Products, Powers Inverses of Diagonal Matrices 2.1.1 Theorem (Powers of Matrices) 2.2 Multiplying Matrices on the Left Right by
More informationSolution of Linear Systems
Chapter 3 Solution of Linear Systems In this chapter we study algorithms for possibly the most commonly occurring problem in scientific computing, the solution of linear systems of equations. We start
More informationMATH 304 Linear Algebra Lecture 8: Inverse matrix (continued). Elementary matrices. Transpose of a matrix.
MATH 304 Linear Algebra Lecture 8: Inverse matrix (continued). Elementary matrices. Transpose of a matrix. Inverse matrix Definition. Let A be an n n matrix. The inverse of A is an n n matrix, denoted
More informationSOLVING LINEAR SYSTEMS
SOLVING LINEAR SYSTEMS Linear systems Ax = b occur widely in applied mathematics They occur as direct formulations of real world problems; but more often, they occur as a part of the numerical analysis
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS
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(a) The transpose of a lower triangular matrix is upper triangular, and the transpose of an upper triangular matrix is lower triangular.
Theorem.7.: (Properties of Triangular Matrices) (a) The transpose of a lower triangular matrix is upper triangular, and the transpose of an upper triangular matrix is lower triangular. (b) The product
More information6. Cholesky factorization
6. Cholesky factorization EE103 (Fall 201112) triangular matrices forward and backward substitution the Cholesky factorization solving Ax = b with A positive definite inverse of a positive definite matrix
More informationElementary Matrices and The LU Factorization
lementary Matrices and The LU Factorization Definition: ny matrix obtained by performing a single elementary row operation (RO) on the identity (unit) matrix is called an elementary matrix. There are three
More informationDeterminants. Dr. Doreen De Leon Math 152, Fall 2015
Determinants Dr. Doreen De Leon Math 52, Fall 205 Determinant of a Matrix Elementary Matrices We will first discuss matrices that can be used to produce an elementary row operation on a given matrix A.
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +
More informationSolving Systems of Linear Equations
LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how
More informationDoolittle Decomposition of a Matrix
Doolittle Decomposition of a Matrix It is always possible to factor a square matrix into a lower triangular matrix and an upper triangular matrix. That is, [A] = [L][U] EXAMPLE: = 2 2 2 4 Having the LU
More informationWe seek a factorization of a square matrix A into the product of two matrices which yields an
LU Decompositions We seek a factorization of a square matrix A into the product of two matrices which yields an efficient method for solving the system where A is the coefficient matrix, x is our variable
More informationDETERMINANTS. b 2. x 2
DETERMINANTS 1 Systems of two equations in two unknowns A system of two equations in two unknowns has the form a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 This can be written more concisely in
More information4. MATRICES Matrices
4. MATRICES 170 4. Matrices 4.1. Definitions. Definition 4.1.1. A matrix is a rectangular array of numbers. A matrix with m rows and n columns is said to have dimension m n and may be represented as follows:
More informationUNIT 2 MATRICES  I 2.0 INTRODUCTION. Structure
UNIT 2 MATRICES  I Matrices  I Structure 2.0 Introduction 2.1 Objectives 2.2 Matrices 2.3 Operation on Matrices 2.4 Invertible Matrices 2.5 Systems of Linear Equations 2.6 Answers to Check Your Progress
More informationSolving Linear Systems, Continued and The Inverse of a Matrix
, Continued and The of a Matrix Calculus III Summer 2013, Session II Monday, July 15, 2013 Agenda 1. The rank of a matrix 2. The inverse of a square matrix Gaussian Gaussian solves a linear system by reducing
More informationMatrix Inverse and Determinants
DM554 Linear and Integer Programming Lecture 5 and Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline 1 2 3 4 and Cramer s rule 2 Outline 1 2 3 4 and
More informationLecture 3: Finding integer solutions to systems of linear equations
Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture
More informationSCHOOL OF MATHEMATICS MATHEMATICS FOR PART I ENGINEERING. Self Study Course
SCHOOL OF MATHEMATICS MATHEMATICS FOR PART I ENGINEERING Self Study Course MODULE 17 MATRICES II Module Topics 1. Inverse of matrix using cofactors 2. Sets of linear equations 3. Solution of sets of linear
More informationSolving Systems of Linear Equations. Substitution
Solving Systems of Linear Equations There are two basic methods we will use to solve systems of linear equations: Substitution Elimination We will describe each for a system of two equations in two unknowns,
More informationby the matrix A results in a vector which is a reflection of the given
Eigenvalues & Eigenvectors Example Suppose Then So, geometrically, multiplying a vector in by the matrix A results in a vector which is a reflection of the given vector about the yaxis We observe that
More informationInverses. Stephen Boyd. EE103 Stanford University. October 27, 2015
Inverses Stephen Boyd EE103 Stanford University October 27, 2015 Outline Left and right inverses Inverse Solving linear equations Examples Pseudoinverse Left and right inverses 2 Left inverses a number
More informationNotes on Determinant
ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 918/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without
More information2.1: Determinants by Cofactor Expansion. Math 214 Chapter 2 Notes and Homework. Evaluate a Determinant by Expanding by Cofactors
2.1: Determinants by Cofactor Expansion Math 214 Chapter 2 Notes and Homework Determinants The minor M ij of the entry a ij is the determinant of the submatrix obtained from deleting the i th row and the
More informationUsing row reduction to calculate the inverse and the determinant of a square matrix
Using row reduction to calculate the inverse and the determinant of a square matrix Notes for MATH 0290 Honors by Prof. Anna Vainchtein 1 Inverse of a square matrix An n n square matrix A is called invertible
More informationSolving Linear Systems of Equations. Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.
Solving Linear Systems of Equations Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:
More informationInverses and powers: Rules of Matrix Arithmetic
Contents 1 Inverses and powers: Rules of Matrix Arithmetic 1.1 What about division of matrices? 1.2 Properties of the Inverse of a Matrix 1.2.1 Theorem (Uniqueness of Inverse) 1.2.2 Inverse Test 1.2.3
More informationLinear Dependence Tests
Linear Dependence Tests The book omits a few key tests for checking the linear dependence of vectors. These short notes discuss these tests, as well as the reasoning behind them. Our first test checks
More information1. LINEAR EQUATIONS. A linear equation in n unknowns x 1, x 2,, x n is an equation of the form
1. LINEAR EQUATIONS A linear equation in n unknowns x 1, x 2,, x n is an equation of the form a 1 x 1 + a 2 x 2 + + a n x n = b, where a 1, a 2,..., a n, b are given real numbers. For example, with x and
More informationThe Inverse of a Matrix
The Inverse of a Matrix 7.4 Introduction In number arithmetic every number a ( 0) has a reciprocal b written as a or such that a ba = ab =. Some, but not all, square matrices have inverses. If a square
More information1 Determinants. Definition 1
Determinants The determinant of a square matrix is a value in R assigned to the matrix, it characterizes matrices which are invertible (det 0) and is related to the volume of a parallelpiped described
More information= [a ij ] 2 3. Square matrix A square matrix is one that has equal number of rows and columns, that is n = m. Some examples of square matrices are
This document deals with the fundamentals of matrix algebra and is adapted from B.C. Kuo, Linear Networks and Systems, McGraw Hill, 1967. It is presented here for educational purposes. 1 Introduction In
More informationSolving Systems of Linear Equations
LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how
More informationMATH10212 Linear Algebra. Systems of Linear Equations. Definition. An ndimensional vector is a row or a column of n numbers (or letters): a 1.
MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0534405967. Systems of Linear Equations Definition. An ndimensional vector is a row or a column
More informationSystems of Linear Equations
Systems of Linear Equations Beifang Chen Systems of linear equations Linear systems A linear equation in variables x, x,, x n is an equation of the form a x + a x + + a n x n = b, where a, a,, a n and
More informationFacts About Eigenvalues
Facts About Eigenvalues By Dr David Butler Definitions Suppose A is an n n matrix An eigenvalue of A is a number λ such that Av = λv for some nonzero vector v An eigenvector of A is a nonzero vector v
More information2.5 Elementary Row Operations and the Determinant
2.5 Elementary Row Operations and the Determinant Recall: Let A be a 2 2 matrtix : A = a b. The determinant of A, denoted by det(a) c d or A, is the number ad bc. So for example if A = 2 4, det(a) = 2(5)
More informationMatrices, transposes, and inverses
Matrices, transposes, and inverses Math 40, Introduction to Linear Algebra Wednesday, February, 202 Matrixvector multiplication: two views st perspective: A x is linear combination of columns of A 2 4
More informationSolving Systems of Linear Equations; Row Reduction
Harvey Mudd College Math Tutorial: Solving Systems of Linear Equations; Row Reduction Systems of linear equations arise in all sorts of applications in many different fields of study The method reviewed
More information8 Square matrices continued: Determinants
8 Square matrices continued: Determinants 8. Introduction Determinants give us important information about square matrices, and, as we ll soon see, are essential for the computation of eigenvalues. You
More information(57) (58) (59) (60) (61)
Module 4 : Solving Linear Algebraic Equations Section 5 : Iterative Solution Techniques 5 Iterative Solution Techniques By this approach, we start with some initial guess solution, say for solution and
More informationMAT188H1S Lec0101 Burbulla
Winter 206 Linear Transformations A linear transformation T : R m R n is a function that takes vectors in R m to vectors in R n such that and T (u + v) T (u) + T (v) T (k v) k T (v), for all vectors u
More informationLecture 1: Systems of Linear Equations
MTH Elementary Matrix Algebra Professor Chao Huang Department of Mathematics and Statistics Wright State University Lecture 1 Systems of Linear Equations ² Systems of two linear equations with two variables
More informationMATH36001 Background Material 2015
MATH3600 Background Material 205 Matrix Algebra Matrices and Vectors An ordered array of mn elements a ij (i =,, m; j =,, n) written in the form a a 2 a n A = a 2 a 22 a 2n a m a m2 a mn is said to be
More informationMATH 240 Fall, Chapter 1: Linear Equations and Matrices
MATH 240 Fall, 2007 Chapter Summaries for Kolman / Hill, Elementary Linear Algebra, 9th Ed. written by Prof. J. Beachy Sections 1.1 1.5, 2.1 2.3, 4.2 4.9, 3.1 3.5, 5.3 5.5, 6.1 6.3, 6.5, 7.1 7.3 DEFINITIONS
More informationLinear Codes. In the V[n,q] setting, the terms word and vector are interchangeable.
Linear Codes Linear Codes In the V[n,q] setting, an important class of codes are the linear codes, these codes are the ones whose code words form a subvector space of V[n,q]. If the subspace of V[n,q]
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 informationMath 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = 36 + 41i.
Math 5A HW4 Solutions September 5, 202 University of California, Los Angeles Problem 4..3b Calculate the determinant, 5 2i 6 + 4i 3 + i 7i Solution: The textbook s instructions give us, (5 2i)7i (6 + 4i)(
More informationa 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
More informationSECTION 8.3: THE INVERSE OF A SQUARE MATRIX
(Section 8.3: The Inverse of a Square Matrix) 8.47 SECTION 8.3: THE INVERSE OF A SQUARE MATRIX PART A: (REVIEW) THE INVERSE OF A REAL NUMBER If a is a nonzero real number, then aa 1 = a 1 a = 1. a 1, or
More informationEC9A0: Presessional Advanced Mathematics Course
University of Warwick, EC9A0: Presessional Advanced Mathematics Course Peter J. Hammond & Pablo F. Beker 1 of 55 EC9A0: Presessional Advanced Mathematics Course Slides 1: Matrix Algebra Peter J. Hammond
More information1 VECTOR SPACES AND SUBSPACES
1 VECTOR SPACES AND SUBSPACES What is a vector? Many are familiar with the concept of a vector as: Something which has magnitude and direction. an ordered pair or triple. a description for quantities such
More informationLecture 11. Shuanglin Shao. October 2nd and 7th, 2013
Lecture 11 Shuanglin Shao October 2nd and 7th, 2013 Matrix determinants: addition. Determinants: multiplication. Adjoint of a matrix. Cramer s rule to solve a linear system. Recall that from the previous
More informationAPPLICATIONS OF MATRICES. Adj A is nothing but the transpose of the cofactor matrix [A ij ] of A.
APPLICATIONS OF MATRICES ADJOINT: Let A = [a ij ] be a square matrix of order n. Let Aij be the cofactor of a ij. Then the n th order matrix [A ij ] T is called the adjoint of A. It is denoted by adj
More informationUniversity of Lille I PC first year list of exercises n 7. Review
University of Lille I PC first year list of exercises n 7 Review Exercise Solve the following systems in 4 different ways (by substitution, by the Gauss method, by inverting the matrix of coefficients
More informationSolution. Area(OABC) = Area(OAB) + Area(OBC) = 1 2 det( [ 5 2 1 2. Question 2. Let A = (a) Calculate the nullspace of the matrix A.
Solutions to Math 30 Takehome prelim Question. Find the area of the quadrilateral OABC on the figure below, coordinates given in brackets. [See pp. 60 63 of the book.] y C(, 4) B(, ) A(5, ) O x Area(OABC)
More informationCONTROLLABILITY. Chapter 2. 2.1 Reachable Set and Controllability. Suppose we have a linear system described by the state equation
Chapter 2 CONTROLLABILITY 2 Reachable Set and Controllability Suppose we have a linear system described by the state equation ẋ Ax + Bu (2) x() x Consider the following problem For a given vector x in
More informationDeterminants. Chapter Properties of the Determinant
Chapter 4 Determinants Chapter 3 entailed a discussion of linear transformations and how to identify them with matrices. When we study a particular linear transformation we would like its matrix representation
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 3 Linear Least Squares Prof. Michael T. Heath Department of Computer Science University of Illinois at UrbanaChampaign Copyright c 2002. Reproduction
More informationA matrix over a field F is a rectangular array of elements from F. The symbol
Chapter MATRICES Matrix arithmetic A matrix over a field F is a rectangular array of elements from F The symbol M m n (F) denotes the collection of all m n matrices over F Matrices will usually be denoted
More informationCofactor Expansion: Cramer s Rule
Cofactor Expansion: Cramer s Rule MATH 322, Linear Algebra I J. Robert Buchanan Department of Mathematics Spring 2015 Introduction Today we will focus on developing: an efficient method for calculating
More information2.1: MATRIX OPERATIONS
.: MATRIX OPERATIONS What are diagonal entries and the main diagonal of a matrix? What is a diagonal matrix? When are matrices equal? Scalar Multiplication 45 Matrix Addition Theorem (pg 0) Let A, B, and
More information10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method
578 CHAPTER 1 NUMERICAL METHODS 1. 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 informationPractice Math 110 Final. Instructions: Work all of problems 1 through 5, and work any 5 of problems 10 through 16.
Practice Math 110 Final Instructions: Work all of problems 1 through 5, and work any 5 of problems 10 through 16. 1. Let A = 3 1 1 3 3 2. 6 6 5 a. Use Gauss elimination to reduce A to an upper triangular
More informationMatrix Algebra and Applications
Matrix Algebra and Applications Dudley Cooke Trinity College Dublin Dudley Cooke (Trinity College Dublin) Matrix Algebra and Applications 1 / 49 EC2040 Topic 2  Matrices and Matrix Algebra Reading 1 Chapters
More informationMath 315: Linear Algebra Solutions to Midterm Exam I
Math 35: Linear Algebra s to Midterm Exam I # Consider the following two systems of linear equations (I) ax + by = k cx + dy = l (II) ax + by = 0 cx + dy = 0 (a) Prove: If x = x, y = y and x = x 2, y =
More informationLINEAR ALGEBRA. September 23, 2010
LINEAR ALGEBRA September 3, 00 Contents 0. LUdecomposition.................................... 0. Inverses and Transposes................................. 0.3 Column Spaces and NullSpaces.............................
More informationMathematics Notes for Class 12 chapter 3. Matrices
1 P a g e Mathematics Notes for Class 12 chapter 3. Matrices A matrix is a rectangular arrangement of numbers (real or complex) which may be represented as matrix is enclosed by [ ] or ( ) or Compact form
More informationLecture Notes: Matrix Inverse. 1 Inverse Definition
Lecture Notes: Matrix Inverse Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong taoyf@cse.cuhk.edu.hk Inverse Definition We use I to represent identity matrices,
More information1 Introduction to Matrices
1 Introduction to Matrices In this section, important definitions and results from matrix algebra that are useful in regression analysis are introduced. While all statements below regarding the columns
More informationMatrix Differentiation
1 Introduction Matrix Differentiation ( and some other stuff ) Randal J. Barnes Department of Civil Engineering, University of Minnesota Minneapolis, Minnesota, USA Throughout this presentation I have
More informationMethods for Finding Bases
Methods for Finding Bases Bases for the subspaces of a matrix Rowreduction methods can be used to find bases. Let us now look at an example illustrating how to obtain bases for the row space, null space,
More informationDATA ANALYSIS II. Matrix Algorithms
DATA ANALYSIS II Matrix Algorithms Similarity Matrix Given a dataset D = {x i }, i=1,..,n consisting of n points in R d, let A denote the n n symmetric similarity matrix between the points, given as where
More informationThe Characteristic Polynomial
Physics 116A Winter 2011 The Characteristic Polynomial 1 Coefficients of the characteristic polynomial Consider the eigenvalue problem for an n n matrix A, A v = λ v, v 0 (1) The solution to this problem
More informationCS3220 Lecture Notes: QR factorization and orthogonal transformations
CS3220 Lecture Notes: QR factorization and orthogonal transformations Steve Marschner Cornell University 11 March 2009 In this lecture I ll talk about orthogonal matrices and their properties, discuss
More information5.3 Determinants and Cramer s Rule
290 5.3 Determinants and Cramer s Rule Unique Solution of a 2 2 System The 2 2 system (1) ax + by = e, cx + dy = f, has a unique solution provided = ad bc is nonzero, in which case the solution is given
More informationOperation Count; Numerical Linear Algebra
10 Operation Count; Numerical Linear Algebra 10.1 Introduction Many computations are limited simply by the sheer number of required additions, multiplications, or function evaluations. If floatingpoint
More informationChapter 1  Matrices & Determinants
Chapter 1  Matrices & Determinants Arthur Cayley (August 16, 1821  January 26, 1895) was a British Mathematician and Founder of the Modern British School of Pure Mathematics. As a child, Cayley enjoyed
More information1 Solving LPs: The Simplex Algorithm of George Dantzig
Solving LPs: The Simplex Algorithm of George Dantzig. Simplex Pivoting: Dictionary Format We illustrate a general solution procedure, called the simplex algorithm, by implementing it on a very simple example.
More informationLecture 6. Inverse of Matrix
Lecture 6 Inverse of Matrix Recall that any linear system can be written as a matrix equation In one dimension case, ie, A is 1 1, then can be easily solved as A x b Ax b x b A 1 A b A 1 b provided that
More informationSolutions to Review Problems
Chapter 1 Solutions to Review Problems Chapter 1 Exercise 42 Which of the following equations are not linear and why: (a x 2 1 + 3x 2 2x 3 = 5. (b x 1 + x 1 x 2 + 2x 3 = 1. (c x 1 + 2 x 2 + x 3 = 5. (a
More informationMath 312 Homework 1 Solutions
Math 31 Homework 1 Solutions Last modified: July 15, 01 This homework is due on Thursday, July 1th, 01 at 1:10pm Please turn it in during class, or in my mailbox in the main math office (next to 4W1) Please
More informationRow Echelon Form and Reduced Row Echelon Form
These notes closely follow the presentation of the material given in David C Lay s textbook Linear Algebra and its Applications (3rd edition) These notes are intended primarily for inclass presentation
More information1.2 Solving a System of Linear Equations
1.. SOLVING A SYSTEM OF LINEAR EQUATIONS 1. Solving a System of Linear Equations 1..1 Simple Systems  Basic De nitions As noticed above, the general form of a linear system of m equations in n variables
More informationB such that AB = I and BA = I. (We say B is an inverse of A.) Definition A square matrix A is invertible (or nonsingular) if matrix
Matrix inverses Recall... Definition A square matrix A is invertible (or nonsingular) if matrix B such that AB = and BA =. (We say B is an inverse of A.) Remark Not all square matrices are invertible.
More informationTopic 1: Matrices and Systems of Linear Equations.
Topic 1: Matrices and Systems of Linear Equations Let us start with a review of some linear algebra concepts we have already learned, such as matrices, determinants, etc Also, we shall review the method
More informationLinear Algebra Review Part 2: Ax=b
Linear Algebra Review Part 2: Ax=b Edwin Olson University of Michigan The ThreeDay Plan Geometry of Linear Algebra Vectors, matrices, basic operations, lines, planes, homogeneous coordinates, transformations
More informationUnit 18 Determinants
Unit 18 Determinants Every square matrix has a number associated with it, called its determinant. In this section, we determine how to calculate this number, and also look at some of the properties of
More information9.2 Summation Notation
9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a
More information13 MATH FACTS 101. 2 a = 1. 7. The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.
3 MATH FACTS 0 3 MATH FACTS 3. Vectors 3.. Definition We use the overhead arrow to denote a column vector, i.e., a linear segment with a direction. For example, in threespace, we write a vector in terms
More informationReduced echelon form: Add the following conditions to conditions 1, 2, and 3 above:
Section 1.2: Row Reduction and Echelon Forms Echelon form (or row echelon form): 1. All nonzero rows are above any rows of all zeros. 2. Each leading entry (i.e. left most nonzero entry) of a row is in
More informationLinear Algebra Notes
Linear Algebra Notes Chapter 19 KERNEL AND IMAGE OF A MATRIX Take an n m matrix a 11 a 12 a 1m a 21 a 22 a 2m a n1 a n2 a nm and think of it as a function A : R m R n The kernel of A is defined as Note
More informationThe Solution of Linear Simultaneous Equations
Appendix A The Solution of Linear Simultaneous Equations Circuit analysis frequently involves the solution of linear simultaneous equations. Our purpose here is to review the use of determinants to solve
More informationLecture Notes 1: Matrix Algebra Part B: Determinants and Inverses
University of Warwick, EC9A0 Maths for Economists Peter J. Hammond 1 of 57 Lecture Notes 1: Matrix Algebra Part B: Determinants and Inverses Peter J. Hammond email: p.j.hammond@warwick.ac.uk Autumn 2012,
More informationSimilarity and Diagonalization. Similar Matrices
MATH022 Linear Algebra Brief lecture notes 48 Similarity and Diagonalization Similar Matrices Let A and B be n n matrices. We say that A is similar to B if there is an invertible n n matrix P such that
More information