Linear Algebra I Lecture 10 Xi Chen 1 1 University of Alberta January 30, 2019
Outline 1
Gauss-Jordan Algorithm ] Let A = [a ij m n be an m n matrix. To reduce A to a reduced row echelon form using elementary row operation, we do: STEP 0. Set i = j = 1. STEP 1. If i > m or j > n, we are done and stop. STEP 2. If a ij = a i+1,j =... = a mj = 0, increase j by 1 and go to STEP 1. STEP 3. Find a kj 0 for some i k m and exchange Row i and k if i k. STEP 4. Divide Row i by a ij (pivot). STEP 5. For each l i, substract a lj Row i from Row l (pivoting). STEP 6. Increase both i and j by 1 and go to STEP 1.
Examples of Gauss-Jordan Elimination For example, let us solve x 1 x 2 + x 3 = 1 2x 1 3x 2 + x 3 = 2 4x 1 5x 2 + 3x 3 = 4 1 1 1 1 R2 2 R1 1 1 1 1 R3 4 R1 2 3 1 2 0 1 1 0 4 5 3 4 0 1 1 0 1 1 1 1 R2 ( 1) 0 1 1 0 0 1 1 0 R1+R2 R3+R2 1 0 2 1 0 1 1 0 0 0 0 0
Examples of Gauss-Jordan Elimination (CONT) We have reduced the augmented matrix to the RREF 1 0 2 1 0 1 1 0 0 0 0 0 This corresponds to the system { x1 + 2x 3 = 1 x 2 + x 3 = 0 where x 1 and x 2 are the dependent variables and x 3 is the free variable. Setting x 3 = t, we obtain the solutions x 1 1 2t 1 2 x 2 = t = 0 + t 1 t 0 1 x 3
Examples of Gauss-Jordan Elimination For example, let us solve y + z = 1 2w 4x 2y + z = 1 w + 2x + y = 2 0 0 1 1 1 1 2 1 0 2 2 4 2 1 1 R1 R3 2 4 2 1 1 1 2 1 0 2 0 0 1 1 1 R2+2 R1 R1 R2 1 2 1 0 2 1 2 1 0 2 0 0 0 1 3 R2 R3 0 0 1 1 1 0 0 1 1 1 0 0 0 1 3 1 2 0 1 1 R1+R3 0 0 1 1 1 R2 R3 1 2 0 0 4 0 0 1 0 2 0 0 0 1 3 0 0 0 1 3
Examples of Gauss-Jordan Elimination (CONT) This corresponds to the system w + 2x = 4 y = 2 z = 3 where w, y and z are the dependent variables and x is the free variable. Setting x = t, we obtain the solutions w 4 2t 4 2 x y = t 2 = 0 2 + t 1 0 z 3 3 0
Solutions of SLE When applying Gauss-Jordan to solve a SLE, 1 whenever the resulting matrix contains a row [ ] 0 0... 0 b for some b 0, we can stop and the system is inconsistent; 2 if the system is homogeneous, we just need to apply the algorithm to the coefficient matrix, because the constant terms remain zero throughout.
Solutions of SLE Suppose that we have reduced the augmented matrix to a REF: Elementary Row Operations A b [A b ] m (n+1) 1 If [ A b ] contains a row [ ] 0 0... 0 b for some b 0, the system is inconsistent. 2 Every leading nonzero entry corresponds to a dependent variable: # of depend variables = # of leading nonzero entries = # of nonzero rows if the system is consistent.
Solutions of SLE (CONT) If the system is consistent, k = # of free variables = n # of dependent variables and the solution is = n # of nonzero rows in REF n m x = u + t 1 v 1 + t 2 v 2 +... + t k v k. A system of m linear equations in n variables has either no solutions or infinitely many solutions if n > m. If it is homogeneous, it has always infinitely many solutions if n > m.
Intersection of Two Lines in R 2 Let L 1 and L 2 be two lines in R 2 : L 1 = {a 11 x + a 12 y = b 1 } L 2 = {a 21 x + a 22 y = b 2 } Consider L 1 L 2, i.e., the solutions of { a11 x + a 12 y = b 1 a 21 x + a 22 y = b 2 1 L 1 L 2 = {p} the system has a unique solution. 2 L 1 L 2 = L 1 = L 2 the system has infinitely many solutions. 3 L 1 L 2 = the system has no solution.
Intersection of Two Lines in R 2 (CONT) Suppose that we have reduced the augmented matrix to a RREF: a11 a 12 b 1 Elementary Row Operations a 11 a 12 b 1 a 21 a 22 b 2 a 21 a 22 b 2 A list of all possible RREF: 1 0 c1 L 0 1 c 1 L 2 = {(c 1, c 2 )} 2 1 c1 0 L 0 0 1 1 L 2 = 0 1 0 L 0 0 1 1 L 2 =
Intersection of Two Lines in R 2 (CONT) 1 c1 c 2 L 0 0 0 1 L 2 = L 1 = L 2 = {x + c 1 y = c 2 } 0 1 c1 L 0 0 0 1 L 2 = L 1 = L 2 = {y = c 2 } Since (a 11, a 12 ) (0, 0), a 11 a 12 a 21 a 22 0 0 0 0
Intersection of Three planes in R 3 Let P 1, P 2 and P 3 be three planes in R 3 given by P 1 = {a 11 x + a 12 y + a 13 z = b 1 } P 2 = {a 21 x + a 22 y + a 23 z = b 2 } P 3 = {a 31 x + a 32 y + a 33 z = b 3 } Consider P 1 P 2 P 3, i.e., the solutions of a 11 x + a 12 y + a 13 z = b 1 a 21 x + a 22 y + a 23 z = b 2 a 31 x + a 32 y + a 33 z = b 3 1 P 1 P 2 P 3 is a plane. 2 P 1 P 2 P 3 is a line. 3 P 1 P 2 P 3 is a point. 4 P 1 P 2 P 3 is empty.
Intersection of Three planes in R 3 (CONT) The augmented matrix can be reduced to one of the following RREF: 1 0 0 c 1 1 0 c 1 0 1 c 1 0 0 (a) 0 1 0 c 2 (b) 0 1 c 2 0 (c) 0 0 1 0 0 0 1 c 3 0 0 0 1 0 0 0 1 0 1 0 0 1 0 c 1 c 2 1 c 1 0 c 2 (d) 0 0 1 0 (e) 0 1 c 3 c 4 (f ) 0 0 1 c 4 0 0 0 1 0 0 0 0 0 0 0 0 1 c 1 c 2 0 0 1 0 c 1 0 1 c 1 0 (g) 0 0 0 1 (h) 0 0 1 c 2 (i) 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Intersection of Three planes in R 3 (CONT) 0 0 1 0 (j) 0 0 0 1 (k) 0 0 0 0 0 0 1 c 1 (m) 0 0 0 0 0 0 0 0 1 c 1 c 2 c 3 0 0 0 0 (l) 0 0 0 0 0 1 c 1 c 2 0 0 0 0 0 0 0 0 (b), (c), (d), (g), (i), (j): P 1 P 2 P 3 =. (a): P 1 P 2 P 3 is a point. (e), (f), (h): P 1 P 2 P 3 is a line. (k), (l), (m): P 1 P 2 P 3 = P 1 = P 2 = P 3 is a plane.