Direct Methods for Solving Linear Systems. Linear Systems of Equations
|
|
- Agnes Shelton
- 7 years ago
- Views:
Transcription
1 Direct Methods for Solving Linear Systems Linear Systems of Equations 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 Notation & Basic Terminology Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 2 / 43
3 Outline 1 Notation & Basic Terminology 2 3 Operations to Simplify a Linear System of Equations Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 2 / 43
4 Outline 1 Notation & Basic Terminology 2 3 Operations to Simplify a Linear System of Equations 3 Gaussian Elimination Procedure Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 2 / 43
5 Outline 1 Notation & Basic Terminology 2 3 Operations to Simplify a Linear System of Equations 3 Gaussian Elimination Procedure 4 The Gaussian Elimination with Backward Substitution Algorithm Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 2 / 43
6 Outline 1 Notation & Basic Terminology 2 3 Operations to Simplify a Linear System of Equations 3 Gaussian Elimination Procedure 4 The Gaussian Elimination with Backward Substitution Algorithm Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 3 / 43
7 Introduction Linear Systems of Equations We will consider direct methods for solving a linear system of n equations in n variables. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 4 / 43
8 Introduction Linear Systems of Equations We will consider direct methods for solving a linear system of n equations in n variables. Such a system has the form: E 1 : a 11 x 1 + a 12 x a 1n x n = b 1 E 2 : a 21 x 1 + a 22 x a 2n x n = b 2 E n : a n1 x 1 + a n2 x a nn x n = b n. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 4 / 43
9 Introduction Linear Systems of Equations We will consider direct methods for solving a linear system of n equations in n variables. Such a system has the form: E 1 : a 11 x 1 + a 12 x a 1n x n = b 1 E 2 : a 21 x 1 + a 22 x a 2n x n = b 2 E n : a n1 x 1 + a n2 x a nn x n = b n In this system we are given the constants a ij, for each i, j = 1, 2,...,n, and b i, for each i = 1, 2,...,n, and we need to determine the unknowns x 1,...,x n.. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 4 / 43
10 Introduction Direct Methods & Round-off Error Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 5 / 43
11 Introduction Direct Methods & Round-off Error Direct techniques are methods that theoretically give the exact solution to the system in a finite number of steps. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 5 / 43
12 Introduction Direct Methods & Round-off Error Direct techniques are methods that theoretically give the exact solution to the system in a finite number of steps. In practice, of course, the solution obtained will be contaminated by the round-off error that is involved with the arithmetic being used. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 5 / 43
13 Introduction Direct Methods & Round-off Error Direct techniques are methods that theoretically give the exact solution to the system in a finite number of steps. In practice, of course, the solution obtained will be contaminated by the round-off error that is involved with the arithmetic being used. Analyzing the effect of this round-off error and determining ways to keep it under control will be a major component of this presentation. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 5 / 43
14 Introduction Direct Methods & Round-off Error Direct techniques are methods that theoretically give the exact solution to the system in a finite number of steps. In practice, of course, the solution obtained will be contaminated by the round-off error that is involved with the arithmetic being used. Analyzing the effect of this round-off error and determining ways to keep it under control will be a major component of this presentation. We begin, however, by introducing some important terminology and notation. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 5 / 43
15 Matrices & Vectors Definition of a Matrix An n m (n by m) matrix is a rectangular array of elements with n rows and m columns in which not only is the value of an element important, but also its position in the array. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 6 / 43
16 Matrices & Vectors Definition of a Matrix An n m (n by m) matrix is a rectangular array of elements with n rows and m columns in which not only is the value of an element important, but also its position in the array. Notation The notation for an n m matrix will be a capital letter such as A for the matrix and lowercase letters with double subscripts, such as a ij, to refer to the entry at the intersection of the ith row and jth column; that is: a 11 a 12 a 1m a 21 a 22 a 2m A = [a ij ] =... a n1 a n2 a nm Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 6 / 43
17 Matrices & Vectors A Vector is a special case The 1 n matrix A = [a 11 a 12 a 1n ] is called an n-dimensional row vector, and an n 1 matrix a 11 a 21 A =. a n1 is called an n-dimensional column vector. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 7 / 43
18 Matrices & Vectors A Vector is a special case (Cont d) Usually the unnecessary subscripts are omitted for vectors, and a boldface lowercase letter is used for notation. Thus x 1 x 2 x =. x n denotes a column vector, and a row vector. y = [y 1 y 2... y n ] Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 8 / 43
19 Matrices & Vectors: Augmented Matrix The Augmented Matrix (1/2) An n (n + 1) matrix can be used to represent the linear system a 11 x 1 + a 12 x a 1n x n = b 1, a 21 x 1 + a 22 x a 2n x n = b 2,.. a n1 x 1 + a n2 x a nn x n = b n, Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 9 / 43
20 Matrices & Vectors: Augmented Matrix The Augmented Matrix (1/2) An n (n + 1) matrix can be used to represent the linear system by first constructing A = [a ij ] = a 11 x 1 + a 12 x a 1n x n = b 1, a 21 x 1 + a 22 x a 2n x n = b 2,. a n1 x 1 + a n2 x a nn x n = b n, a 11 a 12 a 1n a 21 a 22 a 2n... a n1 a n2 a nn. and b = b 1 b 2. b n Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 9 / 43
21 Matrices & Vectors: Augmented Matrix The Augmented Matrix (2/2) and then forming the new array [A, b]: a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 [A, b] =.... a n1 a n2 a nn b n Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 10 / 43
22 Matrices & Vectors: Augmented Matrix The Augmented Matrix (2/2) and then forming the new array [A, b]: a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 [A, b] =.... a n1 a n2 a nn b n where the vertical line is used to separate the coefficients of the unknowns from the values on the right-hand side of the equations. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 10 / 43
23 Matrices & Vectors: Augmented Matrix The Augmented Matrix (2/2) and then forming the new array [A, b]: a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 [A, b] =.... a n1 a n2 a nn b n where the vertical line is used to separate the coefficients of the unknowns from the values on the right-hand side of the equations. The array [A, b] is called an augmented matrix. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 10 / 43
24 Matrices & Vectors: Augmented Matrix Representing the Linear System In what follows, the n (n + 1) matrix a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 [A, b] =.... a n1 a n2 a nn b n Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 11 / 43
25 Matrices & Vectors: Augmented Matrix Representing the Linear System In what follows, the n (n + 1) matrix a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 [A, b] =.... a n1 a n2 a nn b n will used to represent the linear system a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2. a n1 x 1 + a n2 x a nn x n. = b n Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 11 / 43
26 Outline 1 Notation & Basic Terminology 2 3 Operations to Simplify a Linear System of Equations 3 Gaussian Elimination Procedure 4 The Gaussian Elimination with Backward Substitution Algorithm Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 12 / 43
27 Simplifying a Linear Systems of Equations The Linear System Returning to the linear system of n equations in n variables: E 1 : a 11 x 1 + a 12 x a 1n x n = b 1 E 2 : a 21 x 1 + a 22 x a 2n x n = b 2 E n : a n1 x 1 + a n2 x a nn x n = b n where we are given the constants a ij, for each i, j = 1, 2,...,n, and b i, for each i = 1, 2,...,n,. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 13 / 43
28 Simplifying a Linear Systems of Equations The Linear System Returning to the linear system of n equations in n variables: E 1 : a 11 x 1 + a 12 x a 1n x n = b 1 E 2 : a 21 x 1 + a 22 x a 2n x n = b 2 E n : a n1 x 1 + a n2 x a nn x n = b n where we are given the constants a ij, for each i, j = 1, 2,...,n, and b i, for each i = 1, 2,...,n, we need to determine the unknowns x 1,..., x n.. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 13 / 43
29 Simplifying a Linear Systems of Equations Permissible Operations We will use 3 operations to simplify the linear system: Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 14 / 43
30 Simplifying a Linear Systems of Equations Permissible Operations We will use 3 operations to simplify the linear system: 1 Equation E i can be multiplied by any nonzero constant λ with the resulting equation used in place of E i. This operation is denoted (λe i ) (E i ). Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 14 / 43
31 Simplifying a Linear Systems of Equations Permissible Operations We will use 3 operations to simplify the linear system: 1 Equation E i can be multiplied by any nonzero constant λ with the resulting equation used in place of E i. This operation is denoted (λe i ) (E i ). 2 Equation E j can be multiplied by any constant λ and added to equation E i with the resulting equation used in place of E i. This operation is denoted (E i + λe j ) (E i ). Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 14 / 43
32 Simplifying a Linear Systems of Equations Permissible Operations We will use 3 operations to simplify the linear system: 1 Equation E i can be multiplied by any nonzero constant λ with the resulting equation used in place of E i. This operation is denoted (λe i ) (E i ). 2 Equation E j can be multiplied by any constant λ and added to equation E i with the resulting equation used in place of E i. This operation is denoted (E i + λe j ) (E i ). 3 Equations E i and E j can be transposed in order. This operation is denoted (E i ) (E j ). Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 14 / 43
33 Simplifying a Linear Systems of Equations Permissible Operations We will use 3 operations to simplify the linear system: 1 Equation E i can be multiplied by any nonzero constant λ with the resulting equation used in place of E i. This operation is denoted (λe i ) (E i ). 2 Equation E j can be multiplied by any constant λ and added to equation E i with the resulting equation used in place of E i. This operation is denoted (E i + λe j ) (E i ). 3 Equations E i and E j can be transposed in order. This operation is denoted (E i ) (E j ). By a sequence of these operations, a linear system will be systematically transformed into to a new linear system that is more easily solved and has the same solutions. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 14 / 43
34 Simplifying a Linear Systems of Equations Illustration The four equations E 1 : x 1 + x 2 + 3x 4 = 4 will be solved for x 1, x 2, x 3, and x 4. E 2 : 2x 1 + x 2 x 3 + x 4 = 1 E 3 : 3x 1 x 2 x 3 + 2x 4 = 3 E 4 : x 1 + 2x 2 + 3x 3 x 4 = 4 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 15 / 43
35 Simplifying a Linear Systems of Equations Illustration The four equations E 1 : x 1 + x 2 + 3x 4 = 4 will be solved for x 1, x 2, x 3, and x 4. E 2 : 2x 1 + x 2 x 3 + x 4 = 1 E 3 : 3x 1 x 2 x 3 + 2x 4 = 3 E 4 : x 1 + 2x 2 + 3x 3 x 4 = 4 We first use equation E 1 to eliminate the unknown x 1 from equations E 2, E 3, and E 4 by performing: (E 2 2E 1 ) (E 2 ) (E 3 3E 1 ) (E 3 ) and (E 4 + E 1 ) (E 4 ) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 15 / 43
36 Simplifying a Linear Systems of Equations E 1 : x 1 +x 2 +3x 4 =4 E 2 : 2x 1 +x 2 x 3 + x 4 =1 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 16 / 43
37 Simplifying a Linear Systems of Equations Illustration Cont d (2/5) E 1 : x 1 +x 2 +3x 4 =4 E 2 : 2x 1 +x 2 x 3 + x 4 =1 For example, in the second equation (E 2 2E 1 ) (E 2 ) produces (2x 1 + x 2 x 3 + x 4 ) 2(x 1 + x 2 + 3x 4 ) = 1 2(4) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 16 / 43
38 Simplifying a Linear Systems of Equations Illustration Cont d (2/5) E 1 : x 1 +x 2 +3x 4 =4 E 2 : 2x 1 +x 2 x 3 + x 4 =1 For example, in the second equation (E 2 2E 1 ) (E 2 ) produces (2x 1 + x 2 x 3 + x 4 ) 2(x 1 + x 2 + 3x 4 ) = 1 2(4) which simplifies to the result shown as E 2 in E 1 : x 1 + x 2 + 3x 4 = 4 E 2 : x 2 x 3 5x 4 = 7 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 16 / 43
39 Simplifying a Linear Systems of Equations Illustration Cont d (3/5) Similarly for equations E 3 and E 4 so that we obtain the new system: E 1 : x 1 + x 2 + 3x 4 = 4 E 2 : x 2 x 3 5x 4 = 7 E 3 : 4x 2 x 3 7x 4 = 15 E 4 : 3x 2 + 3x 3 + 2x 4 = 8 For simplicity, the new equations are again labeled E 1, E 2, E 3, and E 4. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 17 / 43
40 Simplifying a Linear Systems of Equations Illustration Cont d (4/5) In the new system, E 2 is used to eliminate the unknown x 2 from E 3 and E 4 by performing (E 3 4E 2 ) (E 3 ) and (E 4 + 3E 2 ) (E 4 ). Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 18 / 43
41 Simplifying a Linear Systems of Equations Illustration Cont d (4/5) In the new system, E 2 is used to eliminate the unknown x 2 from E 3 and E 4 by performing (E 3 4E 2 ) (E 3 ) and (E 4 + 3E 2 ) (E 4 ). This results in E 1 : x 1 + x 2 + 3x 4 = 4, E 2 : x 2 x 3 5x 4 = 7, E 3 : 3x x 4 = 13, E 4 : 13x 4 = 13. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 18 / 43
42 Simplifying a Linear Systems of Equations Illustration Cont d (4/5) In the new system, E 2 is used to eliminate the unknown x 2 from E 3 and E 4 by performing (E 3 4E 2 ) (E 3 ) and (E 4 + 3E 2 ) (E 4 ). This results in E 1 : x 1 + x 2 + 3x 4 = 4, E 2 : x 2 x 3 5x 4 = 7, E 3 : 3x x 4 = 13, E 4 : 13x 4 = 13. This latter system of equations is now in triangular (or reduced) form and can be solved for the unknowns by a backward-substitution process. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 18 / 43
43 Simplifying a Linear Systems of Equations Illustration Cont d (5/5) Since E 4 implies x 4 = 1, we can solve E 3 for x 3 to give x 3 = 1 3 (13 13x 4) = 1 (13 13) = 0. 3 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 19 / 43
44 Simplifying a Linear Systems of Equations Illustration Cont d (5/5) Since E 4 implies x 4 = 1, we can solve E 3 for x 3 to give Continuing, E 2 gives x 3 = 1 3 (13 13x 4) = 1 (13 13) = 0. 3 x 2 = ( 7 + 5x 4 + x 3 ) = ( ) = 2, Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 19 / 43
45 Simplifying a Linear Systems of Equations Illustration Cont d (5/5) Since E 4 implies x 4 = 1, we can solve E 3 for x 3 to give Continuing, E 2 gives and E 1 gives x 3 = 1 3 (13 13x 4) = 1 (13 13) = 0. 3 x 2 = ( 7 + 5x 4 + x 3 ) = ( ) = 2, x 1 = 4 3x 4 x 2 = = 1. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 19 / 43
46 Simplifying a Linear Systems of Equations Illustration Cont d (5/5) Since E 4 implies x 4 = 1, we can solve E 3 for x 3 to give Continuing, E 2 gives and E 1 gives x 3 = 1 3 (13 13x 4) = 1 (13 13) = 0. 3 x 2 = ( 7 + 5x 4 + x 3 ) = ( ) = 2, x 1 = 4 3x 4 x 2 = = 1. The solution is therefore, x 1 = 1, x 2 = 2, x 3 = 0, and x 4 = 1. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 19 / 43
47 Outline 1 Notation & Basic Terminology 2 3 Operations to Simplify a Linear System of Equations 3 Gaussian Elimination Procedure 4 The Gaussian Elimination with Backward Substitution Algorithm Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 20 / 43
48 Constructing an Algorithm to Solve the Linear System E 1 : x 1 + x 2 + 3x 4 = 4 E 2 : 2x 1 + x 2 x 3 + x 4 = 1 E 3 : 3x 1 x 2 x 3 + 2x 4 = 3 E 4 : x 1 + 2x 2 + 3x 3 x 4 = 4 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 21 / 43
49 Constructing an Algorithm to Solve the Linear System E 1 : x 1 + x 2 + 3x 4 = 4 E 2 : 2x 1 + x 2 x 3 + x 4 = 1 E 3 : 3x 1 x 2 x 3 + 2x 4 = 3 E 4 : x 1 + 2x 2 + 3x 3 x 4 = 4 Converting to Augmented Form Repeating the operations involved in the previous illustration with the matrix notation results in first considering the augmented matrix: Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 21 / 43
50 Constructing an Algorithm to Solve the Linear System Reducing to Triangular Form Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 22 / 43
51 Constructing an Algorithm to Solve the Linear System Reducing to Triangular Form Performing the operations as described in the earlier example produces the augmented matrices: and Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 22 / 43
52 Constructing an Algorithm to Solve the Linear System Reducing to Triangular Form Performing the operations as described in the earlier example produces the augmented matrices: and The final matrix can now be transformed into its corresponding linear system, and solutions for x 1, x 2, x 3, and x 4, can be obtained. The procedure is called Gaussian elimination with backward substitution. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 22 / 43
53 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure The general Gaussian elimination procedure applied to the linear system E 1 : a 11 x 1 + a 12 x a 1n x n = b 1 E 2 : a 21 x 1 + a 22 x a 2n x n = b 2. E n : a n1 x 1 + a n2 x a nn x n = b n will be handled in a similar manner.. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 23 / 43
54 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) First form the augmented matrix Ã: a 11 a 12 a 1n a 1,n+1 a 21 a 22 a 2n a 2,n+1 Ã = [A, b] =.... a n1 a n2 a nn a n,n+1 where A denotes the matrix formed by the coefficients. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 24 / 43
55 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) First form the augmented matrix Ã: a 11 a 12 a 1n a 1,n+1 a 21 a 22 a 2n a 2,n+1 Ã = [A, b] =.... a n1 a n2 a nn a n,n+1 where A denotes the matrix formed by the coefficients. The entries in the (n + 1)st column are the values of b; that is, a i,n+1 = b i for each i = 1, 2,...,n. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 24 / 43
56 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) Provided a 11 0, we perform the operations corresponding to (E j (a j1 /a 11 )E 1 ) (E j ) for each j = 2, 3,...,n to eliminate the coefficient of x 1 in each of these rows. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 25 / 43
57 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) Provided a 11 0, we perform the operations corresponding to (E j (a j1 /a 11 )E 1 ) (E j ) for each j = 2, 3,...,n to eliminate the coefficient of x 1 in each of these rows. Although the entries in rows 2, 3,...,n are expected to change, for ease of notation we again denote the entry in the ith row and the jth column by a ij. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 25 / 43
58 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) Provided a 11 0, we perform the operations corresponding to (E j (a j1 /a 11 )E 1 ) (E j ) for each j = 2, 3,...,n to eliminate the coefficient of x 1 in each of these rows. Although the entries in rows 2, 3,...,n are expected to change, for ease of notation we again denote the entry in the ith row and the jth column by a ij. With this in mind, we follow a sequential procedure for i = 2, 3,...,n 1 and perform the operation (E j (a ji /a ii )E i ) (E j ) for each j = i + 1, i + 2,..., n, provided a ii 0. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 25 / 43
59 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) This eliminates (changes the coefficient to zero) x i in each row below the ith for all values of i = 1, 2,...,n 1. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 26 / 43
60 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) This eliminates (changes the coefficient to zero) x i in each row below the ith for all values of i = 1, 2,...,n 1. The resulting matrix has the form: a 11 a 12 a 1n a 1,n+1 0 a 22 a 2n a 2,n+1 Ã = a nn a n,n+1 where, except in the first row, the values of a ij are not expected to agree with those in the original matrix Ã. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 26 / 43
61 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) This eliminates (changes the coefficient to zero) x i in each row below the ith for all values of i = 1, 2,...,n 1. The resulting matrix has the form: a 11 a 12 a 1n a 1,n+1 0 a 22 a 2n a 2,n+1 à = a nn a n,n+1 where, except in the first row, the values of a ij are not expected to agree with those in the original matrix Ã. The matrix à represents a linear system with the same solution set as the original system. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 26 / 43
62 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) The new linear system is triangular, a 11 x 1 + a 12 x a 1n x n = a 1,n+1 a 22 x a 2n x n = a 2,n a nn x n = a n,n+1 so backward substitution can be performed. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 27 / 43
63 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) The new linear system is triangular, a 11 x 1 + a 12 x a 1n x n = a 1,n+1 a 22 x a 2n x n = a 2,n a nn x n = a n,n+1 so backward substitution can be performed. Solving the nth equation for x n gives x n = a n,n+1 a nn Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 27 / 43
64 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) Solving the (n 1)st equation for x n 1 and using the known value for x n yields x n 1 = a n 1,n+1 a n 1,n x n a n 1,n 1 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 28 / 43
65 Gaussian Elimination with Backward Substitution Basic Steps in the Procedure (Cont d) Solving the (n 1)st equation for x n 1 and using the known value for x n yields x n 1 = a n 1,n+1 a n 1,n x n a n 1,n 1 Continuing this process, we obtain x i = a i,n+1 a i,n x n a i,n 1 x n 1 a i,i+1 x i+1 a ii = a i,n+1 n j=i+1 a ijx j a ii for each i = n 1, n 2,...,2, 1. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 28 / 43
66 Gaussian Elimination with Backward Substitution A More Precise Description Gaussian elimination procedure is described more precisely, although more intricately, by forming a sequence of augmented matrices Ã(1), à (2),..., Ã(n), where Ã(1) is the matrix à given earlier and Ã(k), for each k = 2, 3,...,n, has entries a (k) ij, where: a (k) ij = a (k 1) ij when i = 1,2,...,k 1 and j = 1,2,...,n when i = k,k + 1,...,n and j = 1,2,...,k 1 a (k 1) ij a(k 1) i,k 1 a (k 1) k 1,k 1 a (k 1) k 1,j when i = k,k + 1,...,n and j = k,k + 1,...,n + 1 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 29 / 43
67 Gaussian Elimination with Backward Substitution A More Precise Description (Cont d) Thus à (k) = a (1) 11 a (1) 12 a (1) 13 a (1) 1,k 1 a (1) 1k a (1) 1n a (1) 1,n+1 0 a (2) 22 a (2) 23 a (2) 2,k 1 a (2) 2k a (2) 2n a (2) 2,n a (k 1) k 1,k 1 a (k 1) k 1,k a (k 1) k 1,n. 0 a (k) kk a (k) kn a (k) nk a (k) nn a (k 1) k 1,n+1 a (k) k,n+1. a (k) n,n+1 represents the equivalent linear system for which the variable x k 1 has just been eliminated from equations E k, E k+1,...,e n. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 30 / 43
68 Gaussian Elimination with Backward Substitution A More Precise Description (Cont d) The procedure will fail if one of the elements a (1) 11, a(2) 22, a(3) 33,..., a (n 1) n 1,n 1, a(n) nn is zero because the step E i a(k) i,k a (k) kk (E k ) E i either cannot be performed (this occurs if one of a (1) 11,..., a(n 1) is zero), or the backward substitution cannot be accomplished (in the case a (n) nn = 0). n 1,n 1 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 31 / 43
69 Gaussian Elimination with Backward Substitution A More Precise Description (Cont d) The procedure will fail if one of the elements a (1) 11, a(2) 22, a(3) 33,..., a (n 1) n 1,n 1, a(n) nn is zero because the step E i a(k) i,k a (k) kk (E k ) E i either cannot be performed (this occurs if one of a (1) 11,..., a(n 1) n 1,n 1 is zero), or the backward substitution cannot be accomplished (in the case a (n) nn = 0). The system may still have a solution, but the technique for finding it must be altered. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 31 / 43
70 Illustration of the Gaussian Elimination Procedure Example Represent the linear system E 1 : x 1 x 2 + 2x 3 x 4 = 8 E 2 : 2x 1 2x 2 + 3x 3 3x 4 = 20 E 3 : x 1 + x 2 + x 3 = 2 E 4 : x 1 x 2 + 4x 3 + 3x 4 = 4 as an augmented matrix and use Gaussian Elimination to find its solution. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 32 / 43
71 Illustration of the Gaussian Elimination Procedure Solution (1/6) The augmented matrix is à = Ã(1) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 33 / 43
72 Illustration of the Gaussian Elimination Procedure Solution (1/6) The augmented matrix is à = Ã(1) = Performing the operations (E 2 2E 1 ) (E 2 ), (E 3 E 1 ) (E 3 ) and (E 4 E 1 ) (E 4 ) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 33 / 43
73 Illustration of the Gaussian Elimination Procedure Solution (1/6) The augmented matrix is à = Ã(1) = Performing the operations (E 2 2E 1 ) (E 2 ), (E 3 E 1 ) (E 3 ) and (E 4 E 1 ) (E 4 ) gives à (2) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 33 / 43
74 Illustration of the Gaussian Elimination Procedure à (2) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 34 / 43
75 Illustration of the Gaussian Elimination Procedure Solution (2/6) Ã (2) = The diagonal entry a (2) 22, called the pivot element, is 0, so the procedure cannot continue in its present form. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 34 / 43
76 Illustration of the Gaussian Elimination Procedure Solution (2/6) Ã (2) = The diagonal entry a (2) 22, called the pivot element, is 0, so the procedure cannot continue in its present form. But operations (E i ) (E j ) are permitted, so a search is made of the elements a (2) 32 and a(2) 42 for the first nonzero element. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 34 / 43
77 Illustration of the Gaussian Elimination Procedure Solution (2/6) Ã (2) = The diagonal entry a (2) 22, called the pivot element, is 0, so the procedure cannot continue in its present form. But operations (E i ) (E j ) are permitted, so a search is made of the elements a (2) 32 and a(2) 42 for the first nonzero element. Since a (2) 32 0, the operation (E 2) (E 3 ) can be performed to obtain a new matrix. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 34 / 43
78 Illustration of the Gaussian Elimination Procedure à (2) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 35 / 43
79 Illustration of the Gaussian Elimination Procedure à (2) = Solution (3/6) Perform the operation (E 2 ) (E 3 ) to obtain a new matrix: à (2) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 35 / 43
80 Illustration of the Gaussian Elimination Procedure à (2) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 36 / 43
81 Illustration of the Gaussian Elimination Procedure à (2) = Solution (4/6) Since x 2 is already eliminated from E 3 and E 4, Ã(3) will be Ã(2), and the computations continue with the operation (E 4 + 2E 3 ) (E 4 ), giving à (4) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 36 / 43
82 Illustration of the Gaussian Elimination Procedure à (4) = Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 37 / 43
83 Illustration of the Gaussian Elimination Procedure Solution (5/6) Ã (4) = The solution may now be found through backward substitution: x 4 = 4 2 = 2 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 37 / 43
84 Illustration of the Gaussian Elimination Procedure Solution (5/6) Ã (4) = The solution may now be found through backward substitution: x 4 = 4 2 = 2 x 3 = [ 4 ( 1)x 4] 1 = 2 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 37 / 43
85 Illustration of the Gaussian Elimination Procedure Solution (5/6) Ã (4) = The solution may now be found through backward substitution: x 4 = 4 2 = 2 x 3 = [ 4 ( 1)x 4] = 2 1 x 2 = [6 x 4 ( 1)x 3 ] = 3 2 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 37 / 43
86 Illustration of the Gaussian Elimination Procedure Solution (5/6) Ã (4) = The solution may now be found through backward substitution: x 4 = 4 2 = 2 x 3 = [ 4 ( 1)x 4] = 2 1 x 2 = [6 x 4 ( 1)x 3 ] = 3 2 x 1 = [ 8 ( 1)x 4 2x 3 ( 1)x 2 ] 1 = 7 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 37 / 43
87 Illustration of the Gaussian Elimination Procedure Solution (6/6): Some Observations The example illustrates what is done if a (k) kk = 0 for some k = 1, 2,...,n 1. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 38 / 43
88 Illustration of the Gaussian Elimination Procedure Solution (6/6): Some Observations The example illustrates what is done if a (k) kk = 0 for some k = 1, 2,...,n 1. The kth column of Ã(k 1) from the kth row to the nth row is searched for the first nonzero entry. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 38 / 43
89 Illustration of the Gaussian Elimination Procedure Solution (6/6): Some Observations The example illustrates what is done if a (k) kk = 0 for some k = 1, 2,...,n 1. The kth column of Ã(k 1) from the kth row to the nth row is searched for the first nonzero entry. If a (k) pk 0 for some p,with k + 1 p n, then the operation (E k ) (E p ) is performed to obtain Ã(k 1). Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 38 / 43
90 Illustration of the Gaussian Elimination Procedure Solution (6/6): Some Observations The example illustrates what is done if a (k) kk = 0 for some k = 1, 2,...,n 1. The kth column of Ã(k 1) from the kth row to the nth row is searched for the first nonzero entry. If a (k) pk 0 for some p,with k + 1 p n, then the operation (E k ) (E p ) is performed to obtain Ã(k 1). The procedure can then be continued to form Ã(k), and so on. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 38 / 43
91 Illustration of the Gaussian Elimination Procedure Solution (6/6): Some Observations The example illustrates what is done if a (k) kk = 0 for some k = 1, 2,...,n 1. The kth column of Ã(k 1) from the kth row to the nth row is searched for the first nonzero entry. If a (k) pk 0 for some p,with k + 1 p n, then the operation (E k ) (E p ) is performed to obtain Ã(k 1). The procedure can then be continued to form Ã(k), and so on. If a (k) pk = 0 for each p, it can be shown that the linear system does not have a unique solution and the procedure stops. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 38 / 43
92 Illustration of the Gaussian Elimination Procedure Solution (6/6): Some Observations The example illustrates what is done if a (k) kk = 0 for some k = 1, 2,...,n 1. The kth column of Ã(k 1) from the kth row to the nth row is searched for the first nonzero entry. If a (k) pk 0 for some p,with k + 1 p n, then the operation (E k ) (E p ) is performed to obtain Ã(k 1). The procedure can then be continued to form Ã(k), and so on. If a (k) pk = 0 for each p, it can be shown that the linear system does not have a unique solution and the procedure stops. Finally, if a (n) nn = 0, the linear system does not have a unique solution, and again the procedure stops. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 38 / 43
93 Outline 1 Notation & Basic Terminology 2 3 Operations to Simplify a Linear System of Equations 3 Gaussian Elimination Procedure 4 The Gaussian Elimination with Backward Substitution Algorithm Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 39 / 43
94 Gaussian Elimination with Backward Substitution Algorithm (1/3) To solve the n n linear system E 1 : E 2 :. a 11 x 1 + a 12 x a 1n x n = a 1,n+1 a 21 x 1 + a 22 x a 2n x n = a 2,n E n : a n1 x 1 + a n2 x a nn x n = a n,n+1 Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 40 / 43
95 Gaussian Elimination with Backward Substitution Algorithm (1/3) To solve the n n linear system E 1 : E 2 :. a 11 x 1 + a 12 x a 1n x n = a 1,n+1 a 21 x 1 + a 22 x a 2n x n = a 2,n E n : a n1 x 1 + a n2 x a nn x n = a n,n+1 INPUT number of unknowns and equations n; augmented matrix A = [a ij ], where 1 i n and 1 j n + 1. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 40 / 43
96 Gaussian Elimination with Backward Substitution Algorithm (1/3) To solve the n n linear system E 1 : E 2 :. a 11 x 1 + a 12 x a 1n x n = a 1,n+1 a 21 x 1 + a 22 x a 2n x n = a 2,n E n : a n1 x 1 + a n2 x a nn x n = a n,n+1 INPUT OUTPUT number of unknowns and equations n; augmented matrix A = [a ij ], where 1 i n and 1 j n + 1. solution x 1, x 2,..., x n or message that the linear system has no unique solution. Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 40 / 43
97 Gaussian Elimination with Backward Substitution Algorithm (2/3) Step 1 For i = 1,...,n 1 do Steps 2 4: (Elimination process) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 41 / 43
98 Gaussian Elimination with Backward Substitution Algorithm (2/3) Step 1 For i = 1,...,n 1 do Steps 2 4: (Elimination process) Step 2 Let p be the smallest integer with i p n and a pi 0 If no integer p can be found then OUTPUT ( no unique solution exists ) STOP Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 41 / 43
99 Gaussian Elimination with Backward Substitution Algorithm (2/3) Step 1 For i = 1,...,n 1 do Steps 2 4: (Elimination process) Step 2 Let p be the smallest integer with i p n and a pi 0 If no integer p can be found then OUTPUT ( no unique solution exists ) STOP Step 3 If p i then perform (E p ) (E i ) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 41 / 43
100 Gaussian Elimination with Backward Substitution Algorithm (2/3) Step 1 For i = 1,...,n 1 do Steps 2 4: (Elimination process) Step 2 Let p be the smallest integer with i p n and a pi 0 If no integer p can be found then OUTPUT ( no unique solution exists ) STOP Step 3 If p i then perform (E p ) (E i ) Step 4 For j = i + 1,...,n do Steps 5 and 6: Step 5 Set m ji = a ji /a ii Step 6 Perform (E j m ji E i ) (E j ) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 41 / 43
101 Gaussian Elimination with Backward Substitution Algorithm (3/3) Step 7 If a nn = 0 then OUTPUT ( no unique solution exists ) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 42 / 43
102 Gaussian Elimination with Backward Substitution Algorithm (3/3) Step 7 If a nn = 0 then OUTPUT ( no unique solution exists ) Step 8 Set x n = a n,n+1 /a nn (Start backward substitution) Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 42 / 43
103 Gaussian Elimination with Backward Substitution Algorithm (3/3) Step 7 If a nn = 0 then OUTPUT ( no unique solution exists ) Step 8 Set x n = a n,n+1 /a nn (Start backward substitution) Step 9 For i = n 1,...,1 set x i = [ a i,n+1 n j=i+1 a ijx j ] / a ii Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 42 / 43
104 Gaussian Elimination with Backward Substitution Algorithm (3/3) Step 7 If a nn = 0 then OUTPUT ( no unique solution exists ) Step 8 Set x n = a n,n+1 /a nn (Start backward substitution) Step 9 For i = n 1,...,1 set x i = [ a i,n+1 n j=i+1 a ijx j ] / a ii Step 10 OUTPUT (x 1,..., x n ) (Procedure completed successfully) STOP Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 42 / 43
105 Questions?
Direct Methods for Solving Linear Systems. Matrix Factorization
Direct Methods for Solving Linear Systems Matrix Factorization Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011
More 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. + + 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 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 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 informationDecember 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS
December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation
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 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 informationSolving Systems of Linear Equations Using Matrices
Solving Systems of Linear Equations Using Matrices What is a Matrix? A matrix is a compact grid or array of numbers. It can be created from a system of equations and used to solve the system of equations.
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 informationAbstract: 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 informationNotes on Determinant
ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without
More informationMATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional 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 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column
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 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 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 informationLinear Programming. March 14, 2014
Linear Programming March 1, 01 Parts of this introduction to linear programming were adapted from Chapter 9 of Introduction to Algorithms, Second Edition, by Cormen, Leiserson, Rivest and Stein [1]. 1
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 floating-point
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 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 Row-reduction 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 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 information2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system
1. Systems of linear equations We are interested in the solutions to systems of linear equations. A linear equation is of the form 3x 5y + 2z + w = 3. The key thing is that we don t multiply the variables
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 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 informationSYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison
SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections
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 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 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 informationSolution to Homework 2
Solution to Homework 2 Olena Bormashenko September 23, 2011 Section 1.4: 1(a)(b)(i)(k), 4, 5, 14; Section 1.5: 1(a)(b)(c)(d)(e)(n), 2(a)(c), 13, 16, 17, 18, 27 Section 1.4 1. Compute the following, if
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 information6. Cholesky factorization
6. Cholesky factorization EE103 (Fall 2011-12) triangular matrices forward and backward substitution the Cholesky factorization solving Ax = b with A positive definite inverse of a positive definite matrix
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 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 information5.5. Solving linear systems by the elimination method
55 Solving linear systems by the elimination method Equivalent systems The major technique of solving systems of equations is changing the original problem into another one which is of an easier to solve
More informationLinear Algebra Notes for Marsden and Tromba Vector Calculus
Linear Algebra Notes for Marsden and Tromba Vector Calculus n-dimensional Euclidean Space and Matrices Definition of n space As was learned in Math b, a point in Euclidean three space can be thought of
More informationQuestion 2: How do you solve a matrix equation using the matrix inverse?
Question : How do you solve a matrix equation using the matrix inverse? In the previous question, we wrote systems of equations as a matrix equation AX B. In this format, the matrix A contains the coefficients
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 information1 Determinants and the Solvability of Linear Systems
1 Determinants and the Solvability of Linear Systems In the last section we learned how to use Gaussian elimination to solve linear systems of n equations in n unknowns The section completely side-stepped
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 informationLecture Notes 2: Matrices as Systems of Linear Equations
2: Matrices as Systems of Linear Equations 33A Linear Algebra, Puck Rombach Last updated: April 13, 2016 Systems of Linear Equations Systems of linear equations can represent many things You have probably
More informationArithmetic and Algebra of Matrices
Arithmetic and Algebra of Matrices Math 572: Algebra for Middle School Teachers The University of Montana 1 The Real Numbers 2 Classroom Connection: Systems of Linear Equations 3 Rational Numbers 4 Irrational
More informationIntroduction to Matrix Algebra
Psychology 7291: Multivariate Statistics (Carey) 8/27/98 Matrix Algebra - 1 Introduction to Matrix Algebra Definitions: A matrix is a collection of numbers ordered by rows and columns. It is customary
More informationName: Section Registered In:
Name: Section Registered In: Math 125 Exam 3 Version 1 April 24, 2006 60 total points possible 1. (5pts) Use Cramer s Rule to solve 3x + 4y = 30 x 2y = 8. Be sure to show enough detail that shows you are
More information7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix
7. LU factorization EE103 (Fall 2011-12) factor-solve method LU factorization solving Ax = b with A nonsingular the inverse of a nonsingular matrix LU factorization algorithm effect of rounding error sparse
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 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 informationMAT 242 Test 2 SOLUTIONS, FORM T
MAT 242 Test 2 SOLUTIONS, FORM T 5 3 5 3 3 3 3. Let v =, v 5 2 =, v 3 =, and v 5 4 =. 3 3 7 3 a. [ points] The set { v, v 2, v 3, v 4 } is linearly dependent. Find a nontrivial linear combination of these
More information6.02 Fall 2012 Lecture #5
6.2 Fall 22 Lecture #5 Error correction for linear block codes - Syndrome decoding Burst errors and interleaving 6.2 Fall 22 Lecture 5, Slide # Matrix Notation for Linear Block Codes Task: given k-bit
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 in-class presentation
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 informationSolutions to Math 51 First Exam January 29, 2015
Solutions to Math 5 First Exam January 29, 25. ( points) (a) Complete the following sentence: A set of vectors {v,..., v k } is defined to be linearly dependent if (2 points) there exist c,... c k R, not
More informationPractical Guide to the Simplex Method of Linear Programming
Practical Guide to the Simplex Method of Linear Programming Marcel Oliver Revised: April, 0 The basic steps of the simplex algorithm Step : Write the linear programming problem in standard form Linear
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 informationMathematics Course 111: Algebra I Part IV: Vector Spaces
Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are
More informationII. Linear Systems of Equations
II. Linear Systems of Equations II. The Definition We are shortly going to develop a systematic procedure which is guaranteed to find every solution to every system of linear equations. The fact that such
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 y-axis We observe that
More informationLinear Programming in Matrix Form
Linear Programming in Matrix Form Appendix B We first introduce matrix concepts in linear programming by developing a variation of the simplex method called the revised simplex method. This algorithm,
More information8.2. Solution by Inverse Matrix Method. Introduction. Prerequisites. Learning Outcomes
Solution by Inverse Matrix Method 8.2 Introduction The power of matrix algebra is seen in the representation of a system of simultaneous linear equations as a matrix equation. Matrix algebra allows us
More informationThese axioms must hold for all vectors ū, v, and w in V and all scalars c and d.
DEFINITION: A vector space is a nonempty set V of objects, called vectors, on which are defined two operations, called addition and multiplication by scalars (real numbers), subject to the following axioms
More informationSystems of Linear Equations
Chapter 1 Systems of Linear Equations 1.1 Intro. to systems of linear equations Homework: [Textbook, Ex. 13, 15, 41, 47, 49, 51, 65, 73; page 11-]. Main points in this section: 1. Definition of Linear
More informationContinued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
More information2.2/2.3 - Solving Systems of Linear Equations
c Kathryn Bollinger, August 28, 2011 1 2.2/2.3 - Solving Systems of Linear Equations A Brief Introduction to Matrices Matrices are used to organize data efficiently and will help us to solve systems of
More informationK80TTQ1EP-??,VO.L,XU0H5BY,_71ZVPKOE678_X,N2Y-8HI4VS,,6Z28DDW5N7ADY013
Hill Cipher Project K80TTQ1EP-??,VO.L,XU0H5BY,_71ZVPKOE678_X,N2Y-8HI4VS,,6Z28DDW5N7ADY013 Directions: Answer all numbered questions completely. Show non-trivial work in the space provided. Non-computational
More informationNOTES ON LINEAR TRANSFORMATIONS
NOTES ON LINEAR TRANSFORMATIONS Definition 1. Let V and W be vector spaces. A function T : V W is a linear transformation from V to W if the following two properties hold. i T v + v = T v + T v for all
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 informationLeast-Squares Intersection of Lines
Least-Squares Intersection of Lines Johannes Traa - UIUC 2013 This write-up derives the least-squares solution for the intersection of lines. In the general case, a set of lines will not intersect at a
More informationLinear Equations in Linear Algebra
May, 25 :46 l57-ch Sheet number Page number cyan magenta yellow black Linear Equations in Linear Algebra WEB INTRODUCTORY EXAMPLE Linear Models in Economics and Engineering It was late summer in 949. Harvard
More informationSyntax Description Remarks and examples Also see
Title stata.com permutation An aside on permutation matrices and vectors Syntax Description Remarks and examples Also see Syntax Permutation matrix Permutation vector Action notation notation permute rows
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 informationMath 215 HW #6 Solutions
Math 5 HW #6 Solutions Problem 34 Show that x y is orthogonal to x + y if and only if x = y Proof First, suppose x y is orthogonal to x + y Then since x, y = y, x In other words, = x y, x + y = (x y) T
More informationLinear Codes. Chapter 3. 3.1 Basics
Chapter 3 Linear Codes In order to define codes that we can encode and decode efficiently, we add more structure to the codespace. We shall be mainly interested in linear codes. A linear code of length
More informationSolving simultaneous equations using the inverse matrix
Solving simultaneous equations using the inverse matrix 8.2 Introduction The power of matrix algebra is seen in the representation of a system of simultaneous linear equations as a matrix equation. Matrix
More informationAu = = = 3u. Aw = = = 2w. so the action of A on u and w is very easy to picture: it simply amounts to a stretching by 3 and 2, respectively.
Chapter 7 Eigenvalues and Eigenvectors In this last chapter of our exploration of Linear Algebra we will revisit eigenvalues and eigenvectors of matrices, concepts that were already introduced in Geometry
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 informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationChapter 2 Determinants, and Linear Independence
Chapter 2 Determinants, and Linear Independence 2.1 Introduction to Determinants and Systems of Equations Determinants can be defined and studied independently of matrices, though when square matrices
More information15.062 Data Mining: Algorithms and Applications Matrix Math Review
.6 Data Mining: Algorithms and Applications Matrix Math Review The purpose of this document is to give a brief review of selected linear algebra concepts that will be useful for the course and to develop
More informationLecture 2 Matrix Operations
Lecture 2 Matrix Operations transpose, sum & difference, scalar multiplication matrix multiplication, matrix-vector product matrix inverse 2 1 Matrix transpose transpose of m n matrix A, denoted A T or
More informationMATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.
MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix. Nullspace Let A = (a ij ) be an m n matrix. Definition. The nullspace of the matrix A, denoted N(A), is the set of all n-dimensional column
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 three-space, we write a vector in terms
More information1 Sets and Set Notation.
LINEAR ALGEBRA MATH 27.6 SPRING 23 (COHEN) LECTURE NOTES Sets and Set Notation. Definition (Naive Definition of a Set). A set is any collection of objects, called the elements of that set. We will most
More informationSection 1.1 Linear Equations: Slope and Equations of Lines
Section. Linear Equations: Slope and Equations of Lines Slope The measure of the steepness of a line is called the slope of the line. It is the amount of change in y, the rise, divided by the amount of
More informationMATH2210 Notebook 1 Fall Semester 2016/2017. 1 MATH2210 Notebook 1 3. 1.1 Solving Systems of Linear Equations... 3
MATH0 Notebook Fall Semester 06/07 prepared by Professor Jenny Baglivo c Copyright 009 07 by Jenny A. Baglivo. All Rights Reserved. Contents MATH0 Notebook 3. Solving Systems of Linear Equations........................
More informationSensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS
Sensitivity Analysis 3 We have already been introduced to sensitivity analysis in Chapter via the geometry of a simple example. We saw that the values of the decision variables and those of the slack and
More informationNonlinear Programming Methods.S2 Quadratic Programming
Nonlinear Programming Methods.S2 Quadratic Programming Operations Research Models and Methods Paul A. Jensen and Jonathan F. Bard A linearly constrained optimization problem with a quadratic objective
More informationTorgerson s Classical MDS derivation: 1: Determining Coordinates from Euclidean Distances
Torgerson s Classical MDS derivation: 1: Determining Coordinates from Euclidean Distances It is possible to construct a matrix X of Cartesian coordinates of points in Euclidean space when we know the Euclidean
More informationLinear Programming. April 12, 2005
Linear Programming April 1, 005 Parts of this were adapted from Chapter 9 of i Introduction to Algorithms (Second Edition) /i by Cormen, Leiserson, Rivest and Stein. 1 What is linear programming? The first
More informationLinear Algebra and TI 89
Linear Algebra and TI 89 Abdul Hassen and Jay Schiffman This short manual is a quick guide to the use of TI89 for Linear Algebra. We do this in two sections. In the first section, we will go over the editing
More information160 CHAPTER 4. VECTOR SPACES
160 CHAPTER 4. VECTOR SPACES 4. Rank and Nullity In this section, we look at relationships between the row space, column space, null space of a matrix and its transpose. We will derive fundamental results
More informationLinear Equations and Inequalities
Linear Equations and Inequalities Section 1.1 Prof. Wodarz Math 109 - Fall 2008 Contents 1 Linear Equations 2 1.1 Standard Form of a Linear Equation................ 2 1.2 Solving Linear Equations......................
More informationDerivative Approximation by Finite Differences
Derivative Approximation by Finite Differences David Eberly Geometric Tools, LLC http://wwwgeometrictoolscom/ Copyright c 998-26 All Rights Reserved Created: May 3, 2 Last Modified: April 25, 25 Contents
More informationLogistic Regression. Jia Li. Department of Statistics The Pennsylvania State University. Logistic Regression
Logistic Regression Department of Statistics The Pennsylvania State University Email: jiali@stat.psu.edu Logistic Regression Preserve linear classification boundaries. By the Bayes rule: Ĝ(x) = arg max
More informationGeneral Framework for an Iterative Solution of Ax b. Jacobi s Method
2.6 Iterative Solutions of Linear Systems 143 2.6 Iterative Solutions of Linear Systems Consistent linear systems in real life are solved in one of two ways: by direct calculation (using a matrix factorization,
More informationMATRICES WITH DISPLACEMENT STRUCTURE A SURVEY
MATRICES WITH DISPLACEMENT STRUCTURE A SURVEY PLAMEN KOEV Abstract In the following survey we look at structured matrices with what is referred to as low displacement rank Matrices like Cauchy Vandermonde
More informationCS321. Introduction to Numerical Methods
CS3 Introduction to Numerical Methods Lecture Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506-0633 August 7, 05 Number in
More informationMATHEMATICS FOR ENGINEERS BASIC MATRIX THEORY TUTORIAL 2
MATHEMATICS FO ENGINEES BASIC MATIX THEOY TUTOIAL This is the second of two tutorials on matrix theory. On completion you should be able to do the following. Explain the general method for solving simultaneous
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 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 informationTypical Linear Equation Set and Corresponding Matrices
EWE: Engineering With Excel Larsen Page 1 4. Matrix Operations in Excel. Matrix Manipulations: Vectors, Matrices, and Arrays. How Excel Handles Matrix Math. Basic Matrix Operations. Solving Systems of
More information