Direct Methods for Solving Linear Systems. Linear Systems of Equations


 Agnes Shelton
 1 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 & Roundoff Error Numerical Analysis (Chapter 6) Linear Systems of Equations R L Burden & J D Faires 5 / 43
11 Introduction Direct Methods & Roundoff 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 & Roundoff 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 roundoff 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 & Roundoff 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 roundoff error that is involved with the arithmetic being used. Analyzing the effect of this roundoff 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 & Roundoff 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 roundoff error that is involved with the arithmetic being used. Analyzing the effect of this roundoff 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 ndimensional row vector, and an n 1 matrix a 11 a 21 A =. a n1 is called an ndimensional 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 righthand 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 righthand 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 backwardsubstitution 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 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 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 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 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 twodimensional space (1) 2x y = 3 describes a line in twodimensional space The coefficients of x and y in the equation
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 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. 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 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 informationLINEAR SYSTEMS. Consider the following example of a linear system:
LINEAR SYSTEMS Consider the following example of a linear system: Its unique solution is x +2x 2 +3x 3 = 5 x + x 3 = 3 3x + x 2 +3x 3 = 3 x =, x 2 =0, x 3 = 2 In general we want to solve n equations in
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 918/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 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 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 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 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 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 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 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 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 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 informationMath 240: Linear Systems and Rank of a Matrix
Math 240: Linear Systems and Rank of a Matrix Ryan Blair University of Pennsylvania Thursday January 20, 2011 Ryan Blair (U Penn) Math 240: Linear Systems and Rank of a Matrix Thursday January 20, 2011
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 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 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 informationSYSTEMS OF EQUATIONS AND MATRICES WITH THE TI89. by Joseph Collison
SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI89 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 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 informationThe basic unit in matrix algebra is a matrix, generally expressed as: a 11 a 12. a 13 A = a 21 a 22 a 23
(copyright by Scott M Lynch, February 2003) Brief Matrix Algebra Review (Soc 504) Matrix algebra is a form of mathematics that allows compact notation for, and mathematical manipulation of, highdimensional
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 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 informationIntroduction to Matrix Algebra I
Appendix A Introduction to Matrix Algebra I Today we will begin the course with a discussion of matrix algebra. Why are we studying this? We will use matrix algebra to derive the linear regression model
More informationSYSTEMS OF EQUATIONS
SYSTEMS OF EQUATIONS 1. Examples of systems of equations Here are some examples of systems of equations. Each system has a number of equations and a number (not necessarily the same) of variables for which
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 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 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 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 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 informationHelpsheet. Giblin Eunson Library MATRIX ALGEBRA. library.unimelb.edu.au/libraries/bee. Use this sheet to help you:
Helpsheet Giblin Eunson Library ATRIX ALGEBRA Use this sheet to help you: Understand the basic concepts and definitions of matrix algebra Express a set of linear equations in matrix notation Evaluate determinants
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 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 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 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 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 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 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 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 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 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 informationLinear Algebra Notes for Marsden and Tromba Vector Calculus
Linear Algebra Notes for Marsden and Tromba Vector Calculus ndimensional 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 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 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 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 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 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 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 informationAlgebraic and Combinatorial Circuits
C H A P T E R Algebraic and Combinatorial Circuits Algebraic circuits combine operations drawn from an algebraic system. In this chapter we develop algebraic and combinatorial circuits for a variety of
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 sidestepped
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 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 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 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 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 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 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 information1 Introduction. 2 Matrices: Definition. Matrix Algebra. Hervé Abdi Lynne J. Williams
In Neil Salkind (Ed.), Encyclopedia of Research Design. Thousand Oaks, CA: Sage. 00 Matrix Algebra Hervé Abdi Lynne J. Williams Introduction Sylvester developed the modern concept of matrices in the 9th
More informationMathematics Course 111: Algebra I Part IV: Vector Spaces
Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 19967 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are
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 kbit
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 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 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 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 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 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 informationNOTES on LINEAR ALGEBRA 1
School of Economics, Management and Statistics University of Bologna Academic Year 205/6 NOTES on LINEAR ALGEBRA for the students of Stats and Maths This is a modified version of the notes by Prof Laura
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 information1 Eigenvalues and Eigenvectors
Math 20 Chapter 5 Eigenvalues and Eigenvectors Eigenvalues and Eigenvectors. Definition: A scalar λ is called an eigenvalue of the n n matrix A is there is a nontrivial solution x of Ax = λx. Such an x
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 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 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 information3 Does the Simplex Algorithm Work?
Does the Simplex Algorithm Work? In this section we carefully examine the simplex algorithm introduced in the previous chapter. Our goal is to either prove that it works, or to determine those circumstances
More informationINTRODUCTORY LINEAR ALGEBRA WITH APPLICATIONS B. KOLMAN, D. R. HILL
SOLUTIONS OF THEORETICAL EXERCISES selected from INTRODUCTORY LINEAR ALGEBRA WITH APPLICATIONS B. KOLMAN, D. R. HILL Eighth Edition, Prentice Hall, 2005. Dr. Grigore CĂLUGĂREANU Department of Mathematics
More informationAN INTRODUCTION TO ERROR CORRECTING CODES Part 1
AN INTRODUCTION TO ERROR CORRECTING CODES Part 1 Jack Keil Wolf ECE 154C Spring 2008 Noisy Communications Noise in a communications channel can cause errors in the transmission of binary digits. Transmit:
More informationSECTION 81 Systems of Linear Equations and Augmented Matrices
86 8 Systems of Equations and Inequalities In this chapter we move from the standard methods of solving two linear equations with two variables to a method that can be used to solve linear systems with
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 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 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 informationK80TTQ1EP??,VO.L,XU0H5BY,_71ZVPKOE678_X,N2Y8HI4VS,,6Z28DDW5N7ADY013
Hill Cipher Project K80TTQ1EP??,VO.L,XU0H5BY,_71ZVPKOE678_X,N2Y8HI4VS,,6Z28DDW5N7ADY013 Directions: Answer all numbered questions completely. Show nontrivial work in the space provided. Noncomputational
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 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 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 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 informationMatrices, Determinants and Linear Systems
September 21, 2014 Matrices A matrix A m n is an array of numbers in rows and columns a 11 a 12 a 1n r 1 a 21 a 22 a 2n r 2....... a m1 a m2 a mn r m c 1 c 2 c n We say that the dimension of A is m n (we
More informationLinear Equations in Linear Algebra
May, 25 :46 l57ch 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 information